Community discussions

MikroTik App
Topic Author
Posts: 35
Joined: Wed May 04, 2016 2:44 pm

How to capture Hotspot user log

Thu May 17, 2018 6:29 pm

Hi All,

After so much search and late night RnD, I have come up with a solution for capturing hotspot user log with username and other details. In case there can be any improvement, Please suggest.


We need to add these following script to hotspot user profile.

On Login:
/ip firewall mangle add chain=YourHotspot src-address=$address connection-state=new action=return log=yes log-prefix=$user comment=$user

On Logout: (Without Quote)
 "/ip firewall mangle remove [find comment="$user"]"


Mangle :
/ip firewall mangle add chain=forward action=jump jump-target=YourHotspot


Once its done, It will create custom rules for each user and log the traffic.


Now you can upload it to your prefered syslog server.

PS- I am working on my syslog server. Once its done I will post the rest of the process.
Long time Member
Long time Member
Posts: 580
Joined: Thu Feb 04, 2016 11:42 am
Location: Scotland

Re: How to capture Hotspot user log

Fri May 18, 2018 3:27 pm

interesting :D Look forward to the rest of it.
just joined
Posts: 18
Joined: Wed May 02, 2018 5:01 pm

Re: How to capture Hotspot user log

Wed May 30, 2018 5:10 pm

Hi everyone,
I have tried this script and it worked but i can not get the first detailed logs showing destination IP, port and etc.
I can only view users, chain, source address, bytes and packets.

Please I need help to get thorough and how to save to my prefered syslog server.


Who is online

Users browsing this forum: eworm, Google [Bot], SuperMario and 194 guests