rotuer: enable ipv6 forwarding

This commit is contained in:
Daniel Barlow 2023-06-28 22:31:01 +01:00
parent a9848b9668
commit 8affb151b5

View file

@ -257,13 +257,19 @@ in rec {
};
services.packet_forwarding =
let filename = "/proc/sys/net/ipv4/conf/all/forwarding";
let
ip4 = "/proc/sys/net/ipv4/conf/all/forwarding";
ip6 = "/proc/sys/net/ipv6/conf/all/forwarding";
in oneshot {
name = "let-the-ip-flow";
up = ''
echo 1 > ${filename}
echo 1 > ${ip4}
echo 1 > ${ip6}
'';
down = ''
echo 0 > ${ip4};
echo 0 > ${ip6};
'';
down = "echo 0 > ${filename}";
dependencies = [ services.firewall ];
};