0

I am pretty lost with that. I have a machine with multiple adaptors, wlan0, eth0 and vpn_tun10. I want to set a tunnel on this machine to listen to request on the port 1080 and route them to the same machine but adaptor eth0 and route requests on port 1082 to the adaptop wlan0 (like a proxy, in fact, it is a proxy)

The connections should be routed from the outside (it is connected to a network using vpn on the vpn_tun10 adaptor) so i think -L should not be used, isnt ?

Sorry, i dont understand the SSH tunneling yet.

1 Answer 1

0

Try with IPtables instead. You can specify interfaces, something like that:

iptables -A FORWARD -i input_iface -o output_iface-j ACCEPT
iptables -A FORWARD -i output_iface -o input_iface -m state --state ESTABLISHED,RELATED \
         -j ACCEPT
iptables -t nat -A POSTROUTING -o output_iface -j MASQUERADE

EDIT - the above would route ALL traffic, not just specific port, but you can augment rules with ports with parameter --dport and --sport (notice double dash)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .