Answer the question
In order to leave comments, you need to log in
How to redirect traffic from IPsec tunnel to TOR on VPS?
Good time! Essence of the question: there is a VPS on which the Openvpn server and TOR are installed. When a client connects, traffic from the tunnel is redirected to the TOR ingress using iptables rules:
-A PREROUTING -i tun+ -p udp -m udp --dport 53 -j REDIRECT --to-ports 53
-A PREROUTING -i tun+ -p tcp - m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j REDIRECT --to-ports 9040.
TOR config:
VirtualAddrNetwork 10.192.0.0/10
AutomapHostsOnResolve 1
TransPort 9040
TransListenAddress 10.8.0.1 10.8.1.1
DNSPort 53
DNSListenAddress 10.8. 0.1 10.8.1.1,
where 10.8.0.1 10.8.1.1 are respectively addresses of OpenVPN and IPsec servers.
Redirect rules for IPsec:
-A PREROUTING -i ppp+ -p udp -m udp --dport 53 -j REDIRECT --to-ports 53
-A PREROUTING -i ppp+ -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j REDIRECT --to-ports 9040
At the same time: when connecting to openvpn, the user receives traffic and the IP of the TOR exit point. When connecting via IPsec, the connection is established, but there is no Internet access. What could be the reasons?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question