PPP User AAA
| Document revision: | 2.6 (February 6, 2008, 1:40 GMT) |
| Applies to: | V3.0 |
General Information
Summary
This documents provides summary, configuration reference and examples on PPP user management. This includes asynchronous PPP, PPTP, L2TP, OpenVPN, PPPoE and ISDN users.
Specifications
Packages required: systemLicense required: Level1
Submenu level: /ppp
Description
The MikroTik RouterOS provides scalable Authentication, Athorization and Accounting (AAA) functionality.
Local authentication is performed using the User Database and the Profile Database. The actual configuration for the given user is composed using respective user record from the User Database, associated item from the Profile Database and the item in the Profile database which is set as default for a given service the user is authenticating to. Default profile settings from the Profile database have lowest priority while the user access record settings from the User Database have highest priority with the only exception being particular IP addresses take precedence over IP pools in the local-address and remote-address settings, which described later on.
Support for RADIUS authentication gives the ISP or network administrator the ability to manage PPP user access and accounting from one server throughout a large network. The MikroTik RouterOS has a RADIUS client which can authenticate for PPP, PPPoE, PPTP, L2TP, OpenVPN and ISDN connections. The attributes received from RADIUS server override the ones set in the default profile, but if some parameters are not received they are taken from the respective default profile.
Local PPP User Profiles
Submenu level: /ppp profileDescription
PPP profiles are used to define default values for user access records stored under /ppp secret submenu. Settings in /ppp secret User Database override corresponding /ppp profile settings except that single IP addresses always take precedence over IP pools when specified as local-address or remote-address parameters.
Property Description
bridge (name) - bridge interface name, which the PPP tunnel will automatically be added in case BCP negotiation will be successful (i.e., in case both peers support BCP and have this parameter configured)change-tcp-mss (yes | no | default; default: default) - modifies TCP connection MSS settingsno - do not atjust connection MSS value
default - derive this value from the interface default profile; same as no if this is the interface default profile
no - the user is allowed to have more than one connection at a time
default - derive this value from the interface default profile; same as no if this is the interface default profile
no - disable data compression
default - derive this value from the interface default profile; same as no if this is the interface default profile
no - disable data encryption
requided - enable and require encryption
default - derive this value from the interface default profile; same as no if this is the interface default profile
no - disable Van Jacobson header compression
default - derive this value from the interface default profile; same as no if this is the interface default profile
Notes
There are two default profiles that cannot be removed:
[admin@rb13] ppp profile> print
Flags: * - default
0 * name="default" use-compression=default use-vj-compression=default
use-encryption=default only-one=default change-tcp-mss=yes
1 * name="default-encryption" use-compression=default
use-vj-compression=default use-encryption=yes only-one=default
change-tcp-mss=yes
[admin@rb13] ppp profile>
Use Van Jacobson compression only if you have to because it may slow down the communications on bad or congested channels.
incoming-filter and outgoing-filter arguments add dynamic jump rules to chain ppp, where the jump-target argument will be equal to incoming-filter or outgoing-filter argument in /ppp profile. Therefore, chain ppp should be manually added before changing these arguments.
only-one parameter is ignored if RADIUS authentication is used.
If there are more that 10 simultaneous PPP connections planned, it is recommended to turn the change-mss property off, and use one general MSS changing rule in mangle table instead, to reduce CPU utilization.
By configuring bridge property you enable the BCP protocol on the link. It is useful to enable MRRU as well in order for the link to be capable of transmitting full-size Ethernet frames. If the BCP negotiation is successful, the link will automatically be added to the specified bridge. Note that the bridge must have either a valid administrative MAC address, or another Ethernet-like port with a valid MAC address, as the PPP link do not have any MAC address.
Client will use a fake IP address (10.112.112.x) as a remote end address if no remote address is known. It won't be possible to ping this address, and it should be used as a gateway for routes (like default route) only. This helps GSM/GPRS setups where dial-in servers for some reason does not advertise their ip address.
Example
To add the profile ex that assigns the router itself the 10.0.0.1 address, and the addresses from the ex pool to the clients, filtering traffic coming from clients through mypppclients chain:
[admin@rb13] ppp profile> add name=ex local-address=10.0.0.1 remote-address=ex incoming-filter=mypppclients
[admin@rb13] ppp profile> print
Flags: * - default
0 * name="default" use-compression=default use-vj-compression=default
use-encryption=default only-one=default change-tcp-mss=yes
1 * name="default-encryption" use-compression=default
use-vj-compression=default use-encryption=yes only-one=default
change-tcp-mss=yes
2 name="ex" local-address=10.0.0.1 remote-address=ex use-compression=default
use-vj-compression=default use-encryption=default only-one=default
change-tcp-mss=default incoming-filter=mypppclients
[admin@rb13] ppp profile>
Local PPP User Database
Submenu level: /ppp secretDescription
PPP User Database stores PPP user access records with PPP user profile assigned to each user.
Property Description
caller-id (text; default: "") - for PPTP and L2TP it is the IP address a client must connect from. For PPPoE it is the MAC address (written in CAPITAL letters) a client must connect from. For ISDN it is the caller's number (that may or may not be provided by the operator) the client may dial-in fromExample
To add the user ex with password lkjrht and profile ex available for PPTP service only, enter the following command:
[admin@rb13] ppp secret> add name=ex password=lkjrht service=pptp profile=ex [admin@rb13] ppp secret> print Flags: X - disabled # NAME SERVICE CALLER-ID PASSWORD PROFILE REMOTE-ADDRESS 0 ex pptp lkjrht ex 0.0.0.0 [admin@rb13] ppp secret>
Monitoring Active PPP Users
Command name: /ppp active printProperty Description
address (read-only: IP address) - IP address the client got from the serverbytes (read-only: integer/integer) - amount of bytes transfered through this connection. First figure represents amount of transmitted traffic from the router's point of view, while the second one shows amount of received trafficcaller-id (read-only: text) - for PPTP and L2TP it is the IP address the client connected from. For PPPoE it is the MAC address the client connected from. For ISDN it is the caller's number the client dialed-in fromExample
[admin@rb13] > /ppp active print
Flags: R - radius
# NAME SERVICE CALLER-ID ADDRESS UPTIME ENCODING
0 ex pptp 10.0.11.12 10.0.0.254 1m16s MPPE128...
[admin@rb13] > /ppp active print detail
Flags: R - radius
0 name="ex" service=pptp caller-id="10.0.11.12" address=10.0.0.254
uptime=1m22s encoding="MPPE128 stateless" session-id=0x8180002B
limit-bytes-in=200000000 limit-bytes-out=0
[admin@rb13] > /ppp active print stats
Flags: R - radius
# NAME BYTES PACKETS
0 ex 10510/159690614 187/210257
[admin@rb13] >
PPP User Remote AAA
Submenu level: /ppp aaaProperty Description
accounting (yes | no; default: yes) - enable RADIUS accountinginterim-update (time; default: 0s) - Interim-Update time intervaluse-radius (yes | no; default: no) - enable user authentication via RADIUSNotes
RADIUS user database is consulted only if the required username is not found in local user database.
Example
To enable RADIUS AAA:
[admin@MikroTik] ppp aaa> set use-radius=yes
[admin@MikroTik] ppp aaa> print
use-radius: yes
accounting: yes
interim-update: 0s
[admin@MikroTik] ppp aaa>
