bundles/pppd: add iptables rules on ifup/ifdown
This commit is contained in:
parent
f65e216828
commit
870a5252e5
3 changed files with 20 additions and 0 deletions
5
bundles/pppd/files/ip-down
Normal file
5
bundles/pppd/files/ip-down
Normal 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
7
bundles/pppd/files/ip-up
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue