Bob Mottram 9 лет назад
Родитель
Сommit
a2aa35524f
1 измененных файлов: 9 добавлений и 9 удалений
  1. 9
    9
      src/freedombone

+ 9
- 9
src/freedombone Просмотреть файл

@@ -1281,6 +1281,15 @@ function get_cjdns_password {
1281 1281
   fi
1282 1282
 }
1283 1283
 
1284
+function save_firewall_settings {
1285
+  iptables-save > /etc/firewall.conf
1286
+  ip6tables-save > /etc/firewall6.conf
1287
+  printf '#!/bin/sh\n' > /etc/network/if-up.d/iptables
1288
+  printf 'iptables-restore < /etc/firewall.conf\n' >> /etc/network/if-up.d/iptables
1289
+  printf 'ip6tables-restore < /etc/firewall6.conf\n' >> /etc/network/if-up.d/iptables
1290
+  chmod +x /etc/network/if-up.d/iptables
1291
+}
1292
+
1284 1293
 function enable_ipv6 {
1285 1294
   # endure that ipv6 is enabled and can route
1286 1295
   sed -i 's/net.ipv6.conf.all.disable_ipv6.*/net.ipv6.conf.all.disable_ipv6 = 0/g' /etc/sysctl.conf
@@ -5892,15 +5901,6 @@ function configure_firewall {
5892 5901
   echo 'configure_firewall' >> $COMPLETION_FILE
5893 5902
 }
5894 5903
 
5895
-function save_firewall_settings {
5896
-  iptables-save > /etc/firewall.conf
5897
-  ip6tables-save > /etc/firewall6.conf
5898
-  printf '#!/bin/sh\n' > /etc/network/if-up.d/iptables
5899
-  printf 'iptables-restore < /etc/firewall.conf\n' >> /etc/network/if-up.d/iptables
5900
-  printf 'ip6tables-restore < /etc/firewall6.conf\n' >> /etc/network/if-up.d/iptables
5901
-  chmod +x /etc/network/if-up.d/iptables
5902
-}
5903
-
5904 5904
 function configure_firewall_ping {
5905 5905
   if grep -Fxq "configure_firewall_ping" $COMPLETION_FILE; then
5906 5906
       return