Hi all,
I have following situation
comp_A(80.xxx.xxx.xxx)--------crossover-----comp_B (192.168.1.20)
On comp_A I have a rule
iptables -t nat -A OUTPUT -s any/0 -d 80.xxx.xxx.xxx -p tcp --dport 80 -j DNAT --to-destination 192.168.1.20
And when I enter at web browser on comp_A 80.xxx.xxx.xxx I got apache test page served on comp_b.
When I at comp_B change port server listens from default 80 to another, let say 100, and on comp_A change rule to
iptables -t nat -A OUTPUT -s any/0 -d 80.65.170.142 -p tcp --dport 80 -j DNAT --to-destination 192.168.1.20:100 and then refresh page on comp_A I cannot get same result as before. I got
Not Found
The requested URL / was not found on this server.
Apache Server at 80.xxx.xxx.xxx Port 80
With iptables rules I redirected all http request to comp_B.
In first case everything is ok, but why this does not work ( serve me the same apache test page ) when I change port number apache listens on comp_B?
It would be very helpful if someone has a time to explain this for all of us who do not understand this.
Thank you
PS. compA=debian, comp_B=gentoo