Operating algorithm
Supported from versions:
Devices: WLC-15/30/3200, ESR-15/15R/30/3200
WLC firmware version: 1.26.0
Devices: WEP-1L/2L/30L/30L-Z/200L и WOP-2L/20L/30L/30LS
AP firmware version: 2.5.0
RADIUS portal authorisation method is supported on the access point (next "AP").
The client connects to an open SSID. When the client first connects, there is no account for the client in the external system (RADIUS server) yet, therefore all client traffic is blocked except:
- DHCP;
- DNS;
- Requests to the portal address;
- URL/IP whitelist request.
After the client is connected, the AP tries to perform MAC Authentication Bypass (MAB) on the RADIUS server by substituting the client's MAC address into the User-Name and User-Password attributes in the Access-Request to the RADIUS server. Since the RADIUS server does not currently have an account with these parameters, the server sends an Access-Reject.
Next, the client accesses the HTTP resource. The AP intercepts the request and redirects the client to the guest portal that was set in the SSID (portal-profile) settings. The client goes to the portal using the received URL, which contains:
- switch_url – URL for redirecting the client after authorisation on the portal;
- ap_mac – MAC address of the AP to which the client is connected;
- client_mac – MAC address of the client;
- wlan – name of the SSID to which the client is connected;
- redirect – the URL that the client originally requested.
URL example:
https://eltex-co.ru/?switch_url=http://redirect.loc:10081&ap_mac=68:13:E2:35:1F:30&client_mac=38:d5:7a:e1:e0:13&wlan=Portal-SSID&redirect=http://www.msftconnecttest.com/connecttest.txt
Next, the user self-registers on the guest portal and is returned a redirect URL to the AP via the portal form, which contains parameters:
- username – user name;
- password – user password;
- redirect_url – URL that the client originally requested as the portal may have spoofed the address. In our example, the client tried to connect to http://www.msftconnecttest.com, but was redirected to https://eltex-co.ru;
- error_url – URL for redirecting the client in case of authorisation error. This parameter is not used in our example.
Parameter names can be redefined in the ap-profile configuration.
URL example:
http://redirect.loc:10081/?username=60336144&password=3hMYEPEW0tdb&buttonClicked=4&redirect_url=https://eltex-co.ru/
The client device opens the redirect URL received from the portal. The AP reads username and password from it, substitutes them into the User-Name and User-Password attributes in the Access-Request and sends the request to the RADIUS server. After the client is successfully authorised on the RADIUS server, the AP removes access restrictions and redirects the client to the URL specified in redirect_url. After the user is logged, his account for MAB authorisation is created in the RADIUS database.
If the client reconnects to the AP or connects to another AP (to the same SSID), authorisation will be performed by MAC address; an Access-Request MAB-authorisation request will return Access-Accept, as the RADIUS server already has the corresponding client account (MAB-authorisation is requested when the client connects to the AP, if the AP doesn`t "remember" the client). The client will not be redirected to the portal until the client's MAC address is removed from the database.
Конфигурация WLC
Пример настроек будет выполнен на factory конфигурации WLC.
Порядок настройки:
- Создаем белый список URL
- Создаем белый список IP-адресов
- Создаем portal-profile
- Создаем radius-profile
- Создаем ssid-profile
- Добавляем ssid-profile в ap-location
Белые списки предназначены для того, чтобы в случае необходимости предоставить пользователю доступ к определенным ресурсам до авторизации. Список этих ресурсов можно задать через URL, RegExp или подсеть IP. Белые списки не являются обязательными. Адрес портала добавляется в белый список автоматически, поэтому задавать его не требуется.
Создаем белый список URL, он может содержать URL и/или RegExp. Доступ к указанным адресам будет разрешён до авторизации.
object-group url white_url url eltex-co.ru regexp '(.+\.)eltex-co\.com' exit
Создаем белый список IP-адресов, доступ к указанным адресам будет разрешён до авторизации. В белый список можно добавлять адреса подсетей, которые нужны для авторизации.
object-group network white_ip ip prefix 192.168.0.0/24 exit
Создаем portal-profile.
Описание параметров:
redirect-url – адрес портала;
age-timeout – временной интервал, в течение которого точка доступа "помнит" клиента и не проводит MAB-авторизацию;
verification-mode – режим работы портала;
white-list domain – белый список URL;
white-list address – белый список IP-адресов.wlc portal-profile portal-pr redirect-url https://eltex-co.ru age-timeout 10 verification-mode external-portal white-list domain white_url white-list address white_ip exit exit
При режиме verification-mode external-portal к указанному URL в redirect-url автоматически добавляются параметры таким образом, что результирующий URL имеет вид:
https://eltex-co.ru/?switch_url=<SWITCH_URL>&ap_mac=<AP_MAC>&client_mac=<CLIENT_MAC>&wlan=<SSID>&redirect=<ORIGINAL_URL>
Если необходимо изменить названия параметров switch_url, ap_mac, client_mac, wlan, redirect можно задать строку самостоятельно через параметр redirect-url-custom, например:
redirect-url-custom https://eltex-co.ru/?action_url=<SWITCH_URL>&ap_addr=<AP_MAC>&client_addr=<CLIENT_MAC>&ssid_name=<SSID>&red_url=<ORIGINAL_URL>&nas=<NAS_ID>
В примере в строку был добавлен <NAS_ID> и были изменены следующие названия параметров:
- switch_url → action_url
- ap_mac → ap_addr
- client_mac →client_addr
- wlan →ssid_name
- redirect →red_url
Строка редиректа может содержать плейсхолдеры:
- <NAS_ID>
- <SWITCH_URL>
- <AP_MAC>
- <CLIENT_MAC>
- <SSID>
- <ORIGINAL_URL>
Создаем radius-profile.
wlc radius-profile portal_radius auth-address 192.168.4.5 auth-password ascii-text encrypted 92BB3C7EB50C5AFE80 auth-acct-id-send acct-enable acct-address 192.168.4.5 acct-password ascii-text encrypted 92BB3C7EB50C5AFE80 acct-periodic acct-interval 300 exit exit
Создаем ssid-profile.
wlc ssid-profile portal_test ssid portal_test radius-profile portal_radius portal-enable portal-profile portal-pr vlan-id 3 band 5g enable exit exit
Добавляем ssid-profile в ap-location.
wlc ap-location default-location description default-location mode tunnel ap-profile default-ap ssid-profile portal_test exit exit