Results 1 to 2 of 2
Hi,
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
iptables ...
I've ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-04-2010 #1Just Joined!
- Join Date
- May 2010
- Posts
- 1
ssh and iptables
Hi,
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
iptables ...
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 ?
- 05-04-2010 #2
This is the correct syntax:
This will redirect all traffic from port 80 to port 4444Code:iptables -t nat -A PREROUTING -i eth0 -p tcp --dport $srcPortNumber -j REDIRECT --to-ports $dstPortNumbe
Hope this gives you a idea.Code: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


Reply With Quote
