VyprVPN's PPTP under Linux - the command-line way

2010-04-21

So I just got an account with vyprvpn and it’s pretty good… I have tunnels set up on my phone, laptops and desktops – everywhere but my Linux machine. I don’t use any of that network manager nonsense so I’ve got to do it through the commandline. It was a little intimidating to start with but fairly easy in the end.

These instructions are for Ubuntu 9.10. They show how to connect to the VyprVPN European servers… to use others, simply replace “eu1.vpn.giganews.com” with “us1.vpn.giganews.com” or “us2.vpn.giganews.com” as you wish.

(as root)

    # apt-get install pptp-linux pptpd
    # cd /etc/ppp/peers
    # vim eu (or open it using your preferred text editor)

Put the following in the file:

    pty "pptp eu1.vpn.giganews.com --nolaunchpppd"
    lock
    noauth
    nobsdcomp
    nodeflate
    name (your username)
    remotename eu
    ipparam eu
    require-mppe-128
    usepeerdns
    defaultroute
    persist

Next it’s simply a matter of setting up your password. To do this:

    # cd /etc/ppp/
    # vim chap-secrets

Put the following in the file:

    (your username) eu1 "(your password)" *

Finally you can connect to VyprVPN with the “pon” and disconnect from it using the “poff” command:

    #pon eu
    (wait a little while)
    #ifconfig ppp0
    ppp0 Link encap:Point-to-Point Protocol
    inet addr:x.x.x.x P-t-P:x.x.x.x Mask:255.255.255.255
    UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1396 Metric:1
    RX packets:6 errors:0 dropped:0 overruns:0 frame:0
    TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:3
    RX bytes:84 (84.0 B) TX bytes:102 (102.0 B)

You should also see the default route has changed to route through your VPN. I’ve not resolved how to neatly switch the default route back once the VPN is disabled so when I want to terminate the VPN link I have the following commands:

    # poff
    # ip route add default dev eth0 (where eth0 is my default network connection)