2

I have a router with two Internet WANs: DSL (vlan1) and wireless client (eth1). They are both in default route: vlan is the first and eth1 is the second (I am using ip route add default scope global nexthop via …).

I want to use eth1 Internet from my laptop using socks proxy. I tried to use srelay socks server with –J eth1 option on the router but it didn’t work (page loads forever) although it works through DSL if I use –J vlan1. I also tried to use ssh as a socks server and mark packets with iptables to route them to eth1 using ip rule:

iptables -t mangle -A OUTPUT -o vlan1 -j MARK --set-mark 1

After this command every program on the router starts using eth1 but I need that only the socks server uses eth1. Is it possible to mark only socks server packets? Now I have to use the second router for this purpose. I run socks server on it and add ip rule for its IP on the first router.

I already tried this and it didn’t work. It’s not "duplicate" because I need this for proxy server on router. The problem is that I can’t mark packets based on port number because proxy server doesn’t keep this mark while proxyfing.

0

Browse other questions tagged or ask your own question.