summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/dnsmasq.nix27
1 files changed, 14 insertions, 13 deletions
diff --git a/modules/dnsmasq.nix b/modules/dnsmasq.nix
index b12cea38..6cd927c4 100644
--- a/modules/dnsmasq.nix
+++ b/modules/dnsmasq.nix
@@ -37,23 +37,24 @@ in {
dhcp-range=${cfg.dhcp-range}
listen-address=${cfg.address}
'';
- tv.iptables.extra.filter.INPUT = [
- "-i ${cfg.interface} -p tcp -m tcp --dport bootps -j ACCEPT"
- "-i ${cfg.interface} -p udp -m udp --dport bootps -j ACCEPT"
- "-i ${cfg.interface} -p tcp -m tcp --dport domain -j ACCEPT"
- "-i ${cfg.interface} -p udp -m udp --dport domain -j ACCEPT"
- ];
+ hrm.nftables.tables.filter.chains.input.rules.dnsmasq = {
+ order = 1500;
+ iifname = cfg.interface;
+ tcp.dport = [ "bootps" "domain" ];
+ udp.dport = [ "bootps" "domain" ];
+ verdict = "accept";
+ };
}
{
# enable forwarding
boot.kernel.sysctl."net.ipv4.ip_forward" = true;
- tv.iptables.extra.filter.FORWARD = [
- "-m state --state RELATED,ESTABLISHED -j ACCEPT"
- "-i ${cfg.interface} -j ACCEPT"
- ];
- tv.iptables.extra.nat.POSTROUTING = [
- "-j MASQUERADE"
- ];
+ hrm.nftables.tables.filter.chains.forward.rules.dnsmasq = {
+ iifname = cfg.interface;
+ verdict = "accept";
+ };
+ hrm.nftables.tables.nat.chains.postrouting.rules.dnsmasq = {
+ verdict = "masquerade";
+ };
}
]);
[cgit] Unable to lock slot /tmp/cgit/4e000000.lock: Permission denied (13)