devroom.io/drafts/2010-10-11-setup-a-ubuntu-vpn-server.md

48 lines
1.6 KiB
Markdown
Raw Normal View History

2013-03-22 22:53:57 +00:00
---
title: "Setup a Ubuntu VPN server"
kind: article
slug: setup-a-ubuntu-vpn-server
created_at: 2010-10-11
tags:
- Linux
- Ubuntu
- vpn
---
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][1]
_Note: This was tested on Ubuntu 10.10-amd64_
[1]: http://ariejan.net/2010/10/12/setup-a-pptp-vpn-connection-on-mac-os-x-snow-leopard/