3

I have an OpenVPN server and I want to be able to route all requests that are made to that OpenVPN server through a proxy, so that the requests will look like they are made be the internet address of the proxy. For example, a normal request looks like this:

request -> openvpn -> send data back to user with the IP of the machine

When I want it to go through TOR or a proxy:

request -> openvpn -> tor or proxy -> send data back to user with the IP of the proxy

Is this possible? If so, how can I do it?

1 Answer 1

0

For this, I'm assuming that you have installed tor using apt-get install tor and not using the TOR browser bundle.

  1. Add this line to the /etc/tor/torrc file to tunnel VPN traffic:

    SocksPort 9150 PreferSOCKSNoAuth
    
  2. Then you will need to tell OpenVPN to use a proxy. Add this to your VPN config file:

     socks-proxy localhost 9150
     socks-proxy-retry
    
  3. Restart tor:

    sudo service tor restart
    
  4. Now you should be able to run OpenVPN AFTER tor has established a connection to the TOR network.

    sudo openvpn --config path/to/vpn/config/file
    
3
  • This doesn't work for me, I'm portsharing 443 (on 4433) with nginx and when I add those two lines to the OVPN config everything fails. Any ideas appreciated.
    – donkey
    Jul 26, 2016 at 12:14
  • Are you supposed to put the socks-proxy lines in the server side or client side config file?
    – bcmcfc
    Jan 16, 2017 at 17:58
  • This is configuring the client? The question asks for server.
    – S. C.
    Mar 6 at 23:05

You must log in to answer this question.