Manual:PPP AAA: Difference between revisions
No edit summary
|Line 48:||Line 48:|
|desc=Modifies connection MSS settings:
|desc=Modifies connection MSS settings:
* <var>yes</var> - adjust connection MSS value
* <var>yes</var> - adjust connection MSS value
* <var>no</var> - do not
* <var>no</var> - do not connection MSS value
* <var>default</var> - derive this value from the interface default profile; same as no if this is the interface default profile
Revision as of 14:11, 6 November 2017
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 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.
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.
|address-list (string; Default: )||Address list name to which ppp assigned address will be added.|
|bridge (string; Default: )||Name of the bridge interface to which ppp interface will be added as slave port. Both tunnel end point (server and client) must be in bridge in order to make this work.|
|change-tcp-mss (yes | no | default; Default: default)||Modifies connection MSS settings:
|comment (string; Default: )|
|dhcpv6-pd-pool (string; Default: )||Name of the IPv6 pool which will be used by dynamically created DHCPv6-PD server when client connects.
|dns-server (IP; Default: )||IP address of the DNS server that is supplied to ppp clients|
|idle-timeout (time; Default: )||Specifies the amount of time after which the link will be terminated if there are no activity present. Timeout is not set by default|
|incoming-filter (string; Default: )||Firewall chain name for incoming packets. Specified chain gets control for each packet coming from the client. The ppp chain should be manually added and rules with action=jump jump-target=ppp should be added to other relevant chains in order for this feature to work. For more information look at the examples section|
|local-address (IP address | pool; Default: )||Tunnel address or name of the pool from which address is assigned to ppp interface locally.|
|name (string; Default: )||PPP profile name|
|only-one (yes | no | default; Default: default)||Defines whether a user is allowed to have more than one connection at a time
|outgoing-filter (string; Default: )||Firewall chain name for outgoing packets. Specified chain gets control for each packet going to the client. The ppp chain should be manually added and rules with action=jump jump-target=ppp should be added to other relevant chains in order for this feature to work. For more information look at the Examples section.|
|rate-limit (string; Default: )||Rate limitation in form of rx-rate[/tx-rate] [rx-burst-rate[/tx-burst-rate] [rx-burst-threshold[/tx-burst-threshold] [rx-burst-time[/tx-burst-time] [priority] [rx-rate-min[/tx-rate-min]]]] from the point of view of the router (so "rx" is client upload, and "tx" is client download). All rates are measured in bits per second, unless followed by optional 'k' suffix (kilobits per second) or 'M' suffix (megabits per second). If tx-rate is not specified, rx-rate serves as tx-rate too. The same applies for tx-burst-rate, tx-burst-threshold and tx-burst-time. If both rx-burst-threshold and tx-burst-threshold are not specified (but burst-rate is specified), rx-rate and tx-rate are used as burst thresholds. If both rx-burst-time and tx-burst-time are not specified, 1s is used as default. Priority takes values 1..8, where 1 implies the highest priority, but 8 - the lowest. If rx-rate-min and tx-rate-min are not specified rx-rate and tx-rate values are used. The rx-rate-min and tx-rate-min values can not exceed rx-rate and tx-rate values.|
|remote-address (IP; Default: )||Tunnel address or name of the pool from which address is assigned to remote ppp interface.|
|remote-ipv6-prefix-pool (string | none; Default: none)||Assign prefix from IPv6 pool to the client and install corresponding IPv6 route.|
|session-timeout (time; Default: )||Maximum time the connection can stay up. By default no time limit is set.|
|use-compression (yes | no | default; Default: default)||Specifies whether to use data compression or not.
|use-encryption (yes | no | default | require; Default: default)||Specifies whether to use data encryption or not.
|use-ipv6 (yes | no | default | require; Default: default)||Specifies whether to allow IPv6. By default is enabled if IPv6 package is installed.
|use-mpls (yes | no | default | require; Default: default)||Specifies whether to allow MPLS over PPP.
|use-vj-compression (yes | no | default; Default: default)||Specifies whether to use Van Jacobson header compression algorithm.
|on-up (script; Default: )||Execute script on user login-event. These are available variables that are accessible for the event script:
|on-down (script; Default: )||Execute script on user logging off. See on-up for more details|
|wins-server (IP address; Default: )||IP address of the WINS server to supply to Windows clients|
There are two default profiles that cannot be removed:
[admin@rb13] ppp profile> print Flags: * - default 0 * name="default" use-compression=no use-vj-compression=no use-encryption=no only-one=no change-tcp-mss=yes 1 * name="default-encryption" use-compression=default use-vj-compression=default use-encryption=yes only-one=default change-tcp-mss=default [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.
PPP User Database stores PPP user access records with PPP user profile assigned to each user.
|caller-id (string; 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 from|
|comment (string; Default: )||Short description of the user.|
|disabled (yes | no; Default: no)||Whether secret will be used.|
|limit-bytes-in (integer; Default: 0)||Maximal amount of bytes for a session that client can upload.|
|limit-bytes-out (integer; Default: 0)||Maximal amount of bytes for a session that client can download.|
|local-address (IP address; Default: )||IP address that will be set locally on ppp interface.|
|name (string; Default: )||Name used for authentication|
|password (string; Default: )||Password used for authentication|
|profile (string; Default: default)||Which user profile to use.|
|remote-address (IP; Default: )||IP address that will be assigned to remote ppp interface.|
|remote-ipv6-prefix (IPv6 prefix; Default: )||IPv6 prefix assigned to ppp client. Prefix is added to ND prefix list enabling stateless address auto-configuration on ppp interface.Available starting from v5.0.|
|routes (string; Default: )||Routes that appear on the server when the client is connected. The route format is: dst-address gateway metric (for example, 10.1.0.0/ 24 10.0.0.1 1). Other syntax is not acceptable since it can be represented in incorrect way. Several routes may be specified separated with commas. This parameter will be ignored for OpenVPN.|
|service (any | async | isdn | l2tp | pppoe | pptp | ovpn | sstp; Default: any)||Specifies the services that particular user will be able to use.|
This submenu allows to monitor active (connected) users.
/ppp active print command will show all currently connected users.
/ppp active print stats command will show received/sent bytes and packets
|address (IP address)||IP address the client got from the server|
|bytes (integer)||Amount of bytes transfered through tis connection. First figure represents amount of transmitted traffic from the router's point of view, while the second one shows amount of received traffic.|
|caller-id (string)||For PPTP and L2TP it is the IP address the client connected from. For PPPoE it is the MAC address the client connected from.|
|encoding (string)||Shows encryption and encoding (separated with '/' if asymmetric) being used in this connection|
|limit-bytes-in (integer)||Maximal amount of bytes the user is allowed to send to the router.|
|limit-bytes-out (integer)||Maximal amount of bytes the user is allowed to send to the client.|
|name (string)||User name supplied at authentication stage|
|packets (integer/integer)||Amount of packets transfered through tis connection. First figure represents amount of transmitted traffic from the router's point of view, while the second one shows amount of received traffic|
|service (async | isdn | l2tp | pppoe | pptp | ovpn | sstp)||Type of service the user is using.|
|session-id (string)||Shows unique client identifier.|
|uptime (time)||User's uptime|
Settings in this submenu allows to set RADIUS accounting and authentication. Note that RADIUS user database is consulted only if the required username is not found in local user database.
|accounting (yes | no; Default: yes)||Enable RADIUS accounting|
|interim-update (time; Default: 0s)||Interim-Update time interval|
|use-radius (yes | no; Default: no)||Enable user authentication via RADIUS. If entry in local secret database is not found, then client will be authenticated via RADIUS.|
Add new profile
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=no use-vj-compression=no use-encryption=no only-one=no change-tcp-mss=yes 1 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 2 * name="default-encryption" use-compression=default use-vj-compression=default use-encryption=yes only-one=default change-tcp-mss=default [admin@rb13] ppp profile>
Add new user
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>