servers/roles/dnsmasq/templates/dnsmasq.nft.j2
Timotej Lazar 7b1c2cb41d dnsmasq: drop dhcp-proxy option
Instead add firewall rules to allow direct communication from client networks.
2024-11-09 20:06:58 +01:00

13 lines
398 B
Django/Jinja

table inet filter {
chain input {
# networks using this DHCP server
ip saddr {
{% for prefix in prefixes | selectattr('custom_fields.dhcp_server') | sort(attribute='vlan.name') %}
{% if prefix.custom_fields.dhcp_server.address | ipaddr('address') == primary_ip4 %}
{{ prefix.prefix }},
{% endif %}
{% endfor %}
} udp dport { 67 } ct state new accept
}
}