I have 2 pc and I tried to learn how to NAT on those . The fist PC ( 10.0.0.4 ) with iptables and the second (10.0.0.5 ) with apache on it. Now I would like whenerver a http request to 10.0.0.4 , it will forward to 10.0.0.5 and I used :
Quote:
[root@HomeServer sysconfig]# iptables -A FORWARD -p tcp --dport 80 -j ACCEPT
[root@HomeServer sysconfig]# iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to 10.0.0.5
|
Then I tried "http://10.0.0.4" on the 10.0.0.5 , hoping it will redirect back but nothing happend ( ofcause my httpd on 10.0.0.5 in turn on ) . Could you point me out the wrong in the command abouve , thank you