iptables rules for using OpenVPN with Tor
Hello,
To set up a normal OpenVPN server, I use the following iptables rules: Code:
# IF_MAIN=enp0s3 Code:
# export OVPN=tun0 Thank you. |
No expert but I think you can configure OpenVPN to use TOR as a socks proxy.
Tor configuration add/modify SOCKSPort XXXX PreferSOCKSNoAuth (where XXXX is the desired port number) Add to the open client configuration socks-proxy localhost XXXX (Where XXXX is the port used above) |
Quote:
Thank you so much for your reply. I just want to know are the second iptables rules enough or not? |
I am not an expert...
I don't think there would be any changes to the rules. Tor would only be running on the client not the server. The OpenVPN traffic at the server should be no different with or without TOR. When it leaves at the exit relay traffic should just be the "normal" tunnel. Once Tor is "on" on the client OpenVPN traffic should automatically be routed through the socks proxy on the client and travel through until it hits the exit relay. Once it exits it again should be just the OpenVPN tunnel. |
Quote:
Thanks again. So are both rules needed? |
Which rules are you asking about?
|
Quote:
Are the following rules enough? Code:
# export OVPN=tun0 |
On the vpn server side I don't think you need to change any rules at all.
On the client side configure the VPN to use the tor proxy as posted above. No special iptables rules are necessary. As I understand how it works. Unless you have a tor server also running on the vpn server. |
Quote:
Thanks again. Yes, the Tor is running on the OpenVPN server. |
All times are GMT -5. The time now is 12:00 PM. |