💾 Archived View for uscoffings.net › writing › 20130731-vpn-over-pptp.gmi captured on 2022-06-03 at 23:39:14. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
[date: 2013-07-31]
At work, we do VPN with PPTP.
Since I have never before set up PPTP from Linux, I figured I would do it the "easy" way and install the NetworkManager plugin. However, that drug in some GNOME dependencies. (I normally use XFCE.) Worse, the NetworkManager plugin wasn't showing up on the XFCE panel, so I installed the entire GNOME desktop in hopes of making it show up. Wow... 400 MB of fat.
After logging in to GNOME, configuring my VPN in NetworkManager, and clicking on it in the drop-down, ... precisely nothing appeared to happen. After trying many things, I rebooted in frustration, and then the NetworkManager plugin was available to my XFCE panel also, so I tried that too. Still no feedback at all, and no VPN was configured.
After some searching, I learned about the NetworkManager command line tool, `nmcli`. With it, I could try to start the VPN, and hopefully see any error messages. Here's what I got:
$ nmcli con up id myvpn Error: No suitable device found: no active connection or device.
As it turns out, NetworkManager cannot start a VPN on a connection it does not "own". This is a known limitation. And yes, my wired and wireless configurations are hard-coded in `/etc`. That works well for me, and I'd rather not change it.
Rather than reconfiguring all my networking via NetworkManager (and possibly keeping all the GNOME packages), I decided to learn what's really going on. Ends up, this is all I needed to configure my VPN:
$ pptpsetup --create MyVpn --server vpn.mycompany.com --username My.Name --password SuperSecret --encrypt --start $ ip route add 10.0.0.0/8 dev ppp0
I've wrapped this up in some nice start/stop shell scripts. Lovely.