Today I setup a VPN server for my house, and here’s how it’s done. I’ll assume you already have an Ubuntu box setup. If not, head to Ubuntu.com and download the server, and set it up however you want. If you need help, hit me up at http://forum.thesmileyking.com
sudo apt-get install pptpd
Let that install and then run this command to edit the configuration:
sudo pico /etc/pptpd.conf
################################################ $Id: pptpd.conf 4255 2004-10-03 18:44:00Z rene $
#
# Sample Poptop configuration file /etc/pptpd.conf
#
# Changes are effective when pptpd is restarted.
################################################ TAG: ppp
# Path to the pppd program, default ‘/usr/sbin/pppd’ on Linux
#
#ppp /usr/sbin/pppd# TAG: option
# Specifies the location of the PPP options file.
# By default PPP looks in ‘/etc/ppp/options’
#
option /etc/ppp/pptpd-options# TAG: debug
# Turns on (more) debugging to syslog
#
#debug# TAG: stimeout
# Specifies timeout (in seconds) on starting ctrl connection
#
# stimeout 10# TAG: noipparam
IP address to PPP, which is
# Suppress the passing of the client’s
# done by default otherwise.
#
#noipparam# TAG: logwtmp
# Use wtmp(5) to record client connections and disconnections.
#
logwtmp# TAG: bcrelay
# Turns on broadcast relay to clients from interface
#
#bcrelay eth1# TAG: localip
# TAG: remoteip
# Specifies the local and remote IP address ranges.
#
# Any addresses work as long as the local machine takes care of the
# routing. But if you want to use MS-Windows networking, you should
# use IP addresses out of the LAN address space and use the proxyarp
# option in the pppd options file, or run bcrelay.
#
# You can specify single IP addresses seperated by commas or you can
# specify ranges, or both. For example:
#
# 192.168.0.234,192.168.0.245-249,192.168.0.254
#
# IMPORTANT RESTRICTIONS:
#
# 1. No spaces are permitted between commas or within addresses.
#
# 2. If you give more IP addresses than MAX_CONNECTIONS, it will
# start at the beginning of the list and go until it gets
# MAX_CONNECTIONS IPs. Others will be ignored.
#
# 3. No shortcuts in ranges! ie. 234-8 does not mean 234 to 238,
# you must type 234-238 if you mean this.
#
# 4. If you give a single localIP, that’s ok – all local IPs will
# be set to the given one. You MUST still give at least one remote
# IP for each simultaneous client.
#
# (Recommended)
#localip 192.168.0.1
#remoteip 192.168.0.234-238,192.168.0.245
# or
localip 192.168.101.1
remoteip 192.168.101.200-245
ipconfig
sudo pico /etc/ppp/chap-secrets
# Secrets for authentication using CHAP# client server secret IP addressescrimm pptpd password *
- crimm = Username
- PPTPD = Is our daemon
- password = This is the user’s password
- * = Where the user can connect from. If set to * it means from anywhere.
sudo /etc/init.d/pptpd restart
Now we have to configure MPPE encrpytion or else all your information will be in plain text. Run this command to load the module (This information comes from this link)
sudo modprobe ppp-compress-18
sudo /etc/init.d/pptpd start
sudo pico /var/log/syslog
sudo pico /etc/pptpd.conf
sudo killall pptpd
sudo pptpd
telnet 127.0.0.1 1723
sudo pico /var/log/syslog
- Go to your network connections
- Add a network connection
- Click next
- Choose “Connect to the network at my workplace” and choose next
- Choose “Virtual Private Network Connection” and choose next
- Give it a name and choose next
- (If you have other connections) choose Do not dial and hit next
- Put in the IP address of the server you are connecting to and hit next
- Click Finish
- Right click the new connection and click properties
- Go to the security tab and click the radio button for Advanced.
- Click the settings button
- Drop down the box for Data encryption and set to Maximum strength encryption
- Make sure that MS-CHAP is UNCHECKED
- Make sure that MS-CHAP-v2 is CHECKED
- Go to networking tab and choose type of VPN to be PPTP VPN
- Choose Properties on TCP/IP
- Click Advanced button at the bottom
- Untick the box that says: “Use default gateway on remote network” (Screenshot)
- Error 800: Make sure the daemon is started and the ports are open
- Error 741: LINK – Right click the new connection and click properties – Go to security tab -> Advanced button -> Settings. Disable require connection. If it connects okay, then the PPTP server is not requiring encryption. **You do NOT want to leave it without encryption! Go back above through the steps for loading the MPPE module!**
- Error 619: Make sure that you disabled logwtmp above and make sure your Windows XP settings are all correct as above.
- Also remember that if you are having trouble connecting remotely, check your firewall settings (Link to port information below) and if it’s not working locally check your iptables (Link below).
- Here’s a good website for assistance: http://pptpclient.sourceforge.net/howto-diagnosis.phtml