Skip to content

Instantly share code, notes, and snippets.

@jhburns
Last active September 4, 2019 01:43
Show Gist options
  • Save jhburns/f35cad43ac49f8d1b86fa8cd6fde74f7 to your computer and use it in GitHub Desktop.
Save jhburns/f35cad43ac49f8d1b86fa8cd6fde74f7 to your computer and use it in GitHub Desktop.

Chapman VPN Setup Debian

Make sure to replace anything in square brackets, [], with your values and remove the brackets.

Install

Run sudo apt install pptp-linux, and select 'Y' (press enter) at the prompt. This tutorial is using version 1.9.0 of pptp and release 18.04 of Ubuntu.

Check Config

The file /etc/ppp/options.pptp should have default values, including the following:

  • lock
  • noauth
  • nobsdcomp
  • nodeflate

Create Secrets File

In the /etc/ppp/ directory create/append to a file called chap-secrets with the following contents:

CHAPMANEDU\\[YOUR USERNAME] PPTP [YOUR PASSWORD] *

This can be done while in the /etc/ppp/ directory with the following command:

echo "CHAPMANEDU\\\\[YOUR USERNAME] PPTP [YOUR PASSWORD] *" | sudo tee -a chap-secrets

Create Peer File

In the /etc/ppp/peers/ directory create a file called svpn.chapman.edu with the following contents:

pty "pptp svpn.chapman.edu --nolaunchpppd"
name CHAPMANEDU\\[YOUR USERNAME]
remotename PPTP
require-mppe-128
file /etc/ppp/options.pptp
defaultroute
replacedefaultroute
ipparam svpn.chapman.edu

Testing The Connection

Start the VPN with sudo pon svpn.chapman.edu debug dump logfd 2 nodetach to test if it can connect. Use Ctrl+C to stop it while running. You can know it likely succeeded if the output contains status = 0x0.

Running in Background

To run the VPN in the background, start it with sudo pon svpn.chapman.edu and stop it with sudo poff svpn.chapman.edu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment