Community discussions

MikroTik App
 
neutronlaser
Member
Member
Topic Author
Posts: 445
Joined: Thu Jan 18, 2018 5:18 pm

Hotspot frequently asking to log in again

Tue Apr 09, 2019 3:03 pm

Hi
I have a Hotspot running. I have set it up so there is a trial user so anyone can connect after pressing the button.

I have enabled Cookies, MAC and MAC cookies, given the cookie a 28 day lifetime, the trial a 7d lifetime.

But I find that the user has to keep logging in again when they reconnect, or after a short time. I want it so they only have to log in once and can use it for days or weeks.

Here is my config:
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
add dns-name=hotspot.local hotspot-address=192.168.150.1 html-directory=flash/hotspot http-cookie-lifetime=4w login-by=mac,cookie,http-chap,trial,mac-cookie name=hsprof1 rate-limit=50M/6M \
    trial-uptime-limit=1w trial-uptime-reset=1m
/ip hotspot
add address-pool=dhcp_guest150 disabled=no interface=vlan150-guest name=hotspot1 profile=hsprof1
/ip hotspot user profile
set [ find default=yes ] idle-timeout=2h keepalive-timeout=2h mac-cookie-timeout=4w name=trial on-login=\
    "/tool e-mail send to=\"potato@potatonet.com\" subject=\"Hotspot login: \$user \$address \$interface\" body=\"Hotspot login happened. \$user \$address \$interface\"" on-logout="/tool e-ma\
    il send to=\"potato@potatonet.com\" subject=\"Hotspot logout: Cause: \$cause - \$username \$address \$interface - Total bytes: \$bytes-total Uptime: \$uptime-secs\" body=\"Hotspot logout \
    happened. Cause: \$cause - \$username \$address \$interface - Total bytes: \$bytes-total Uptime: \$uptime-secs\"" rate-limit=55M/6M shared-users=250 transparent-proxy=yes
add !idle-timeout !keepalive-timeout mac-cookie-timeout=4w name=normal on-login="/tool e-mail send to=\"potato@potatonet.com\" subject=\"Hotspot login\" body=\"Hotspot login happened\"" on-logout=\
    "/tool e-mail send to=\"potato@potatonet.com\" subject=\"Hotspot logout\" body=\"Hotspot logout happened\"" rate-limit=100M/10M shared-users=999 transparent-proxy=yes
/ip hotspot user
add name=admin profile=normal server=hotspot1
/ip hotspot walled-garden ip
add action=accept disabled=no !dst-address dst-address-list=facebook !dst-port !protocol !src-address !src-address-list
 
neutronlaser
Member
Member
Topic Author
Posts: 445
Joined: Thu Jan 18, 2018 5:18 pm

Re: Hotspot frequently asking to log in again

Thu Apr 11, 2019 3:56 pm

Turns out MAC cookies and the other crap doesn't work with Trial.

Who is online

Users browsing this forum: No registered users and 48 guests