> I want to forward eth0 port 80 to another merchine, however It doesn't > work. Any one can figure out anything wrong in my steps? > > My merchine eth0 is 192.168.8.50 > > modprobe iptable_nat > echo "1">/proc/sys/net/ipv4/ip_forward > iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to > 192.168.8.55:80 > > > I enter "iptables -L" and it shows all default policy are accept. > > apple:/# iptables -L -n -t nat > Chain PREROUTING (policy ACCEPT) > target prot opt source destination > DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 > to:192.168.5.55:80 > > Chain POSTROUTING (policy ACCEPT) > target prot opt source destination > > Chain OUTPUT (policy ACCEPT) > target prot opt source destination > > > However, I use linx to http://192.168.5.50 <http://1.1.1.1:8080/>, I got > "lynx: Can't access startfile http://192.168.5.50/" > I can browser 192.168.5.55 directly using lynx. On which machine are you running lynx? If you are on the same machine that the iptables rules are running, then I don't think that will hit the PREROUTING NAT chain. Dave. -- Dave Ewart - davee@sungate.co.uk - jabber: davee@jabber.org All email from me is now digitally signed, key from http://www.sungate.co.uk/ Fingerprint: AEC5 9360 0A35 7F66 66E9 82E4 9E10 6769 CD28 DA92
Attachment:
signature.asc
Description: Digital signature