# Re-read firewall rules every Sunday in March, October and November to take care of daylight saving time
00 3 * 3 0 /usr/local/bin/timezone-transition /usr/local/bin/firewallctrl
00 2 * 10-11 0 /usr/local/bin/timezone-transition /usr/local/bin/firewallctrl
+
+# Update GeoIP database once a month.
+3 2 1 * * * [ -f "/var/ipfire/red/active" ] && /usr/local/bin/xt_geoip_update >/dev/null 2>&1
--- /dev/null
+#!/bin/bash
+
+# Get the GeoIP database if no one exists yet.
+
+DIR=/usr/share/xt_geoip
+
+found=false
+
+# Check if the directory contains any data.
+for i in $DIR/*; do
+ found=true
+ break
+done
+
+# Download ruleset if none has been found.
+if ! ${found}; then
+ /us/local/bin/xt_geoip_update >/dev/null 2>&1
+fi
+
+exit 0