I worked from home yesterday for the first time since getting Linux Mint 16 installed on my new laptop. That meant I spent all of yesterday morning figuring out how to get the VPN connection to my office working. I ended up having multiple problems throughout the process, and none of the guides I found were definitive or included all the steps required for resolving the entire issue. I’m recording this for posterity, in hopes that people will be able to find it and won’t have to dig through multiple sources just to get stuck on the next issue down the chain.
Step One: Setting Up the Connection
Linux Mint has a built in network manager which is pretty good. I opened that up, and it had an option to add a VPN. This process was easy, so I won’t bother with any additional information here; I just filled out the form.
Step Two: Click the Button, Nothing Happens
After I (thought I) configured the VPN using the GUI Network Manager, I clicked the button to turn on the VPN connection. The button stayed in the “on” position, but nothing was actually happening. After digging through
/var/log/syslog I found the following error:
Failed to request VPN secrets #2: (6) No agents were available for this request.
Apparently, I didn’t have the right something or other installed. I found a post that suggested I install the following packages:
network-manager-openvpn-gnome network-manager-openvpn openvpn openvpn-blacklist
I wasn’t using openvpn, but I installed them anyway. This got me slightly farther in the process. The button still wasn’t doing anything, but the error in
Step Three: Failing to Authenticate
Now the error was:
Error: Connection activation failed: no valid VPN secrets.
It turns out that the GUI didn’t remember my password, even though I told it to. I found the solution to this problem here. I’m going to reiterate what from that link I did, in case that link ever goes away. I opened
/etc/NetworkManager/system connections/ConnectionName [where “ConnectionName” was actually the name I gave the VPN connection when I created it in Step One], and changed the line:
Then, in a new section below the one the
password-flags setting was in (denoted by [square brackets]), I added these two lines:
[Where “YourPassword” was changed to my actual VPN password.]
Step Four: Authenticating, But Failing to Peer
I still didn’t have a working VPN, but I moved the needle. Now I was getting this error in
LCP terminated by peer (MPPE required but peer negotiation failed)
Using this link and a couple of others, and poking around on my own, I added the following lines to the bottom of the file
After that, I was able to connect to the VPN successfully, using the Network Manager GUI and the On/Off button to my heart’s content.
It’s worth noting that Linux Mint is based on Ubuntu which is in turn based on Debian, and Cinnamon, Mint’s desktop environment, is based on Gnome 3. I hope this means that if you are using any of them mentioned distros with either of the mentioned desktop environments, this will work.