Save firewall settings

This commit is contained in:
Bob Mottram 2014-09-20 21:01:19 +01:00
parent 4574b22693
commit 8024a6e4f3
1 changed files with 6 additions and 1 deletions

View File

@ -295,7 +295,12 @@ function configure_firewall_for_email {
}
function save_firewall_settings {
# TODO
iptables-save > /etc/firewall.conf
ip6tables-save > /etc/firewall6.conf
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
chmod +x /etc/network/if-up.d/iptables
}
function configure_internet_protocol {