I have only one usable public IP and i want to share multiple hosts inside the network on internet....
basically i want to forward the port 80 requests to host A and port 5900 requests to host B and i want to use only on public IP for both of the hosts....
can anybody guide me and provide me syntax for the same
On a router where
host A = 192.168.5.1
host B = 192.168.5.10
Public ip address = 126.96.36.199
ip nat inside source static tcp 192.168.5.1 80 188.8.131.52 80
ip nat inside source static tcp 192.168.5.10 5999 184.108.40.206 5999
On a an ASA/Pix v7.x firewall it's essentially the same except the addresses re swapped around eg
static (inside,outside) tcp 220.127.116.11 80 192.168.5.1 80
static (inside,outside) tcp 18.104.22.168 5999 192.168.5.10 5999
Note on ASA/Pix if the public IP address you are using is the actual IP address assigned to the the outside interface you need to modfiy the statics
static (inside,outside) tcp interface 80 192.168.5.1 80
static (inside,outside) tcp interface 5999 192.168.5.10 5999