All of lore.kernel.org
 help / color / mirror / Atom feed
* Redirecting ports on localhost
@ 2004-03-30 12:46 Fabiano Bonin
  2004-03-30 13:00 ` David Cannings
  0 siblings, 1 reply; 8+ messages in thread
From: Fabiano Bonin @ 2004-03-30 12:46 UTC (permalink / raw)
  To: netfilter

I followed a thread about redirecting ports on localhost, but i still 
did not have success in my case.
I have a service listening on port 5050, just on the local interface, as 
shown below:

netstat -n -a -p | grep 5050
tcp        0      0 127.0.0.1:5050          0.0.0.0:*               
LISTEN      7485/0

I need to access this service from other hosts through ETH0 interface 
(ip 192.168.0.254). The other hosts are in the same network.
I already enabled "NF_NAT_LOCAL" kernel option (btw, all netfilter 
options are enabled in my kernel), and the commands i'm using are these:

iptables -F
iptables -F -t nat
iptables -A OUTPUT -t nat -p tcp -o lo -d 192.168.0.254 --dport 5050 -j 
REDIRECT --to-ports 5050
echo "1" > /proc/sys/net/ipv4/ip_forward

After these commands, i can access the service on the eth0 interface 
from the server host itself, but not from other hosts in the same network.

What am i doing wrong?

Thanks.



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-03-31  0:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20040330133505.22298.90925.Mailman@vishnu.netfilter.org>
2004-03-30 14:15 ` Redirecting ports on localhost Fabiano Bonin
2004-03-30 19:13   ` David Cannings
2004-03-30 22:03     ` Tony Earnshaw
2004-03-30 22:31       ` David Cannings
2004-03-31  0:40         ` Tony Earnshaw
2004-03-30 22:33     ` David Cannings
2004-03-30 12:46 Fabiano Bonin
2004-03-30 13:00 ` David Cannings

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.