iptables, redirect from ip address to loopback

1

I have an Apache web server listening in 127.0.0.1:63280 eth0 has IP: 172.200.200.200.1, and try to connect from workstation IP 172.200.200.200

iptables -t nat -A PREROUTING -s 172.200.200.200.1 -p tcp -m tcp --dport 63280 
         -j DNAT --to-destination 127.0.0.1:63280

With tcpdump -i lo, I can't see any traffic to web server.

Is there any problem with NAT and loopback?

JuanMa

Posted 2013-06-21T12:16:54.377

Reputation: 19

172.200.200.200.1 is not a valid IP, maybe it's your problem... (or a typo in your question?) – pataluc – 2013-06-21T12:31:53.490

sorry, it's a mistake, ip address is 172.200.200.1 – JuanMa – 2013-06-21T13:04:32.887

Answers

0

I think found the answer !!

Linux kernel drops all packets to dest 127.0.0.1 that not from 127.0.0.1

JuanMa

Posted 2013-06-21T12:16:54.377

Reputation: 19