Mikrotik Hotspot User auto login-by MAC with redirection using Radius Manager
Task:
Enable selected users Auto login to mikrotik hotspot system without letting them seeing login page, using ‘mac login’ feature in mikrotik hotspot while applying selected user profile as well, or As assigned in radius manager billing system. [freeradius base]
Note: This is just a workaround. There are other perfect or more sophisticated solutions available too, just showing you this particular method. You may adopt other as depend on your network and skills. It was written for personnel reference. z@!b
Mikrotik Section:
Goto IP / Hotspot / Server Profile, select your HS server profile,
Goto LOGIN, and select LOGIN by MAC.
Goto LOGIN, and select LOGIN by MAC.
As showed in the image below …
.
Now goto FILES / and download login.html from hotspot folder to your desktop.
As showed in the image below …
1
2
3
4
5
6
7
8
9
| <span style="line-height: 1.5;"><html><head></span> <meta http-equiv="refresh" content="0; url=http://www.google.com"> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="expires" content="-1"> </head><body></body></html> |
As showed in the image below …
Save and upload it back to the mikrotik hotspot folder.
Mikrotik Section Done. moving to Radius Manager Section
Radius Manager Section
Connect to Radius Manager by ssh/putty
Edit RM system_cfg.php configuration file by
(for centos you may change path to /var/www/html/radiusmanager/config)
(for centos you may change path to /var/www/html/radiusmanager/config)
1
| nano /var/www/radiusmanager/config/system_cfg.php |
search for “define(‘min_pswhsmac_len’, 4);”
and change it to
define(‘min_pswhsmac_len’, 0);
Save and exit.
As showed in the image below …
Create NEW USER in RM ACP >
Now create new user in RM users, and select MAC and enter mac address in 00:00:00 format and save.
As showed in the image below …
TESTING Section:
From test PC, try to browse any web site, User will auto login by hotspot and will be redirected to google.com ( or any site mentioned in login.thml , i choose status page)
As showed here in mikrotik log window …
Posting Komentar untuk "Mikrotik Hotspot User auto login-by MAC with redirection using Radius Manager"