]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Core90: Add GeoIP to update.
authorStefan Schantl <stefan.schantl@ipfire.org>
Thu, 16 Apr 2015 18:37:00 +0000 (20:37 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Thu, 16 Apr 2015 18:37:00 +0000 (20:37 +0200)
config/rootfiles/core/90/exclude
config/rootfiles/core/90/filelists/files
config/rootfiles/core/90/filelists/perl-Text-CSV_XS [new symlink]
config/rootfiles/core/90/filelists/xtables-addons [new symlink]
config/rootfiles/core/90/update.sh

index 5be5371aafeee1541a471dbc75edb8dcc0ad1fb3..56e840d8cc430f92a45b03e2c122fadc2061050e 100644 (file)
@@ -17,10 +17,12 @@ etc/sysconfig/modules
 etc/sysconfig/rc.local
 etc/udev/rules.d/30-persistent-network.rules
 srv/web/ipfire/html/proxy.pac
-var/ipfire/time
+var/ipfire/firewall/geoipblock
+var/ipfire/fwhosts/custmgeoipgrp
 var/ipfire/ovpn/ccd.conf
 var/ipfire/ovpn/ccdroute
 var/ipfire/ovpn/ccdroute2
+var/ipfire/time
 var/log/cache
 var/state/dhcp/dhcpd.leases
 var/updatecache
index 2ef5ded31f93d6cdc7fa798d254b8f878c76a097..5f05eb549e3e19518192535c63fc2588a5aa1384 100644 (file)
@@ -1,7 +1,19 @@
 etc/system-release
 etc/issue
+etc/rc.d/init.d/firewall
 etc/rc.d/init.d/network-trigger
+etc/rc.d/init.d/networking/red.up/99-geoip-database
 etc/rc.d/rcsysinit.d/S90network-trigger
+srv/web/ipfire/cgi-bin/firewall.cgi
+srv/web/ipfire/cgi-bin/fwhosts.cgi
+srv/web/ipfire/cgi-bin/geoip-block.cgi
+usr/lib/firewall/firewall-lib.pl
 usr/lib/firewall/rules.pl
+usr/local/bin/xt_geoip_build
+usr/local/bin/xt_geoip_update
+var/ipfire/general-functions.pl
+var/ipfire/geoip-functions.pl
+var/ipfire/header.pl
 var/ipfire/backup/include
 var/ipfire/langs
+var/ipfire/menu.d/50-firewall.menu
diff --git a/config/rootfiles/core/90/filelists/perl-Text-CSV_XS b/config/rootfiles/core/90/filelists/perl-Text-CSV_XS
new file mode 120000 (symlink)
index 0000000..ec1202f
--- /dev/null
@@ -0,0 +1 @@
+../../../common/perl-Text-CSV_XS
\ No newline at end of file
diff --git a/config/rootfiles/core/90/filelists/xtables-addons b/config/rootfiles/core/90/filelists/xtables-addons
new file mode 120000 (symlink)
index 0000000..2e24c42
--- /dev/null
@@ -0,0 +1 @@
+../../../common/xtables-addons
\ No newline at end of file
index 6af052c0becab8616058e41b46c3be0dd720c5b7..9a83ac403f86599c352e36371b15475b124f5889 100644 (file)
@@ -159,6 +159,22 @@ if [ $BOOTSPACE -lt 1000 ]; then
        esac
 fi
 
+# Create GeoIP related files if they do not exist yet.
+if [ ! -e "/var/ipfire/firewall/geoipblock" ]; then
+       touch /var/ipfire/firewall/geoipblock
+       chown nobody:nobody /var/ipfire/firewall/geoipblock
+
+       # Insert default value into file.
+       echo "GEOIPBLOCK_ENABLED=off" >> /var/ipfire/firewall/geoipblock
+fi
+if [ ! -e "/var/ipfire/fwhosts/customgeoipgrp" ]; then
+       touch /var/ipfire/fwhosts/customgeoipgrp
+       chown nobody:nobody /var/ipfire/fwhosts/customgeoipgrp
+fi
+
+# Download/Update GeoIP databases.
+/usr/local/bin/xt_geoip_update
+
 # Update Language cache
 perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang"