I would like to log the users Mac address to a database hosted on a web server. I was wondering if there is a variable I can use like for example
$mac-address
which will replace it with the users mac address.- Remove GRUB Bootloader MacBook Pro / Air / iMac I would be careful mounting it under /Volumes. In particular, I would be afraid that by doing so, the Finder might see it and start writing stuff to the EFI partition (e.g. A.Trashes folder,.dsstore files, etc.).
I think of using that variable in a hidden field and when the form is submitted I'll log the info to a database.
Is this even possible? Cause I know in the status page under the hotspot folder, you see the mac address of the device connected.
I also tried using
$(mac)
nothing.Thanks
fixer123420.7k1414 gold badges5252 silver badges8585 bronze badges
BorisBoris
1 Answer
Several ways to achieve that, in my personal preferred order:
- Log the Wifi activity and send it to a syslog server, wich will log data on a database. You will have exact connect/disconnect times of everything connecting to your AP.
- Use a C# (for example) program with Mikrotik API to 'listen' for incoming MAC addresses, and log them in a database.
- Query your Mikrotik AP using SNMP or API to get the list of connected MAC-addresses: you'll get snapshots of connected people every minute for example.
Benoit PHILIPPONBenoit PHILIPPON
Not the answer you're looking for? Browse other questions tagged wireless-networkingmac-addresshotspotmikrotik-routeros or ask your own question.
Think you have a policy for your office local area network (LAN) which is based on IP address of the hosts or workstations inside the LAN. To make sure your policy working smoothly, one thing you have to do is to prevent users from changing their workstations IP address. So you have to lock their IP address to match with the hardware MAC address. If they change the IP address then it will not match with the MAC address set up in the Mikrotik router so they will be blocked.
This tutorial shows you how to lock MAC and IP Address in Mikrotik router. Here is what you have to do.
1. Login to the Mikrotik router via Winbox or Telnet/SSH.
2. Run the below commands in the Terminal
The commands above mean that if the source IP address is A.B.C.D but the MAC address is not 1A:2B:3C:4D:5E:6F or the source MAC address is 1A:2B:3C:4D:5E:6F but the IP address is not A.B.C.D then drop the packet.
Now you can test using your laptop / computer. Make sure to change the IP and MAC address to meet your device configurations.