Ubuntu – Easiest way to setup Ubuntu as a VPN server


I know there are many tutorials on the net for setting up VPN client and server.

I you find one that is simple/short, I am interested only in the server part.

For client, I will use OS X so I prefer a solution that uses L2TP over IPsec or PPTP because I suppose Cisco IPsec would cost something.

I don't want to spent too many hours setting it up. You know, maybe someone already made a setup script 🙂

Note: I am using an EC2 micro instance running Ubuntu 12.04 on it.

Best Answer

UPDATE: As of Sierra, macOS no longer supports PPTP vpn. This answer is not valid for macOS clients Sierra and beyond.

PPTP via PoPToP is easy

  1. apt-get install pptpd
  2. edit /etc/pptpd.conf and set the remoteip option to a range on your network that is NOT served by your DHCP server.
  3. edit /etc/ppp/chap-secrets and add a username and password


vpnuser pptpd vpnpassword *

This is all it takes to setup pptp. Now test it with your OS X client.

Related Question