add support to enable routing

This commit is contained in:
nd 2020-08-07 23:10:46 +02:00
parent a3f13ff8da
commit 8a8192749b
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
5 changed files with 51 additions and 0 deletions

14
templates/netforwarding.j2 Executable file
View file

@ -0,0 +1,14 @@
#!/bin/sh
case ${1} in
start)
echo -n '1' > /proc/sys/net/ipv6/conf/all/forwarding
echo -n '1' > /proc/sys/net/ipv4/ip_forward
;;
stop)
echo -n '0' > /proc/sys/net/ipv4/ip_forward
echo -n '0' > /proc/sys/net/ipv6/conf/all/forwarding
;;
esac