Skip to main content

Setup a Ubuntu VPN server

·216 words·2 mins· ·
Linux Ubuntu Vpn
Ariejan de Vroom
Author
Ariejan de Vroom
Jack of all Trades, Professional Software Craftsman

I recently installed Ubuntu Linux on a home server (I hate that word, but it best describes what it is, so). Anyway, I’d like to be able to create a VPN network between my home server and my MacbookPro, which might be anywhere in the world.

This first part of the tutorial describes how to setup a VPN server in Ubuntu. ~ First, install the pptpd package. pptpd offers a PPTP-type VPN which is supported by Microsoft and other network vendors. This is also the easiest to setup.

sudo apt-get install pptpd

Next up, edit /etc/pptpd.conf with sudo vi /etc/pptp.conf. At the bottom add the following lines:

localip 192.168.1.10
remoteip 192.168.1.230-239

Here localip references the IP of my home server. The remoteip variable configures which IPs remote clients may use when the connect through VPN to my network. In this case I reserve 10 IP address: 192.168.1.230 through 192.168.1.239.

With that out of the way, let’s tell PPTP which users to allow. Edit /etc/ppp/chap-secrets, just like you did before using sudo.

# client    server  secret          IP Address
ariejan     pptpd   somepassword    *

That’s all! Yes, seriously. Just restart the pptpd daemon and you’re good to go.

Now, go and watch my PPTP VPN setup for Mac OS X Snow Leopard

Note: This was tested on Ubuntu 10.10-amd64

Related

Rails production server setup and deployment on Ubuntu/Debian
·1516 words·8 mins
General RubyOnRails Features Linux Ubuntu
Coming up: Ubuntu Development Server Guide
·93 words·1 min
General Blog Web Development Linux Ubuntu Subversion
Trac, WebAdmin plugin and global configuration
·383 words·2 mins
General Features Linux Ubuntu Trac