Send MAC address to UniFi Controller

Halo everyone,

i want to create connection between mikrotik and unifi controller. I need create script which send all MAC address from /DHCP Server/Leases over SSH to file on UniFiController.
Based on this, all the addresses listed will be in the whitelist and will have access to the WLAN.

Form:

config.system_cfg.1=ebtables.1.cmd=-A FORWARD -i ath1 -j DROP 
config.system_cfg.2=ebtables.2.cmd=-I FORWARD -i ath1 -s b0:c4:e7:54:49:82 -j ACCEPT
config.system_cfg.3=ebtables.3.cmd=-I FORWARD -i ath1 -s d4:20:6d:4e:f1:df -j ACCEPT
...
  • compare existing lines mac address and skip existing mac address or create new line, delete unactual line.
  • save a file on remote ssh controller.

Can you help me??
for all the efforts I thank


https://community.ubnt.com/t5/UniFi-Wireless/UniFi-Mac-Filtering-default-block/td-p/1071599
https://help.ubnt.com/hc/en-us/articles/205146040-OD-UniFi-What-is-the-config-properties-file-