forked from DGNum/liminix
rotuer: enable ipv6 forwarding
This commit is contained in:
parent
a9848b9668
commit
8affb151b5
1 changed files with 9 additions and 3 deletions
|
@ -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 ];
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue