瀏覽代碼

Save firewall settings

Bob Mottram 10 年之前
父節點
當前提交
8024a6e4f3
共有 1 個檔案被更改,包括 6 行新增1 行删除
  1. 6
    1
      install-freedombone.sh

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

295
 }
295
 }
296
 
296
 
297
 function save_firewall_settings {
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
 function configure_internet_protocol {
306
 function configure_internet_protocol {