Hi all,
We've got two RedHat 7.2 servers (A and B) in our LAN. Server A has 2
network cards, one is 202.x.x.1(eth0) and the other is 192.168.x.1(eth1).
Server B has only one network card and the IP address is 192.168.x.2(eth0). Server A does the NAT work for the whole LAN using
iptables POSTROUTING chain, including server B.
We can access server A and even our LAN from outside. Now I want do such
kind of work, through which we can browse the APACHE website on server B.
That means when someone browse
http://202.x.x.1:80, server A will forward
this request to server B, that is 192.168.x.2:80. This is the command I
typed on server A: $iptables -t nat -A PREROUTING -i eth0 -p tcp -s 0/0 -d
localhost --dport 80 -j DNAT --to 192.168.x.2:80.
But I'm sure that's a wrong method, since I still see the apache test page
on server A, instead of formal website on server B.
Please give me some advice.
Any help will be appreciated.
zuohong