unpoller / unifi

Go Library (w/ structures) to grab data from a Ubitquiti UniFi Controller
https://golift.io/discord
MIT License
114 stars 22 forks source link

Update Client Device access (Block and Unblock) #94

Open oldztimer opened 1 year ago

oldztimer commented 1 year ago

I'm trying to control access to the network leveraging scheduled FW rules. I do this by MAC to IP (static dhcp reservation) and IP to vlan mapping. Then rules for a specific vlan.

One way to bypass rules is to use a "Randomized MAC" (Randomized MACs can be matched by looking at the second digit, if it is [2, 6, A, E] then it is a randomized MAC).

I'd like to block all devices with a random MAC. I can add a hook into the dnsmasq server to execute a script upon a new DHCP client lease ui.com dnsmasq execute script on dhcp lease.

I'll use that to execute a command (with the MAC address) to a golang server that can then call the Block and/ or Unblock update methds.

Thank you for considering these "update" updates to the go-unifi library. Screenshot 2023-08-06 171018