A
A
AwvuweWd2019-05-07 17:50:15
iptables
AwvuweWd, 2019-05-07 17:50:15

How to redirect the traffic of a specific user to the port of the local proxy with iptables?

You need to redirect all traffic of the user uuid 1001 to the socks port of the proxy (local).

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2019-05-07
@q2digger

Something like

iptables -t nat -A OUTPUT -m owner --uid-owner 1001 -p tcp -j REDIRECT --to <socks-port>

A
AwvuweWd, 2019-05-07
@AwvuweWd

I didn’t help
for nat (external_ip), my computer 192.168.1.156
ports are forwarded, I tested it, the service works without interruptions.
using 2 users:
uuid 1000 :user1
uuid 1001 :user2
need to make user2 anonymous (socks5)
user1 : ncat -lvkp 9000
user2 : ncat external_ip 9000
wireshark: external_ip 192.168.1.156 9000->(random port) SYN ACK
disable ncat user2:
wirearkshark :external_ip 192.168.1.156 9000->(random port) FIN ACK
wireshark:external_ip 192.168.1.156 9000->(random port) ACK
That 's it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question