7

I connect to my Server on the internet using ssh -D 3128 [email protected]. If I am right I thereby open a SOCKS v5 Proxy to my Server. Using Firefox and FoxyProxy I can now add this to my proxys and tunnel my HTTP-Traffic over it. Howsoever I'd like to use this SOCKS Proxy for all my traffic. Friends told me that they've seen this by modifying your route or using iptables howsoever I can't find anything about it.

2 Answers 2

6

SOCKS5 is a protocol (i.e. in the application layer of OSI), so plain network-routing (e.g. via iptables) alone won't do. (It's probably necessary, but not sufficient.)

What you need is a proxifier. Without having tried it, tun2socks, allowing you to "socksify TCP at the network layer", looks promising (as does proxychains, without iptables but prefixing programs explicitly).

(Could socat be used here? This mentions socat for socksifying, but I'm unsure at the moment.)

1
  • tun2socks in combination with iptables did the job, thanks a lot!
    – Momo
    Commented Aug 3, 2012 at 13:04
1

Proxybound can do the job

To apply it system widely as you asked you can ad it as a default preloaded library, to do so edit /etc/ld.so.preload and add /usr/local/lib/libproxybound.so or libproxybound.so depending on how you installed proxybound

After reboot any started application will be preloading proxybound and thus proxified

This method need to be tested carefully because proxybound is not compatible with all the applications you may encounter (resulting in some applications not starting because proxybound does not allow unsupported apps to start, this is to avoid leaks). Alternatively you can setup the env variable LD_PRELOAD with the value /usr/local/lib/libproxybound.so for a specific userspace or user session to limit where proxybound is applied.

You must log in to answer this question.

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