Results 1 to 2 of 2
Thread: ssh and iptables
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- May 2010
ssh and iptables
I'd like to use ssh as a proxy/socks server and redirect all connections through this proxy.
It would look like :
ssh -D 123 -N host
I've never used iptables before and I did not manage to find any useful for this particular case solutions on the internet.
So, what's the good way to do that ?
This is the correct syntax:
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport $srcPortNumber -j REDIRECT --to-ports $dstPortNumbe
iptables -t nat -I PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-ports 4444
some more info:
How to redirect TCP ports using Linux iptables | eHow.com