Linux - ip forwarding, masquareding, NAT
by guy_sarav from LinuxQuestions.org on (#5M615)
hi,
I have one physical interface eth0 on my target.
ip address of this interface is 172.16.81.xx (public ip)
I have to create a virtual interface eth0:1 with ip address 173.1.1.x.
Will be running socket server with custom port 49155 using ip address 173.1.1.x
From another PC/target i should not be able to ping 173.1.1.x
However, from another PC i will be running a socket client program.
This client should be able to connect to port 49155 on 172.16.81.xx public ip.
Have tried NAT, bridge but not successful.
Please let me know how this can be done.
Thanks,
sarav
I have one physical interface eth0 on my target.
ip address of this interface is 172.16.81.xx (public ip)
I have to create a virtual interface eth0:1 with ip address 173.1.1.x.
Will be running socket server with custom port 49155 using ip address 173.1.1.x
From another PC/target i should not be able to ping 173.1.1.x
However, from another PC i will be running a socket client program.
This client should be able to connect to port 49155 on 172.16.81.xx public ip.
Have tried NAT, bridge but not successful.
Please let me know how this can be done.
Thanks,
sarav