bundles/pppd: add iptables rules on ifup/ifdown

This commit is contained in:
Franzi 2020-11-13 23:04:43 +01:00
parent f65e216828
commit 870a5252e5
Signed by: kunsi
GPG key ID: 12E3D2136B818350
3 changed files with 20 additions and 0 deletions

View file

@ -0,0 +1,5 @@
#!/bin/bash
rm /etc/iptables-rules.d/90-pppd
/usr/local/sbin/iptables-enforce

7
bundles/pppd/files/ip-up Normal file
View file

@ -0,0 +1,7 @@
#!/bin/bash
INTERFACE=$1
echo "iptables -t nat -A POSTROUTING -o $INTERFACE -j MASQUERADE" > /etc/iptables-rules.d/90-pppd
/usr/local/sbin/iptables-enforce