浏览代码

Save firewall settings

Bob Mottram 10 年前
父节点
当前提交
8024a6e4f3
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6
    1
      install-freedombone.sh

+ 6
- 1
install-freedombone.sh 查看文件

@@ -295,7 +295,12 @@ function configure_firewall_for_email {
295 295
 }
296 296
 
297 297
 function save_firewall_settings {
298
-	# TODO
298
+  iptables-save > /etc/firewall.conf
299
+  ip6tables-save > /etc/firewall6.conf
300
+  printf '#!/bin/sh\n' > /etc/network/if-up.d/iptables
301
+  printf 'iptables-restore < /etc/firewall.conf\n' >> /etc/network/if-up.d/iptables
302
+  printf 'ip6tables-restore < /etc/firewall6.conf\n' >> /etc/network/if-up.d/iptables
303
+  chmod +x /etc/network/if-up.d/iptables
299 304
 }
300 305
 
301 306
 function configure_internet_protocol {