UndergroundVPN Command Line Setup in Linux CentOS (PPTP)

This handy how-to guide will help you get UndergroundVPN set up on the CentOS Linux distribution using the PPTP protocol via the command line interface.

  1. Run the following commands:

sudo yum update
sudo yum install pptp
sudo modprobe nf_conntrack_pptp
sudo modprobe ppp_mppe

  1. Run sudo nano/etc/ppp/chap-secrets to edit the chap-secrets file as shown below:


Press CTRL+O to save the file, and CTRL+X to exit the editor.

  1. To create a UndergroundVPN file, run sudo nano/etc/ppp/peers/undergroundvpn and enter the following information:

pty “pptp us1.undergroundvpn.net –nolaunchpppd”
name yourVPNusername
remotename PPTP
file /etc/ppp/options.pptp
ipparam undergroundvpn

To save the file, press CTRL+O.  To exit the editor, press CTRL+X. Please note that we have currently used us1.undergroundvpn.net as the server address. You can choose any server of your choice. The list of servers is available here

  1. Run the command: sudo nano/etc/ppp/options.pptp. Be sure there is no ‘#’ sign before these lines.


Once this is done, Press CTRL+X to exit.

  1. Run sudo nano /etc/ppp/ip-up.localand add the following line. By doing so, it will set the default route to ppp0.

/sbin/route add default ppp0

To save the file, press CTRL+O. To exit the editor, press CTRL+X.

  1. In order to execute the file, run: sudo chmod 755 /etc/ppp/ip-up.local
  2. Connect to the VPN by running sudo pppd call undergroundvpn
  3. Run curl ipinfo.io to check the accuracy of your VPN IP and location.
  4. To disconnect the VPN, run sudo pkill pppd
  5. If you are unable to connect, please check your connection logs by running sudo cat /var/log/messages | grep pppd