From f4ca88a7b02865f6a7edb7cc73d526d78da6456e Mon Sep 17 00:00:00 2001 From: aapostoliuk Date: Fri, 23 Feb 2024 15:27:44 +0200 Subject: [PATCH] Rewritten the PPPoE server documentation Fully rewritten PPPoE server documentation. --- docs/configuration/service/pppoe-server.rst | 590 ++++++++++++++------ 1 file changed, 421 insertions(+), 169 deletions(-) diff --git a/docs/configuration/service/pppoe-server.rst b/docs/configuration/service/pppoe-server.rst index 56fcb968..04113666 100644 --- a/docs/configuration/service/pppoe-server.rst +++ b/docs/configuration/service/pppoe-server.rst @@ -13,13 +13,20 @@ be used with local authentication or a connected RADIUS server. changes/commits will restart the ppp daemon and will reset existing PPPoE connections from connected users, in order to become effective. -Configuration -============= +************************ +Configuring PPPoE Server +************************ +.. code-block:: none -First steps ------------ - + set service pppoe-server access-concentrator PPPoE-Server + set service pppoe-server authentication mode local + set service pppoe-server authentication local-users username test password 'test' + set service pppoe-server client-ip-pool PPPOE-POOL range 192.168.255.2-192.168.255.254 + set service pppoe-server default-pool 'PPPOE-POOL' + set service pppoe-server outside-address 192.0.2.2 + set service pppoe-server gateway-address 192.168.255.1 + set service pppoe-server interface eth0 .. cfgcmd:: set service pppoe-server access-concentrator @@ -28,14 +35,30 @@ First steps .. cfgcmd:: set service pppoe-server authentication mode - Use this command to define whether your PPPoE clients will locally - authenticate in your VyOS system or in RADIUS server. + Set authentication backend. The configured authentication backend is used + for all queries. + + * **radius**: All authentication queries are handled by a configured RADIUS + server. + * **local**: All authentication queries are handled locally. + * **noauth**: Authentication disabled. .. cfgcmd:: set service pppoe-server authentication local-users username password - Use this command to configure the username and the password of a - locally configured user. + Create `` for local authentication on this system. The users password + will be set to ``. + +.. cfgcmd:: set service pppoe-server client-ip-pool range + + Use this command to define the first IP address of a pool of + addresses to be given to pppoe clients. If notation ``x.x.x.x-x.x.x.x``, + it must be within a /24 subnet. If notation ``x.x.x.x/x`` is + used there is possibility to set host/netmask. + +.. cfgcmd:: set service pppoe-server default-pool + + Use this command to define default address pool name. .. cfgcmd:: set service pppoe-server interface @@ -44,124 +67,170 @@ First steps .. cfgcmd:: set service pppoe-server gateway-address
- Use this command to configure the local gateway IP address. - -.. cfgcmd:: set service pppoe-server name-server
- - Use this command to set the IPv4 or IPv6 address of every Doman Name - Server you want to configure. They will be propagated to PPPoE - clients. + Specifies single `` IP address to be used as local address of PPP + interfaces. -Client Address Pools --------------------- +********************************* +Configuring RADIUS authentication +********************************* -To automatically assign the client an IP address as tunnel endpoint, a -client IP pool is needed. The source can be either RADIUS or a -named pool. There is possibility to create multiple named pools. -Each named pool can include only one address range. To use multiple -address ranges configure ``next-pool`` option. - - -**Client IP address via IP range definition** - -.. cfgcmd:: set service pppoe-server client-ip-pool range - - Use this command to define the IP address range to be given - to PPPoE clients. If notation ``x.x.x.x-x.x.x.x``, - it must be within a /24 subnet. If notation ``x.x.x.x/x`` is - used there is possibility to set host/netmask. - -.. cfgcmd:: set service pppoe-server client-ip-pool next-pool - - Use this command to define the next address pool name. - -.. cfgcmd:: set service pppoe-server default-pool - - Use this command to define default address pool name. +To enable RADIUS based authentication, the authentication mode needs to be +changed within the configuration. Previous settings like the local users, still +exists within the configuration, however they are not used if the mode has been +changed from local to radius. Once changed back to local, it will use all local +accounts again. .. code-block:: none - set service pppoe-server client-ip-pool IP-POOL next-pool 'IP-POOL2' - set service pppoe-server client-ip-pool IP-POOL range '10.0.10.5/24' - set service pppoe-server client-ip-pool IP-POOL2 range '10.0.0.10-10.0.0.12' - set service pppoe-server default-pool 'IP-POOL' + set service pppoe-server authentication mode radius +.. cfgcmd:: set service pppoe-server authentication radius server key -**RADIUS based IP pools (Framed-IP-Address)** - -To use a radius server, you need to switch to authentication mode RADIUS -and then configure it. - -.. cfgcmd:: set service pppoe-server authentication radius server
- key - - Use this command to configure the IP address and the shared secret - key of your RADIUS server. You can have multiple RADIUS servers - configured if you wish to achieve redundancy. + Configure RADIUS `` and its required shared `` for + communicating with the RADIUS server. +Since the RADIUS server would be a single point of failure, multiple RADIUS +servers can be setup and will be used subsequentially. +For example: .. code-block:: none - set service pppoe-server access-concentrator 'ACN' - set service pppoe-server authentication mode 'radius' - set service pppoe-server authentication radius server 10.1.100.1 key 'secret' - set service pppoe-server interface 'eth1' - set service pppoe-server gateway-address '10.1.1.2' + set service pppoe-server authentication radius server 10.0.0.1 key 'foo' + set service pppoe-server authentication radius server 10.0.0.2 key 'foo' -RADIUS provides the IP addresses in the example above via -Framed-IP-Address. +.. note:: Some RADIUS severs use an access control list which allows or denies + queries, make sure to add your VyOS router to the allowed client list. -**RADIUS sessions management DM/CoA** +RADIUS source address +===================== -.. cfgcmd:: set service pppoe-server authentication radius dynamic-author - +If you are using OSPF as IGP, always the closest interface connected to the +RADIUS server is used. With VyOS 1.2 you can bind all outgoing RADIUS requests +to a single source IP e.g. the loopback interface. - Use this command to configure Dynamic Authorization Extensions to - RADIUS so that you can remotely disconnect sessions and change some - authentication parameters. +.. cfgcmd:: set service pppoe-server authentication radius source-address
-.. code-block:: none + Source IPv4 address used in all RADIUS server queires. - set service pppoe-server authentication radius dynamic-author key 'secret123' - set service pppoe-server authentication radius dynamic-author port '3799' - set service pppoe-server authentication radius dynamic-author server '10.1.1.2' +.. note:: The ``source-address`` must be configured on one of VyOS interface. + Best practice would be a loopback or dummy interface. + +RADIUS advanced options +======================= + +.. cfgcmd:: set service pppoe-server authentication radius server port + + Configure RADIUS `` and its required port for authentication requests. + +.. cfgcmd:: set service pppoe-server authentication radius server fail-time