Help forwarding traffic from 1 host to another
I have a host acting like a socks proxy. I want to forward all of my traffic from that host to another and out to the internet.
I used this command on the first host (host A) to setup the socks proxy ssh -f -N -D 0.0.0.0:1080 localhost iptables -A INPUT --src 1.2.3.4 -p tcp --dport 1080 -j ACCEPT (1.2.3.4 is not my IP, just put it up for privacy) iptables -A INPUT -p tcp --dport 1080 -j REJECT I want to forward all of my traffic from host A, through another linux system and out to the internet. I thought I could do an SSH tunnel from host A through host B. But Im too much of a n00b to get it working correctly Any help? |
ssh port forwarding doesn't need iptables updates. the entire point is that the traffic moves between the systems within the ssh connection on port 22. 1080 won't EVER be seen on your network.
You need a way to make the traffic use the proxy. It's not going to magically jump in it. That's usually browser settings, but only relates to web traffic that way. There are tools like socksify which can push non proxyable (??) traffic into a socks proxy, if that's what you really need. |
Quote:
ssh -L is what im thinking about here, or am i way off base? Quote:
|
The specified port is what's use locally, or remotely, on the loopback interface. You can have 10 local tunnels and 10 reverse tunnels, but the traffic will only ever flow over port 22 between the two systems.
No, you couldn't as you need to be socks aware, and connect to a specific TCP port. |
thanks for clearing that up.
|
All times are GMT -5. The time now is 07:31 PM. |