firewall/zones/adherent.nft
2018-10-14 18:49:38 +02:00

38 lines
612 B
Plaintext

#! /sbin/nft -f
table inet firewall {
# Définition de la zone Adhérents
set z_adh {
type ipv4_addr;
flags interval
elements = {
# Si l'on souhaite ajouter des ranges d'ip c'est ici
10.69.0.0/24,
}
}
# Interfaces depuis lesquelles on autorise la communication vers
# adherent
set allowed_to_adh = {
type string;
elements = {
$if_admin,
$if_supelec,
$if_adherent, # Utile ?
}
}
chain to_adh {
iifname allowed_to_adh accept;
drop;
}
chain from_adh {
# On passe d'abord par le checkmac pour éviter le spoof d'ip:
not ip saddr . ether saddr @ip_mac drop;
}
}