Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have root access on a server and I can access my server through ssh and my server and my laptop run ubuntu. What's the easiest way to setup vpn server/client such that when I connect the vpn all of internet connections go through the server?

share|improve this question
  1. If you just want to tunnel HTTP traffic through the VPN, one of the easiest solutions would be:

    • Set up a Squid proxy on the server and configure it to accept only connections from localhost. See this article from Ubuntu community wiki.
    • On the client: tunnel the remote proxy port (by default 3128) to a local port through ssh:

      ssh -L 3128:localhost:3128 PROXYSERVERNAME

    • Configure your browser to use localhost:3128 as a proxy
  2. If you want all of your traffic to go through the VPN, a solution would be to setup OpenVPN on the server side and the use the OpenVPN Network Manager Plugin on the client to setup a connection to the server. By default, OpenVPN configured through the NetworkManager tries to tunnel all traffic through the VPN. See another article from Ubuntu community wiki.

share|improve this answer
up vote 0 down vote accepted

I found shadowproxy super easy to use They have clients for a variety of operating systems as well.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.