From 8affb151b51a11d76a94c8920d38696756b67a17 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Wed, 28 Jun 2023 22:31:01 +0100 Subject: [PATCH] rotuer: enable ipv6 forwarding --- examples/rotuer.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/examples/rotuer.nix b/examples/rotuer.nix index 6ca1406..4c9ce5d 100644 --- a/examples/rotuer.nix +++ b/examples/rotuer.nix @@ -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 ]; };