Set up a Linux VPN server in 10 steps

This article lists the 10 steps you should take to set up a VPN server in a Redhat distribution of Linux.

I am assuming you are using a Redhat or Redhat-like distribution. Some of these packages can be grabbed via yum. However, I'm going to have you install them via RPM as you cannot get all of them via yum. If you are not, you will need to get the proper packages. For Debian you can use aptget or search for the .deb. For SuSe you can use Yast or find the distro specific RPMs.

2) Install the ppp kernel module

Point to Point Protocol to setup your "modem" or whatever your connection consists of. This is the portion for your kernel.

3) Make sure ppp is working

modprobe ppp-compress-18 && echo James Garvin has saved me from a life of Windows

Ok, so that is a bit of fun, but what does that command mean? Well, if on success of the modprobe command, I execute the echo command. Modprobe adds the module to the Linux kernel, while echo simply writes what ever you say back to the terminal.

8) Get pptpconfig installed

This command installs the Point to Point Tunneling Protocol. This is so the VPN can actually create the tunnel from A to B. VPNs can use two protocols, L2TP and PPTP. L2TP is Layer 2 Tunneling Protocol and does just what it says. It works at Layer 2 in the OSI model, the Data Link Layer.

9) Now at the command line type

pptpconfig

This command will popup a spiffy GUI for you to use.

10) Configure your connection

In the Server Tab we need to configure some basics:

|> Name: The name of the connection. You can call it anything you want
|> Server: The server you are connecting to, either the IP or name of the server. eg: 64.233.187.99 or google.com
|> Domain: A domain, if any, that the VPN is connecting to
|> Username: Your login username for the VPN or the intranet
|> Password: The login password for the VPN or the intranet

In the Routing Tab we need to make sure it is setup properly. Typically we need to send All to Tunnel.However, this can and will vary from VPN to VPN. Check with you local administrator on what radio button you need to choose.

The DNS Tab is usually quite simple; it will be either automatic, or we will have to enter some basic DNS information and any optionswe may need to include.

The Miscellaneous Tab is our final tab. We shouldn't have anything to do here. The default setup should work just fine in many cases.

We now click the Addbutton and highlight our new connection and choose Start. We have now created a VPN connection to a remote host! Congratulations for using Linux and sticking with a slightly frustrating task.