Community discussions

MikroTik App
 
AnupamPradhan
newbie
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.

Image

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"]"

Image

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

Image

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

Image

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.
 
solar77
Long time Member
Long time Member
Posts: 586
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.
 
faogundele
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.

Thanks

Who is online

Users browsing this forum: GoogleOther [Bot], keshav, r0nzzibb, Semrush [Bot], vingjfg and 183 guests