How to set up PPTP on Linux easily

How to set up PPTP on Linux easily

This short tutorial helps you set up a PPTP VPN connection on your Linux machine. It is well-known that PPTP is not a secure protocol. However, there are still options to set up PPTP on Linux. But, if you can, you should switch to an alternative VPN protocol.

PPTP VPN setup on Linux [Summary]

Setting up PPTP on Linux is easy and several options are available:

Additionally, you may consider a more general solution to set PPTP on your router and connect all your devices in need of using the encrypted tunnel (including your Linux machines) to the router.

What is PPTP and when to use it on Linux?

The Microsoft Point-to-Point Tunneling Protocol (PPTP) is outdated and insecure. However, it may still be useful for hiding your IP address and changing your location when no sensitive data is involved, such as unblocking streaming channels or accessing gaming servers.

PPTP became popular due to its speed and simplicity. However, due to security vulnerabilities exposed by various parties, PPTP is no longer seen as suitable for securing VPN tunnels.

PPTP can no longer be set up on iOS; on Mac, you need to use some workarounds, but you may still use PPTP on Windows, to create PPTP tunnels on Android, and, of course, on Linux. Again, make sure you use PPTP only when you are comfortable with a weakly secured VPN tunnel.

How to set up PPTP VPN on Linux

There are several options to set PPTP on Linux, from the simplest by installing a VPN (Virtual Private Network) app to the more complicated by using the command line. Here are the available options.

Use the Network Manager (GUI)

Setting up a PPTP connection using the graphical interface is similar for various Linux distributions, and it is a simple way to proceed. I am going to exemplify the setup on Ubuntu GNU/Linux (v20):

  1. Open the Settings app.
  2. Click on the Network connections panel from the left menu.
  3. Click the “+” (Add) button next to VPN.Setup PPTP Linux (GUI) - Add VPN
  4. From the Add VPN window, choose Point-to-Point Tunneling Protocol (PPTP).Setup PPTP on Linux (GUI) - Choose PPTP
  5. Fill in the connection Name (whatever you want), the server IP or hostname (Gateway), the username, and the password of your VPN account (optional).Setup PPTP on Linux (GUI) - Fill in connection details
  6. Click on the Advanced button and check Use Point-to-Point encryption (MPPE).Setup PPTP on Linux (GUI) - Advanced PPTP Options
  7. Click OKand then Save.
  8. Switch ON the PPTP connection you have just set up. Setup PPTP on Linux (GUI) - Switch on VPN
  9. Once you are connected to the VPN, you will see a lock icon on the network icon from the top-right on the screen. You may also connect/disconnect from the network menu. Setup PPTP on Linux (GUI) - Network menu

Use the command line (CLI)

Most Linux distributions install the PPTP client by default. However, if not present, you may install it as follows:

  • On Debian/Ubuntu, by using the apt-get command (pptp-linux is the command-line PPTP client and network-manager-pptp is the GUI management tool):
$ sudo apt-get install pptp-linux network-manager-pptp
  • On Fedora/CentOS, by running the yum command (check the PPTP client docs for other distros):
# rpm -Uvh
# yum --enablerepo=pptp-stable install pptpconfig

Next, you need to edit or create the configuration files:

  • The CHAP secrets file (/etc/ppp/chap-secrets) for authenticating the user to the VPN channel.
  • The VPN connection config file (/etc/ppp/peers/vpnname) to add connection-related info such as the VPN server name, encryption settings, etc.

Suppose that you want to connect to a PPTP server with the following connection data (you will need to fill in your own data):

  • PPTP VPN server name:
  • PPTP username: anonymousbat
  • PPTP password: whoiam

Proceed with the following steps:

  • Edit the CHAP secrets file:
# sudo vi /etc/ppp/chap-secrets

The syntax for the authentication info using CHAP is:

DOMAIN\\username      PPTP      vpnpassword     *

Thus, you need to enter something similar to:

anonymousbat      PPTP      whoiam     *

Save and close the chap-secrets file.

  • Create a file that contains the tunnel configuration data (where pptp-us1 is the name you will use to connect to the VPN):
# vi /etc/ppp/peers/pptp-us1
  • Append the config file with the following commands and options:
pty "pptp --nolaunchpppd"
name anonymousbat
remotename PPTP
file /etc/ppp/options.pptp
ipparam pptp-us1

Note that you need to replace the VPN server name (, VPN username (anonymousbat), connection file name (pptp-us1) with your own data.

  • Finally, you need to route all the traffic through the VPN interface. An entry must be added to the routing table.

Create the following file:

# vi /etc/ppp/ip-up.d/vpn-traffic

And, add the code:

route add -net dev ppp0

Save and close. Make the file vpn-traffic executable:

chmod +x /etc/ppp/ip-up.d/vpn-traffic
  • Now, you are ready to connect to the encrypted tunnel:
pppd call pptp-us1
  • To disable the VPN stop the pppd process:
killall pppd

You may create a separate configuration file for every VPN server you want to connect to and initiate the PPTP connection as needed.

Install a Linux VPN client app

If you are looking for a VPN client on Linux similar to the easy-to-use and friendly VPN apps available on Windows or macOS, you will be disappointed.

Major VPN providers have retired their PPTP clients for all operating systems. For example, had a PPTP client app for Linux but discontinued it at the end of 2019.

Thus, theoretically, you may still find VPN services that offer VPN client apps for Linux with the PPTP protocol. But I strongly recommend that you don’t use them. Instead, set up a manual connection (as explained above, if you really have to) or switch to a more secure protocol (check the alternatives listed below).

PPTP VPN alternatives on Linux

PPTP is not the protocol that you want to use to secure your VPN connections. Other VPN protocols are safer and more reliable, and you should use them on Linux:


You may still set PPTP up on Linux. Even though it is seen as a legacy VPN protocol, there are still options to use PPTP from the command line or using the Network manager graphical interface.

Would you like to know more about VPN? Subscribe to our newsletter! It will make a Transylvanian baby-bat 🦇happy.

About the Author

Leave a Reply

Your email address will not be published. Required fields are marked *

Vilfo VPN router - Banner
Up Next:

Vilfo review: Hands-on with an impressive VPN router

Vilfo review: Hands-on with an impressive VPN router