Hey Guys I have the following setup:
eth0:1
ISP--- -DEBIAN-eth2--Switch--Internal Web Server
eth0:2
I have one ethernet cable from my ISP on which I have two Public IPs assigned A&B I have natted all the traffic coming to IP B directly to my Internal web server with IP C.
This scenario was applied succesfully.
However the other clients on the network and the webserver itself have to be able to access the webserver using IP B (i.e. the public IP) NOT the private IP C.
Naturally if the IP B is entered into a web browser it will take them to the Apache server on the debian router since this is the server hosting IP B.
This is the typical routing rule
iptables -t nat -A PREROUTING --dst $B -p tcp --dport 80 -j DNAT \
--to-destination $C
Now according to
http://iptables-tutorial.frozentux.n...-tutorial.html
Adding This should work :
iptables -t nat -A POSTROUTING -p tcp --dst $B--dport 80 -j SNAT \
--to-source $C
But it did not work ...if the rule above is added without specifing a port. Pinging IP B "The public IP" from a local computer on the LAN..it will say reply from IP C "i.e. from the local webserver". However if the IP B is entered into a web browser it will just stay loading forever.
Thanks for any suggestions or clarifications