Create directory if needed
This commit is contained in:
parent
ad964baf77
commit
e429663435
|
@ -36,6 +36,9 @@ EXTERNAL_IPV4_ADDRESS=
|
|||
function save_firewall_settings {
|
||||
iptables-save > /etc/firewall.conf
|
||||
ip6tables-save > /etc/firewall6.conf
|
||||
if [ ! -d /etc/network/if-up.d ]; then
|
||||
mkdir /etc/network/if-up.d
|
||||
fi
|
||||
printf '#!/bin/sh\n' > /etc/network/if-up.d/iptables
|
||||
printf 'iptables-restore < /etc/firewall.conf\n' >> /etc/network/if-up.d/iptables
|
||||
printf 'ip6tables-restore < /etc/firewall6.conf\n' >> /etc/network/if-up.d/iptables
|
||||
|
|
Loading…
Reference in New Issue