L2TP tunnel notes

Published: Monday, Aug 15, 2016 Last modified: Monday, Apr 8, 2024

Assuming you have correctly setup the configuration like so:


journalctl -u xl2tpd -f

Now start xl2tpd which does the tunneling.

Then establish the tunnel:

# echo "c myisp" > /var/run/xl2tpd/l2tp-control

The point to point ppp0 interface should come up. Now we need to route traffic through it, but make sure we don’t disrupt the existing network to the tunnel. Lets assume we connect to the tunnel by connecting to the IP address of

enp0s31f6 is the unique name of my wired interface.

ip route add via dev enp0s31f6

We are telling to get to, we need to go through our normal router’s route of

Now for all other traffic, say the IP address you pop out of is, we set a new route to say all or “default” traffic gets tunneled through it, like so:

ip route add default via dev ppp0