From 44ed75a4adbe50aa57d7bcf77ceaa83d4bb3c890 Mon Sep 17 00:00:00 2001 From: Hugo Levy-Falk Date: Mon, 20 Jan 2020 11:26:04 +0100 Subject: [PATCH] =?UTF-8?q?La=20roulette=20a=20la=20priorit=C3=A9=20sur=20?= =?UTF-8?q?tout.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- firewall.nft | 6 +++--- mac_ip.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/firewall.nft b/firewall.nft index 2363671..6514130 100755 --- a/firewall.nft +++ b/firewall.nft @@ -42,12 +42,12 @@ table inet firewall { # Politique par défaut : tout jeter. policy accept - # Applique la politique globale - jump global - # La roulette pour les n1as jump roulette + # Applique la politique globale + jump global + # Passage par le checkmac pour les concernés # jump checkmac diff --git a/mac_ip.py b/mac_ip.py index d821eba..82d1ed4 100644 --- a/mac_ip.py +++ b/mac_ip.py @@ -36,7 +36,6 @@ api_hostname = CONFIG.get('Re2o', 'hostname') api_password = CONFIG.get('Re2o', 'password') api_username = CONFIG.get('Re2o', 'username') -api_client = Re2oAPIClient(api_hostname, api_username, api_password) def gen_ip_mac_set(): @@ -45,6 +44,7 @@ def gen_ip_mac_set(): Returns: A NetfilterSet object with the allowed ip - mac pairs. """ + api_client = Re2oAPIClient(api_hostname, api_username, api_password) hosts = api_client.list('dhcp/hostmacip') content = [ (h['ipv4'], h['mac_address'])