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

13 lines
423 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 }}, # {{ prefix.vlan.name }}
{% endif %}
{% endfor %}
} udp dport { 67 } ct state new accept
}
}