Linux – L2TP over IPSec VPN on Fedora 21

fedoral2tplinuxvpn

I need to connect a Linux Fedora 21 desktop to a L2TP over IPSec VPN. I was given a set of instructions for how to do so on a MAC as that is what they use but I have been unable to do so on Fedora. Here are the instructions I was given:

  1. Open System Preferences
  2. In the bottom left pane, click the +
  3. Select VPN as the interface type
  4. Select L2TP over IPSec as the VPN Type
  5. Set the service name to "Some company name"
  6. Set the server address to: x.x.x.x
  7. Account Name: xxxusername
  8. Password: xxxpassword
  9. Shared secret: xxxsharedsecret

Now I've searched a bunch for this but nothing I have tried has worked yet.

In particular I have the following package installed via yum:

NetworkManager-l2tp.x86_64

In the Network Manager GUI I created the VPN connection via:

  1. Add Network Connection
  2. VPN
  3. L2TP…
  4. Settings:
    1. Name: "Some company name"
    2. Gateway: x.x.x.x
    3. Username: xxxusername
    4. Password: xxxpassword
    5. NT Domain: blank
    6. Firewall Zone: Default
    7. Not available to other users
  5. Then IPSec Settings:
    1. Checked Enable IPSec…
    2. Group Name: "Some company name"
    3. Gateway Id: blank
    4. pre-shared key: xxxsharedkey

Any ideas what I am doing wrong and why I can't connect? One thing to note which I don't think is a problem is the company name string does have a space in it.

Double props to whomever has a solution which allows me to connect that's just via the command line/editing text files as well.

Best Answer

There is a very detailed cookbook guide in this article : L2TP/IPSec VPN client on Fedora.
It is even pretty recent, from October 1, 2014.

It lists the packages to install :

libreswan
xl2tpd

And the files that require editing :

/etc/ipsec.d/desired_vpn_name.conf
/etc/ipsec.d/desired_vpn_name.secrets
/etc/xl2tpd/xl2tpd.conf
/etc/ppp/options.xl2tpd.VPN_CONNECTION_NAME
/var/run/xl2tpd/l2tp-control

(The article is pretty much to the point, so no reason to reproduce it here entirely.)

Related Question