Hotspot + Radius + Script

Hi,

I hope this is the place to write this post. I have ridden a hotspot + Radius server in a Mikrotik 450 G and works perfectly. But before putting it into production I would like to know if there is a script that if the service is standing Radius let users enter.

Thank you for your help.

I think you are asking for script if RADIUS server is not responding.

MikroTik RouterOS sequence RADIUS server is used,

  • local /ip hotspot user database is checked;
    if nothing found there;
  • remote RADIUS database is used.

So your script should,

  • add the same users to /ip hotspot user database;
  • disable HotSpot server at all if RADIUS server is not responding.
  • disable HotSpot server at all if RADIUS server is not responding.

When the Radius server does not respond you should allow users to or disconnect the hotspot. There are some example of script you can follow?

info found:http://wiki.mikrotik.com/wiki/Free_Internet_access_through_Hotspot_when_RADIUS_is_down

I’m trying to modify the login.html follows the part in bold is the key, so says the documentation wiki mikrotin, put login and pass test by default, if the radius server is disconnected.

internet hotspot > login **$(if error == 'RADIUSTIMEOUT') $(endif)**

But the idea is that the user logs in but not this the Radius connected, so I’m trying to use this part of the code, but no way to make it work, not if I’m on the right track, or anyone has any idea?

$(if chap-id)

$(endif)