Results 1 to 3 of 3
I want to redirect traffic from one port to another port on the same machine.
ive done iptables -t nat -A PREROUTING -i eth0 tcp --dport 28080 -j REDIRECT --to-port ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-25-2008 #1Just Joined!
- Join Date
- Oct 2008
- Posts
- 2
Port redirection on same machine
I want to redirect traffic from one port to another port on the same machine.
ive done iptables -t nat -A PREROUTING -i eth0 tcp --dport 28080 -j REDIRECT --to-port 80 .... just as a test (ive used a basic apache for test purposes, it will be with a different service later on) when I telnet to port 28080 on localhost, it refuses the connection but port 80 accepts a connection.
robbie@r220-....-.....:~$ sudo iptables -t nat -nv -L
Chain PREROUTING (policy ACCEPT 19890 packets, 1530K bytes)
pkts bytes target prot opt in out source destination
0 0 REDIRECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:18080 redir ports 80
0 0 REDIRECT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:28080 redir ports 80
- 10-26-2008 #2
- 07-15-2009 #3Just Joined!
- Join Date
- Jul 2009
- Posts
- 1
anyway to get this to work with the local interface? Any hack will do. I need to intercept an outgoing connection from the localhost.
thanks


Reply With Quote

