From a3f2459f8fb71a49935902f167de08bbd8b85fd3 Mon Sep 17 00:00:00 2001 From: Alexander Marx Date: Thu, 27 Mar 2014 11:58:48 +0100 Subject: [PATCH] Firewall: fix Update from core 75 to 76 --- config/firewall/convert-outgoingfw | 5 +++++ config/rootfiles/common/configroot | 1 + config/rootfiles/core/76/filelists/firewall | 1 + config/rootfiles/core/76/update.sh | 4 ++++ lfs/configroot | 1 + 5 files changed, 12 insertions(+) diff --git a/config/firewall/convert-outgoingfw b/config/firewall/convert-outgoingfw index ea493752e..2f9b74c4f 100755 --- a/config/firewall/convert-outgoingfw +++ b/config/firewall/convert-outgoingfw @@ -78,6 +78,11 @@ else if (! -s "$outfwsettings") { print "Empty DMZ configuration file. Nothing to do. Exiting...\n"; + #Fill the firewall settings file + open (SETTINGS, ">/var/ipfire/firewall/settings"); + print SETTINGS "POLICY=MODE2\n"; + print SETTINGS "POLICY1=MODE2\n"; + close (SETTINGS); exit(0); } diff --git a/config/rootfiles/common/configroot b/config/rootfiles/common/configroot index f50937016..b5de9891d 100644 --- a/config/rootfiles/common/configroot +++ b/config/rootfiles/common/configroot @@ -63,6 +63,7 @@ var/ipfire/fwhosts #var/ipfire/fwhosts/customnetworks #var/ipfire/fwhosts/customservicegrp #var/ipfire/fwhosts/customservices +#var/ipfire/fwhosts/customservices.default #var/ipfire/fwhosts/icmp-types var/ipfire/fwlogs #var/ipfire/fwlogs/ipsettings diff --git a/config/rootfiles/core/76/filelists/firewall b/config/rootfiles/core/76/filelists/firewall index e770307c1..6eeaeaed5 100644 --- a/config/rootfiles/core/76/filelists/firewall +++ b/config/rootfiles/core/76/filelists/firewall @@ -11,3 +11,4 @@ usr/sbin/firewall-policy var/ipfire/firewall/p2protocols var/ipfire/fwhosts/icmp-types var/ipfire/menu.d/50-firewall.menu +var/ipfire/fwhosts/customservices.default diff --git a/config/rootfiles/core/76/update.sh b/config/rootfiles/core/76/update.sh index a9055d320..0561f3956 100644 --- a/config/rootfiles/core/76/update.sh +++ b/config/rootfiles/core/76/update.sh @@ -291,6 +291,10 @@ touch /var/ipfire/fwhosts/customgroups touch /var/ipfire/fwhosts/customservices touch /var/ipfire/fwhosts/customservicegrp +if [ ! -s "/var/ipfire/fwhosts/customservices" ];then + cp /var/ipfire/fwhosts/customservices.default /var/ipfire/fwhosts/customservices +fi + # Fix ownership. chown -R nobody:nobody /var/ipfire/firewall chown -R nobody:nobody /var/ipfire/fwhosts diff --git a/lfs/configroot b/lfs/configroot index 8250a77f6..3232d38ec 100644 --- a/lfs/configroot +++ b/lfs/configroot @@ -107,6 +107,7 @@ $(TARGET) : cp $(DIR_SRC)/config/firewall/firewall-policy /usr/sbin/firewall-policy cp $(DIR_SRC)/config/fwhosts/icmp-types $(CONFIG_ROOT)/fwhosts/icmp-types cp $(DIR_SRC)/config/fwhosts/customservices $(CONFIG_ROOT)/fwhosts/customservices + cp $(DIR_SRC)/config/fwhosts/customservices $(CONFIG_ROOT)/fwhosts/customservices.default # Oneliner configfiles echo "ENABLED=off" > $(CONFIG_ROOT)/vpn/settings echo "VPN_DELAYED_START=0" >>$(CONFIG_ROOT)/vpn/settings -- 2.39.2