Note: This depends on the Linux xl2tpd package which may or may not be in your distribution's repositories.
- Ensure the following kernel options are set or the corresponding modules are available:
CONFIG_PPPOL2TP
CONFIG_L2TP
- Install xl2tpd on your Linux box. On Ubuntu and Debian, you can use
sudo apt-get install xl2tpd
. - Edit
/etc/xl2tpd/xl2tpd.conf
to contain the following (adjust to suit):[lac fourplex]
lns = nyc.vpn.fourplex.net
require authentication = no
pppoptfile = /etc/ppp/options.fourplex - Create
/etc/ppp/options.fourplex
containing the following (obviously change the name and password to match your L2TP login details):+ipv6
ipv6cp-use-ipaddr
name username
password password
noauth
Replaceusername and password with your L2TP username and password
- Start the xl2tpd service:
systemctl start xl2tpd
Tell the daemon to connect to Fourplex:
echo "c fourplex" > /var/run/xl2tpd/l2tp-control
Note: if
systemctl
doesn't start xl2tpd, you can try manually:
xl2tpd -D
and then restart step 6.
To make it permanent edit /etc/crontab
and add the following:
@reboot root bash -c "xl2tpd -D &"
@reboot root bash -c "sleep 5 && echo 'c fourplex' > /var/run/xl2tpd/l2tp-control"