Community discussions

MUM Europe 2020
 
User avatar
mbfound
Member Candidate
Member Candidate
Topic Author
Posts: 134
Joined: Tue Jul 01, 2014 1:18 pm
Location: South Africa

Login with MAC on Hotspot

Fri Aug 12, 2016 11:53 pm

Hi,

Trying to setup a hotspot with multiple profiles here.

I need to have 4 user profiles with increasing limitations. Internal use -> customers.

For internal use and regular customers I would like the MAC address to be used to automatically authenticate the user. My current test config still asks for a username/password.

Hotspot profile
/ip hotspot profile
set [ find default=yes ] login-by=mac,http-chap mac-auth-mode=\
mac-as-username-and-password
add dns-name=login.bla hotspot-address=10.0.0.1 login-by=\
mac,http-chap mac-auth-mode=mac-as-username-and-password name=hsprof1


For the user profiles I have:
/ip hotspot user profile
add address-pool=hotspot-pool mac-cookie-timeout=1d name=1-profile-platinum \
rate-limit=512k/256k
add address-pool=hotspot-pool mac-cookie-timeout=1d name=2-profle-gold \
rate-limit=512k/128k
add address-pool=hotspot-pool mac-cookie-timeout=12h name=3-profile-silver \
rate-limit=384k/128k
add address-pool=hotspot-pool mac-cookie-timeout=12h name=4-profile-bronze \
rate-limit=256k/128k


and then my test User:
/ip hotspot user
add limit-bytes-total=5000000 mac-address=XX:B8:37:BE:19:XX name=User \
profile=1-profile-platinum server=hotspot


I'm not sure if I'm misunderstanding how MAC login works or if my config is wrong.

Normal logins work fine but I need that mac login :lol:

Thanks in advance!
 
rjscomms
Member Candidate
Member Candidate
Posts: 132
Joined: Fri Jan 28, 2011 12:22 pm

Re: Login with MAC on Hotspot

Sat Aug 13, 2016 2:55 am

Hello,

try this:
/ip hotspot ip-binding add mac-address=XX:B8:37:BE:19:XX type=bypassed
They should be authenticated without asking for username/password.
 
User avatar
mbfound
Member Candidate
Member Candidate
Topic Author
Posts: 134
Joined: Tue Jul 01, 2014 1:18 pm
Location: South Africa

Re: Login with MAC on Hotspot

Sun Aug 14, 2016 12:19 am

Hello,

try this:
/ip hotspot ip-binding add mac-address=XX:B8:37:BE:19:XX type=bypassed
They should be authenticated without asking for username/password.
Thanks for the suggestion - I will probably go with that for the internal stuff ie printers, tills, etc. but for logins like regulars (this is a coffee joint) or staff, it needs to happen automatically but
still be rate limited as well as cap limited.
 
rjscomms
Member Candidate
Member Candidate
Posts: 132
Joined: Fri Jan 28, 2011 12:22 pm

Re: Login with MAC on Hotspot

Sun Aug 14, 2016 1:28 am

Hi again,

I understand now what you really wanted.

I have tried the code you suggested but it still requires the login. I think here the MAC field just locks it to one device.

Sorry, but not sure how to help. If I find out something, I'll post back.
 
User avatar
mbfound
Member Candidate
Member Candidate
Topic Author
Posts: 134
Joined: Tue Jul 01, 2014 1:18 pm
Location: South Africa

Re: Login with MAC on Hotspot

Sun Aug 14, 2016 3:17 am

I think I've got it, relevant parts are bolded:

Hotspot profile
/ip hotspot profile
set [ find default=yes ] login-by=mac,http-chap mac-auth-mode=\
mac-as-username
add dns-name=login.bla hotspot-address=10.0.0.1 login-by=\
mac,http-chap mac-auth-mode=mac-as-username-and-password name=hsprof1

/ip hotspot user
add limit-bytes-total=5000000 mac-address=XX:XX:XX:XX:XX:XX name=XX:XX:XX:XX:XX:XX \
profile=1-profile-platinum server=hotspot

Not sure if it's the correct way but it works and pretty sure you can do mac-as-username-and-password as well and just add MAC to the password field in the user.
 
rjscomms
Member Candidate
Member Candidate
Posts: 132
Joined: Fri Jan 28, 2011 12:22 pm

Re: Login with MAC on Hotspot

Sun Aug 14, 2016 3:37 am

Nice work.

I just tried it and it works fine.

Who is online

Users browsing this forum: No registered users and 35 guests