Bonjour,
Je ne parviens pas à faire fonctionner les instructions include
dans mon fichier /etc/nftables.conf
. Auriez-vous une idée de pourquoi ?
Un exemple de ma configuration :
sk4hrr@infra-gw-2138:~$ sudo cat /etc/nftables.conf
#!/usr/sbin/nft -f
# Ansible managed
flush ruleset
table inet filter {
chain input {
type filter hook input priority 0;
# accept any localhost traffic
iif lo accept
# accept traffic originated from us
ct state established,related accept
# accept neighbour discovery otherwise IPv6 connectivity breaks.
ip6 nexthdr icmpv6 icmpv6 type { nd-neighbor-solicit, nd-router-advert, nd-neighbor-advert } accept
# include specifics rules
include "/srv/nftables/rules/"
# count and drop any other traffic
counter drop
}
}
# include more tables
include "/srv/nftables/tables/"
sk4hrr@infra-gw-2138:~$ find /srv/nftables/
/srv/nftables/
/srv/nftables/tables
/srv/nftables/tables/ipv6.conf
/srv/nftables/tables/ipv4.conf
/srv/nftables/rules
/srv/nftables/rules/wireguard-wg0.conf
La documentation faisant référence à include
: Scripting - nftables wiki