I’m fairly new to MicroTik boards (though so far they’ve lived up to everything I’ve heard about them [good]).
I’ve been configuring a captive portal system for a hotspot application and have it working well, with the exception of one item. Users are able to connect and if they stay connected can use the hotspot for up to a month without reauthenticating (basically for as long as they stay connected for most users). However, I’d like to set it up so that for 1 month they don’t have to ‘reauthenticate’, but the actual action that is happening is that after they disconnect when they reconnect they have to reauthenticate. Have I done something wrong or is this by design? I have idle-timeout set for 1w, but even so it’s not waiting a week before it ‘idle-outs’ a user.
Here are my settings:
PROFILES:
1 name=“trial” idle-timeout=1w keepalive-timeout=1w status-autorefresh=5m
shared-users=unlimited transparent-proxy=no
[admin@Indigo Router] /ip hotspot active> print
Flags: R - radius, B - blocked
USER ADDRESS UPTIME SESSION-TIME-LEFT IDLE-TIMEOUT
The DHCP server is set to expire IPs after 1 hour – is this causing the hotspot to also forget the connections?
[admin@Indigo Router] /ip dhcp-server lease> print detail
Flags: X - disabled, R - radius, D - dynamic, B - blocked
0 D address=192.168.88.232 mac-address=00:1C:B3:xx:xx:xx client-id=“1:0:1c:b3:xx:xx:xx”
server=default status=bound expires-after=1h25m54s last-seen=4m6s
active-address=192.168.88.232 active-mac-address=00:1C:B3:xx:xx:xx
active-client-id=“1:0:1c:b3:xx:xx:xx” active-server=default
Add the ‘cookie’ login method - if they do get logged out, the browser will automatically log them back in.
I think that’s cleaner than keeping stale connections around forever.
As a workaround, maybe try an automatic login. Write a login.html that submits an existing username and password to /login - same functionality (no one has to provide credentials), but you’re out of trial mode and to the router everyone is just authenticated, albeit without the customer having to interact with the router for that to work.
I don’t have much experience with the trial feature.
good idea - but I’m getting “web browser did not send challenge response (try again, enable JavaScript)” when I try that, obviously something the router doesn’t like about just sending creds through.
Enable HTTP-PAP instead of HTTP-CHAP - you don’t care that the password is clear text since there’s no secret for logging in as everyone is supposed to get free service.