T
T
tehnazavr2019-04-01 15:15:55
iptables
tehnazavr, 2019-04-01 15:15:55

How to redirect all outgoing traffic to socks proxy using iptables?

There is a socks proxy for 1.2.3.4:66734. I want all my traffic (programs, browsers, ssh, console, etc.) to go through it. How to configure iptables to work?)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladimir Dubrovin, 2019-04-01
@z3apa3a

The principle is this: redirect traffic to the local port on which the application hangs, which can be a SOCKS client and supports local redirects. For example, in 3proxy configuration example https://3proxy.ru/plugins/TransparentPlugin/ - local traffic should be redirected to port 12345, while redirecting should be done so that the traffic of the proxy itself is not redirected back to it.

P
planc, 2019-04-01
@planc

an example of a root tracker (all traffic from port 80 to their announcer) through a proxy:

iptables -t nat -A OUTPUT -p tcp -m tcp --dport 80 -d 195.82.146.120/30 -j DNAT --to-destination 163.172.167.207:3128

V
ValdikSS, 2019-04-03
@ValdikSS

Use RedSocks.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question