With a PPTP server, you can set up a VPN server easily. Having a virtual private network is beneficial to both individual users and businesses alike.
This tutorial explains how you can install a PPTP server on Ubuntu. The steps are generic; they should apply to almost all versions of Ubuntu.
Please note that security vulnerabilities have been found in the PPTP protocol, and it may be worth evaluating other VPN protocols before utilizing PPTP.
The first thing that we need to do is, naturally, install PPTPD.
apt-get install pptpdIs installing PPTPD that easy? Now we need to set up the PPTP server.
We don’t want everyone to be able to access our VPN, of course, so you can create users so that only the users with the correct password will be able to access your VPN. To add users, edit the file:
/etc/ppp/chap-secretsThe format is:
[username] [service] [password] [ip]Username and password are pretty straightforward, service and IP are not, though. Service is usually pptpd. If you just want to set up a VPN, use PPTP For the service, it will work. If you want to restrict the IP from which a user can log in, you can use his/her IP. If you want connections from that account to be made from all IPs, you can use *.
There are a few things that we need to edit. Start by editing the following file:
/etc/pptpd.confLook for the localip and remoteip settings. Remove the # (comment character) for both so that these settings will be recognized. Change localip to your server IP. If you don’t know your server IP, you may look in the AKLWEB HOST control panel.
The remoteip It is basically the IP range that clients (computers that are connected to your VPN) will be assigned. For example, if you want the following IP range: 192.168.120.231-235, your VPN server will be able to assign 192.168.120.232, 192.168.120.233, 192.168.120.234, and 192.168.120.235 to clients. It’s up to you what you want to use for this field.
Find the line net.ipv4.ip_forward in the sysctl.conf file. We need to uncomment this line, so open the following file:
/etc/sysctl.confMake sure that it says net.ipv4.ip_forward=1, and not net.ipv4.ip_forward=0.
At this point, everything will work. Restart PPTPD.
service pptpd restartCongratulations, you now have a PPTP server!
Mac OS X
Using a VPN on Mac OS X is very easy.
Go to System Preferences -> Network. Click on the + icon and choose VPN as the interface. The name can be anything you want, for example, VPN. The VPN type is PPTP. Click “Create”. You will now see some settings: the server address and username. These are the credentials you have entered in the /etc/ppp/chap-secrets file.
Now, click on Authentication Settings. Choose Password and enter the password. Click OK, then click Connect.
Your computer will now connect to your VPN server. Internet traffic will be sent over the VPN server.
Windows 8
In Windows 8, setting up a VPN is pretty easy as well. The first thing you are going to do is go to the Start menu and type VPN. You should see Set up a virtual private network (VPN) connection. Click on that.
The internet address is your server's IP. The destination name can be anything you would like, such as VPN. Click Next. Windows will now ask for your credentials; enter the username and password you have entered in the /etc/ppp/chap-secrets file. Click Connect.
Windows will now connect to your VPN server and start sending traffic over it.