views:

29

answers:

0

Hi,

I used

iptables -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-ports 8085

to redirect all http requests to jboss server on port 8085. This works fine if packets come from outside. If I try to open from the same machine it doesnt work. Telnet gives connection refused.

How do I redirect local connections?

Working on centos, kernel 2.6.18 x64