Browse Source

roulette

lazouz/latoilescoute-snmp
root 4 years ago
parent
commit
095d81c113
  1. 4
      mac_ip.py
  2. 4
      roulette.nft

4
mac_ip.py

@ -46,10 +46,12 @@ def gen_ip_mac_set():
"""
api_client = Re2oAPIClient(api_hostname, api_username, api_password)
hosts = api_client.list('dhcp/hostmacip')
for h in hosts:
print(h)
content = [
(h['ipv4'], h['mac_address'])
for h in hosts
if h['ipv4'] and h['mac_address']
if 'ipv4' in h and h['ipv4'] and h['mac_address']
]
return NetfilterSet(
target_content=content,

4
roulette.nft

@ -23,7 +23,9 @@ table inet firewall {
type ipv4_addr
elements = {
10.7.0.4,
92.242.132.24
92.242.132.24,
104.28.28.23,
104.28.29.23
}
}

Loading…
Cancel
Save