fix: Include rules or tables file only if set
This commit is contained in:
parent
efdd1560ff
commit
2ee5dc5ff2
@ -16,13 +16,17 @@ table inet filter {
|
||||
# accept neighbour discovery otherwise IPv6 connectivity breaks.
|
||||
ip6 nexthdr icmpv6 icmpv6 type {nd-neighbor-solicit, nd-router-advert, nd-neighbor-advert} accept
|
||||
|
||||
{% if nftables_rules | length > 0 %}
|
||||
# include specific rules
|
||||
include "/srv/nftables/rules.conf"
|
||||
{% endif %}
|
||||
|
||||
# count and drop any other traffic
|
||||
counter drop
|
||||
}
|
||||
}
|
||||
|
||||
{% if nftables_tables | length > 0 %}
|
||||
# include more tables
|
||||
include "/srv/nftables/tables.conf"
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user