liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 8affb151b51a11d76a94c8920d38696756b67a17
parent a9848b9668a819b7d0119590ee4d4f5ed4fbc1d3
Author: Daniel Barlow <dan@telent.net>
Date:   Wed, 28 Jun 2023 22:31:01 +0100

rotuer: enable ipv6 forwarding

Diffstat:
Mexamples/rotuer.nix | 12+++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git 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 ]; };