L2TP Client: Linux: Difference between revisions

Back up to the Incoming L2TP Category
From AAISP Support Site
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
[[Category:Incoming L2TP]]
[[Category:Incoming L2TP]]


See further below for GUI / Ubuntu / Network Manager instructions
See further below for CLI based xl2tpd manual instructions

== Linux / xl2tpd ==

<ol>
<li>Ensure the following kernel options are set or the corresponding modules are available:</li>
<ol>
<li><code>CONFIG_PPPOL2TP</code>
<li><code>CONFIG_L2TP</code>
</ol>
<li>Install xl2tpd and pppd on your Linux router.</li>
<li>Edit <code>/etc/xl2tpd/xl2tpd.conf</code> to contain the following (adjust to suit):<br />
<code>[lac aaisp]<br />
lns = l2tp.aaisp.net.uk<br />
require authentication = no<br />
pppoptfile = /etc/ppp/options.aaisp</code></li>
redial = yes
redial timeout = 15
max redials = 9999
autodial = yes
<li>Create <code>/etc/ppp/options.aaisp</code> containing the following (obviously change the name and password to match your L2TP login details):<br />
<code>+ipv6<br />
ipv6cp-use-ipaddr<br />
name xyz@a.X<br />
password Your_xyz@A.X_password<br />
noauth</code></li>
<li>Create the xl2tpd control file:<br />
<code>mkdir -p /var/run/xl2tpd<br />
touch /var/run/xl2tpd/l2tp-control</code></li>
<li>Start the xl2tpd service (for systemd, use service command for older RC systems):<br />
<code>systemctl start xl2tpd</code></li>
<li>Tell the daemon to connect to aaisp:<br />
<code>echo "c aaisp" > /var/run/xl2tpd/l2tp-control</code></li>
</ol>
This should give you a new PPP device which encapsulates the L2TP connection.

== Troubleshooting ==
Logs are written /var/log/daemon.log
If you see "No such tunnel", you might want to try restarting the daemon




=Ubuntu / Network Manager =
=Ubuntu / Network Manager =
Line 73: Line 33:
NetworkManagerL2TP3.png|Connect/disconnect
NetworkManagerL2TP3.png|Connect/disconnect
</gallery>
</gallery>




= Linux / xl2tpd =

<ol>
<li>Ensure the following kernel options are set or the corresponding modules are available:</li>
<ol>
<li><code>CONFIG_PPPOL2TP</code>
<li><code>CONFIG_L2TP</code>
</ol>
<li>Install xl2tpd and pppd on your Linux router.</li>
<li>Edit <code>/etc/xl2tpd/xl2tpd.conf</code> to contain the following (adjust to suit):<br />
<code>[lac aaisp]<br />
lns = l2tp.aaisp.net.uk<br />
require authentication = no<br />
pppoptfile = /etc/ppp/options.aaisp<br />
#redial = yes<br />
#redial timeout = 15<br />
#max redials = 9999<br />
#autodial = yes</code></li>
<li>Create <code>/etc/ppp/options.aaisp</code> containing the following (obviously change the name and password to match your L2TP login details):<br />
<code>+ipv6<br />
ipv6cp-use-ipaddr<br />
name xyz@a.X<br />
password Your_xyz@A.X_password<br />
noauth</code></li>
<li>Create the xl2tpd control file:<br />
<code>mkdir -p /var/run/xl2tpd<br />
touch /var/run/xl2tpd/l2tp-control</code></li>
<li>Start the xl2tpd service (for systemd, use service command for older RC systems):<br />
<code>systemctl start xl2tpd</code></li>
<li>Tell the daemon to connect to aaisp:<br />
<code>echo "c aaisp" > /var/run/xl2tpd/l2tp-control</code></li>
</ol>

*This should give you a new PPP device which encapsulates the L2TP connection.
*You will then need to figure out what you want to route up the tunnel.


=== Troubleshooting ===
Logs are written /var/log/daemon.log
If you see "No such tunnel", you might want to try restarting the daemon

Latest revision as of 22:26, 1 December 2021


See further below for CLI based xl2tpd manual instructions

Ubuntu / Network Manager

If you'd rather not set this all up with the CLI then you can use Network Manager instead.

First, install the packages for the l2tp client and the network manager controls:

apt install xl2tpd network-manager-l2tp network-manager-l2tp-gnome

If the packages are not found, you may need to add some PPA's, eg one or both of these may be required:

sudo add-apt-repository ppa:nm-l2tp/network-manager-l2tp
sudo add-apt-repository universe
sudo apt-get update

Then, using Network Manager, create the L2TP connection:

  1. Add a L2TP connection: (pic below)
    1. Click the Network icon on the task bar
    2. Click Settings
    3. Next to 'VPN', click the + icon
  2. Enter in the settings: (pic below)
    1. Name: anything, eg AAISP
    2. Type: Password
    3. User name: your login we gave you, eg xxx@a.1
    4. Password: the password we gave you
    5. Click Apply
  3. Connect/disconnect via the network icon on the taskbar (pic below)



Linux / xl2tpd

  1. Ensure the following kernel options are set or the corresponding modules are available:
    1. CONFIG_PPPOL2TP
    2. CONFIG_L2TP
  2. Install xl2tpd and pppd on your Linux router.
  3. Edit /etc/xl2tpd/xl2tpd.conf to contain the following (adjust to suit):
    [lac aaisp]
    lns = l2tp.aaisp.net.uk
    require authentication = no
    pppoptfile = /etc/ppp/options.aaisp
    #redial = yes
    #redial timeout = 15
    #max redials = 9999
    #autodial = yes
  4. Create /etc/ppp/options.aaisp containing the following (obviously change the name and password to match your L2TP login details):
    +ipv6
    ipv6cp-use-ipaddr
    name xyz@a.X
    password Your_xyz@A.X_password
    noauth
  5. Create the xl2tpd control file:
    mkdir -p /var/run/xl2tpd
    touch /var/run/xl2tpd/l2tp-control
  6. Start the xl2tpd service (for systemd, use service command for older RC systems):
    systemctl start xl2tpd
  7. Tell the daemon to connect to aaisp:
    echo "c aaisp" > /var/run/xl2tpd/l2tp-control
  • This should give you a new PPP device which encapsulates the L2TP connection.
  • You will then need to figure out what you want to route up the tunnel.


Troubleshooting

Logs are written /var/log/daemon.log If you see "No such tunnel", you might want to try restarting the daemon