rm -rf "/var/ipfire/portfw"
fi
+ # Convert location
+ convert-to-location
+
# Reload firewall
firewallctrl
# along with IPFire; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
-# Copyright (C) 2015 IPFire Team <info@ipfire.org>. #
+# Copyright (C) 2015 - 2020 IPFire Team <info@ipfire.org>. #
# #
############################################################################
-package GeoIP;
+package Location::Functions;
-use Geo::IP::PurePerl;
+use Location;
use Locale::Codes::Country;
-my $geoip_database_dir = "/var/lib/GeoIP";
-my $location_database = "GeoLite2-Country-Locations-en.csv";
-
-my $database;
+# Hash which contains country codes and their names which are special or not
+# part of ISO 3166-1.
+my %not_iso_3166_location = (
+ "a1" => "Anonymous Proxy",
+ "a2" => "Satellite Provider",
+ "a3" => "Worldwide Anycast Instance",
+ "an" => "Netherlands Antilles",
+ "ap" => "Asia/Pacific Region",
+ "eu" => "Europe",
+ "fx" => "France, Metropolitan"
+);
+
+# Directory where the libloc database and keyfile lives.
+our $location_dir = "/var/lib/location/";
+
+# Libloc database file.
+our $database = "$location_dir/database.db";
+
+# Libloc keyfile to verify the database.
+our $keyfile = "$location_dir/signing-key.pem";
+
+# Directory which contains the exported databases.
+our $xt_geoip_db_directory = "/usr/share/xt_geoip/";
+
+#
+## Tiny function to init the location database.
+#
+sub init () {
+ # Init and open the database.
+ my $db = &Location::init($database);
+
+ # Return the database handle.
+ return $db;
+}
-sub lookup($) {
- my $address = shift;
+#
+## Function to verify the integrity of the location database.
+#
+sub verify ($) {
+ my ($db_handle) = @_;
- # Load the database into memory if not already done
- if (!$database) {
- $database = Geo::IP::PurePerl->new(GEOIP_MEMORY_CACHE);
+ # Verify the integrity of the database.
+ if(&Location::verify($db_handle, $keyfile)) {
+ # Success, return "1".
+ return 1;
}
+ # If we got here, return nothing.
+ return;
+}
+
+#
+## Function to the the country code of a given address.
+#
+sub lookup_country_code($$) {
+ my ($db_handle, $address) = @_;
+
+ # Lookup the given address.
+ my $country_code = &Location::lookup_country_code($db_handle, $address);
+
# Return the name of the country
- return $database->country_code_by_name($address);
+ return $country_code;
}
# Function to get the flag icon for a specified country code.
# Remove whitespaces.
chomp($input);
+
# Convert input into lower case format.
my $code = lc($input);
# Handle country codes which are not in the list.
- if ($code eq "a1") { $name = "Anonymous Proxy" }
- elsif ($code eq "a2") { $name = "Satellite Provider" }
- elsif ($code eq "o1") { $name = "Other Country" }
- elsif ($code eq "ap") { $name = "Asia/Pacific Region" }
- elsif ($code eq "eu") { $name = "Europe" }
- elsif ($code eq "yu") { $name = "Yugoslavia" }
- else {
+ if ($not_iso_3166_location{$code}) {
+ # Grab location name from hash.
+ $name = $not_iso_3166_location{$code};
+ } else {
# Use perl built-in module to get the country code.
$name = &Locale::Codes::Country::code2country($code);
}
return $name;
}
-# Function to get all available GeoIP locations.
-sub get_geoip_locations() {
+# Function to get all available locations.
+sub get_locations() {
my @locations = ();
- # Open the location database.
- open(LOCATION, "$geoip_database_dir/$location_database") or return @locations;
-
- # Loop through the file.
- while(my $line = <LOCATION>) {
- # Remove newlines.
- chomp($line);
+ # Get listed country codes from ISO 3166-1.
+ my @locations_lc = &Locale::Codes::Country::all_country_codes();
- # Split the line content.
- my ($geoname_id, $locale_code, $continent_code, $continent_name, $country_iso_code, $country_name, $is_in_european_union) = split(/\,/, $line);
+ # The Codes::Country module provides the country codes only in lower case.
+ # So we have to loop over the array and convert them into upper case format.
+ foreach my $ccode (@locations_lc) {
+ # Convert the country code to uppercase.
+ my $ccode_uc = uc($ccode);
- # Check if the country_iso_code is upper case.
- if($country_iso_code =~ /[A-Z]/) {
- # Add the current ISO code.
- push(@locations, $country_iso_code);
- }
+ # Add the converted ccode to the locations array.
+ push(@locations, $ccode_uc);
}
- # Close filehandle.
- close(LOCATION);
+ # Add locations from not_iso_3166_locations.
+ foreach my $location (keys %not_iso_3166_location) {
+ # Convert the location into uppercase.
+ my $location_uc = uc($location);
+
+ # Add the location to the locations array.
+ push(@locations, $location_uc);
+ }
# Sort locations array in alphabetical order.
my @sorted_locations = sort(@locations);
return @sorted_locations;
}
-
1;
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.
-%monthly,random * * * [ -f "/var/ipfire/red/active" ] && /usr/local/bin/xt_geoip_update >/dev/null 2>&1
+# Update location database once a month
+%hourly,random * * * [ -f "/var/ipfire/red/active" ] && /usr/local/bin/update-location-database >/dev/null 2>&1
# Retry sending spooled mails regularly
%hourly * /usr/sbin/dma -q
my %customnetwork=();
my %customhost=();
my %customgrp=();
-my %customgeoipgrp=();
+my %customlocationgrp=();
my %customservice=();
my %customservicegrp=();
my %ccdnet=();
my %aliases=();
require '/var/ipfire/general-functions.pl';
-require '/var/ipfire/geoip-functions.pl';
+require '/var/ipfire/location-functions.pl';
my $confignet = "${General::swroot}/fwhosts/customnetworks";
my $confighost = "${General::swroot}/fwhosts/customhosts";
my $configgrp = "${General::swroot}/fwhosts/customgroups";
-my $configgeoipgrp = "${General::swroot}/fwhosts/customgeoipgrp";
+my $configlocationgrp = "${General::swroot}/fwhosts/customlocationgrp";
my $configsrv = "${General::swroot}/fwhosts/customservices";
my $configsrvgrp = "${General::swroot}/fwhosts/customservicegrp";
my $configccdnet = "${General::swroot}/ovpn/ccd.conf";
&General::readhasharray("$confignet", \%customnetwork);
&General::readhasharray("$confighost", \%customhost);
&General::readhasharray("$configgrp", \%customgrp);
-&General::readhasharray("$configgeoipgrp", \%customgeoipgrp);
+&General::readhasharray("$configlocationgrp", \%customlocationgrp);
&General::readhasharray("$configccdnet", \%ccdnet);
&General::readhasharray("$configccdhost", \%ccdhost);
&General::readhasharray("$configipsec", \%ipsecconf);
&General::readhasharray("$configsrvgrp", \%customservicegrp);
&General::get_aliases(\%aliases);
-# Get all available GeoIP locations.
-my @available_geoip_locations = &get_geoip_locations();
+# Get all available locations.
+my @available_locations = &get_locations();
sub get_srv_prot
{
}
}
}
- }elsif ($addr_type ~~ ["cust_geoip_src", "cust_geoip_tgt"] && $value =~ "group:") {
+ }elsif ($addr_type ~~ ["cust_location_src", "cust_location_tgt"] && $value =~ "group:") {
$value=substr($value,6);
- foreach my $grp (sort {$a <=> $b} keys %customgeoipgrp) {
- if ($customgeoipgrp{$grp}[0] eq $value) {
- my @address = &get_address($addr_type, $customgeoipgrp{$grp}[2], $type);
+ foreach my $grp (sort {$a <=> $b} keys %customlocationgrp) {
+ if ($customlocationgrp{$grp}[0] eq $value) {
+ my @address = &get_address($addr_type, $customlocationgrp{$grp}[2], $type);
if (@address) {
push(@addresses, @address);
}
}
- # Handle rule options with GeoIP as source.
- } elsif ($key eq "cust_geoip_src") {
- # Check if the given GeoIP location is available.
- if(&geoip_location_is_available($value)) {
+ # Handle rule options with a location as source.
+ } elsif ($key eq "cust_location_src") {
+ # Check if the given location is available.
+ if(&location_is_available($value)) {
# Get external interface.
my $external_interface = &get_external_interface();
push(@ret, ["-m geoip --src-cc $value", "$external_interface"]);
}
- # Handle rule options with GeoIP as target.
- } elsif ($key eq "cust_geoip_tgt") {
- # Check if the given GeoIP location is available.
- if(&geoip_location_is_available($value)) {
+ # Handle rule options with a location as target.
+ } elsif ($key eq "cust_location_tgt") {
+ # Check if the given location is available.
+ if(&location_is_available($value)) {
# Get external interface.
my $external_interface = &get_external_interface();
return 0;
}
-sub get_geoip_locations() {
- return &GeoIP::get_geoip_locations();
+sub get_locations() {
+ return &Location::Functions::get_locations();
}
-# Function to check if a database of a given GeoIP location is
+# Function to check if a database of a given location is
# available.
-sub geoip_location_is_available($) {
- my ($location) = @_;
+sub location_is_available($) {
+ my ($requested_location) = @_;
- # Loop through the global array of available GeoIP locations.
- foreach my $geoip_location (@available_geoip_locations) {
+ # Loop through the global array of available locations.
+ foreach my $location (@available_locations) {
# Check if the current processed location is the searched one.
- if($location eq $geoip_location) {
+ if($location eq $requested_location) {
# If it is part of the array, return "1" - True.
return 1;
}
+++ /dev/null
-GEOIPBLOCK_ENABLED=off
--- /dev/null
+LOCATIONBLOCK_ENABLED=off
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";
require "/usr/lib/firewall/firewall-lib.pl";
+require "${General::swroot}/location-functions.pl";
# Set to one to enable debugging mode.
my $DEBUG = 0;
my %configinputfw=();
my %configoutgoingfw=();
my %confignatfw=();
+my %locationsettings = (
+ "LOCATIONBLOCK_ENABLED" => "off"
+);
+
my @p2ps=();
my $configfwdfw = "${General::swroot}/firewall/config";
my $configinput = "${General::swroot}/firewall/input";
my $configoutgoing = "${General::swroot}/firewall/outgoing";
my $p2pfile = "${General::swroot}/firewall/p2protocols";
-my $geoipfile = "${General::swroot}/firewall/geoipblock";
+my $locationfile = "${General::swroot}/firewall/locationblock";
my $configgrp = "${General::swroot}/fwhosts/customgroups";
my $netsettings = "${General::swroot}/ethernet/settings";
&General::readhasharray($configoutgoing, \%configoutgoingfw);
&General::readhasharray($configgrp, \%customgrp);
+# Check if the location settings file exists
+if (-e "$locationfile") {
+ # Read settings file
+ &General::readhash("$locationfile", \%locationsettings);
+}
+
+# Get all available locations.
+my @locations = &Location::Functions::get_locations();
+
my @log_limit_options = &make_log_limit_options();
my $POLICY_INPUT_ALLOWED = 0;
# Load P2P block rules.
&p2pblock();
- # Load GeoIP block rules.
- &geoipblock();
+ # Load Location block rules.
+ &locationblock();
# Reload firewall policy.
run("/usr/sbin/firewall-policy");
}
}
-sub geoipblock {
- my %geoipsettings = ();
- $geoipsettings{'GEOIPBLOCK_ENABLED'} = "off";
-
+sub locationblock {
# Flush iptables chain.
- run("$IPTABLES -F GEOIPBLOCK");
-
- # Check if the geoip settings file exists
- if (-e "$geoipfile") {
- # Read settings file
- &General::readhash("$geoipfile", \%geoipsettings);
- }
+ run("$IPTABLES -F LOCATIONBLOCK");
- # If geoip blocking is not enabled, we are finished here.
- if ($geoipsettings{'GEOIPBLOCK_ENABLED'} ne "on") {
+ # If location blocking is not enabled, we are finished here.
+ if ($locationsettings{'LOCATIONBLOCK_ENABLED'} ne "on") {
# Exit submodule. Process remaining script.
return;
}
- # Get supported locations.
- my @locations = &fwlib::get_geoip_locations();
-
- # Loop through all supported geoip locations and
- # create iptables rules, if blocking this country
+ # Loop through all supported locations and
+ # create iptables rules, if blocking for this country
# is enabled.
foreach my $location (@locations) {
- if(exists $geoipsettings{$location} && $geoipsettings{$location} eq "on") {
- run("$IPTABLES -A GEOIPBLOCK -m geoip --src-cc $location -j DROP");
+ if(exists $locationsettings{$location} && $locationsettings{$location} eq "on") {
+ run("$IPTABLES -A LOCATIONBLOCK -m geoip --src-cc $location -j DROP");
}
}
}
'title' => "P2P-Block",
'enabled' => 1,
};
- $subfirewall->{'60.geoipblock'} = {
- 'caption' => $Lang::tr{'geoipblock'},
- 'uri' => '/cgi-bin/geoip-block.cgi',
- 'title' => $Lang::tr{'geoipblock'},
+ $subfirewall->{'60.locationblock'} = {
+ 'caption' => $Lang::tr{'locationblock'},
+ 'uri' => '/cgi-bin/location-block.cgi',
+ 'title' => $Lang::tr{'locationblock'},
'enabled' => 1,
};
$subfirewall->{'70.wireless'} = {
+++ /dev/null
-#usr/bin/geoip-lookup
-#usr/lib/perl5/site_perl/5.30.0/Geo
-#usr/lib/perl5/site_perl/5.30.0/Geo/IP
-usr/lib/perl5/site_perl/5.30.0/Geo/IP/PurePerl.pm
-#usr/lib/perl5/site_perl/5.30.0/xxxMACHINExxx-linux-thread-multi/auto/Geo
-#usr/lib/perl5/site_perl/5.30.0/xxxMACHINExxx-linux-thread-multi/auto/Geo/IP
-#usr/lib/perl5/site_perl/5.30.0/xxxMACHINExxx-linux-thread-multi/auto/Geo/IP/PurePerl
-#usr/lib/perl5/site_perl/5.30.0/xxxMACHINExxx-linux-thread-multi/auto/Geo/IP/PurePerl/.packlist
-#usr/share/GeoIP
-usr/share/GeoIP/GeoIP.dat
-#usr/share/man/man1/geoip-lookup.1
-#usr/share/man/man3/Geo::IP::PurePerl.3
-#usr/lib/perl5/5.30.0/Locale/Codes
-usr/lib/perl5/5.30.0/Locale/Codes.pm
-usr/lib/perl5/5.30.0/Locale/Codes.pod
-usr/lib/perl5/5.30.0/Locale/Codes/API.pod
-usr/lib/perl5/5.30.0/Locale/Codes/Changes.pod
-usr/lib/perl5/5.30.0/Locale/Codes/Constants.pm
-usr/lib/perl5/5.30.0/Locale/Codes/Constants.pod
-usr/lib/perl5/5.30.0/Locale/Codes/Country.pm
-usr/lib/perl5/5.30.0/Locale/Codes/Country.pod
-usr/lib/perl5/5.30.0/Locale/Codes/Country_Codes.pm
-usr/lib/perl5/5.30.0/Locale/Codes/Country_Retired.pm
-usr/lib/perl5/5.30.0/Locale/Codes/Currency.pm
-usr/lib/perl5/5.30.0/Locale/Codes/Currency.pod
-usr/lib/perl5/5.30.0/Locale/Codes/Currency_Codes.pm
-usr/lib/perl5/5.30.0/Locale/Codes/Currency_Retired.pm
-usr/lib/perl5/5.30.0/Locale/Codes/LangExt.pm
-usr/lib/perl5/5.30.0/Locale/Codes/LangExt.pod
-usr/lib/perl5/5.30.0/Locale/Codes/LangExt_Codes.pm
-usr/lib/perl5/5.30.0/Locale/Codes/LangExt_Retired.pm
-usr/lib/perl5/5.30.0/Locale/Codes/LangFam.pm
-usr/lib/perl5/5.30.0/Locale/Codes/LangFam.pod
-usr/lib/perl5/5.30.0/Locale/Codes/LangFam_Codes.pm
-usr/lib/perl5/5.30.0/Locale/Codes/LangFam_Retired.pm
-usr/lib/perl5/5.30.0/Locale/Codes/LangVar.pm
-usr/lib/perl5/5.30.0/Locale/Codes/LangVar.pod
-usr/lib/perl5/5.30.0/Locale/Codes/LangVar_Codes.pm
-usr/lib/perl5/5.30.0/Locale/Codes/LangVar_Retired.pm
-usr/lib/perl5/5.30.0/Locale/Codes/Language.pm
-usr/lib/perl5/5.30.0/Locale/Codes/Language.pod
-usr/lib/perl5/5.30.0/Locale/Codes/Language_Codes.pm
-usr/lib/perl5/5.30.0/Locale/Codes/Language_Retired.pm
-usr/lib/perl5/5.30.0/Locale/Codes/Script.pm
-usr/lib/perl5/5.30.0/Locale/Codes/Script.pod
-usr/lib/perl5/5.30.0/Locale/Codes/Script_Codes.pm
-usr/lib/perl5/5.30.0/Locale/Codes/Script_Retired.pm
-usr/lib/perl5/5.30.0/Locale/Country.pm
-#usr/lib/perl5/5.30.0/Locale/Country.pod
-usr/lib/perl5/5.30.0/Locale/Currency.pm
-#usr/lib/perl5/5.30.0/Locale/Currency.pod
-usr/lib/perl5/5.30.0/Locale/Language.pm
-#usr/lib/perl5/5.30.0/Locale/Language.pod
-usr/lib/perl5/5.30.0/Locale/Script.pm
-#usr/lib/perl5/5.30.0/Locale/Script.pod
-#usr/lib/perl5/5.30.0/xxxMACHINExxx-linux-thread-multi/auto/Locale
-#usr/lib/perl5/5.30.0/xxxMACHINExxx-linux-thread-multi/auto/Locale/Codes
-#usr/lib/perl5/5.30.0/xxxMACHINExxx-linux-thread-multi/auto/Locale/Codes/.packlist
+#usr/lib/perl5/site_perl/5.30.0/Locale
+#usr/lib/perl5/site_perl/5.30.0/Locale/Codes
+usr/lib/perl5/site_perl/5.30.0/Locale/Codes.pm
+#usr/lib/perl5/site_perl/5.30.0/Locale/Codes.pod
+#usr/lib/perl5/site_perl/5.30.0/Locale/Codes/Changes.pod
+usr/lib/perl5/site_perl/5.30.0/Locale/Codes/Constants.pm
+usr/lib/perl5/site_perl/5.30.0/Locale/Codes/Country.pm
+#usr/lib/perl5/site_perl/5.30.0/Locale/Codes/Country.pod
+usr/lib/perl5/site_perl/5.30.0/Locale/Codes/Country_Codes.pm
+usr/lib/perl5/site_perl/5.30.0/Locale/Codes/Country_Retired.pm
+usr/lib/perl5/site_perl/5.30.0/Locale/Codes/Currency.pm
+#usr/lib/perl5/site_perl/5.30.0/Locale/Codes/Currency.pod
+usr/lib/perl5/site_perl/5.30.0/Locale/Codes/Currency_Codes.pm
+usr/lib/perl5/site_perl/5.30.0/Locale/Codes/Currency_Retired.pm
+usr/lib/perl5/site_perl/5.30.0/Locale/Codes/LangExt.pm
+#usr/lib/perl5/site_perl/5.30.0/Locale/Codes/LangExt.pod
+usr/lib/perl5/site_perl/5.30.0/Locale/Codes/LangExt_Codes.pm
+usr/lib/perl5/site_perl/5.30.0/Locale/Codes/LangExt_Retired.pm
+usr/lib/perl5/site_perl/5.30.0/Locale/Codes/LangFam.pm
+usr/lib/perl5/site_perl/5.30.0/Locale/Codes/LangFam.pod
+usr/lib/perl5/site_perl/5.30.0/Locale/Codes/LangFam_Codes.pm
+usr/lib/perl5/site_perl/5.30.0/Locale/Codes/LangFam_Retired.pm
+usr/lib/perl5/site_perl/5.30.0/Locale/Codes/LangVar.pm
+#usr/lib/perl5/site_perl/5.30.0/Locale/Codes/LangVar.pod
+usr/lib/perl5/site_perl/5.30.0/Locale/Codes/LangVar_Codes.pm
+usr/lib/perl5/site_perl/5.30.0/Locale/Codes/LangVar_Retired.pm
+usr/lib/perl5/site_perl/5.30.0/Locale/Codes/Language.pm
+usr/lib/perl5/site_perl/5.30.0/Locale/Codes/Language.pod
+usr/lib/perl5/site_perl/5.30.0/Locale/Codes/Language_Codes.pm
+usr/lib/perl5/site_perl/5.30.0/Locale/Codes/Language_Retired.pm
+usr/lib/perl5/site_perl/5.30.0/Locale/Codes/Script.pm
+#usr/lib/perl5/site_perl/5.30.0/Locale/Codes/Script.pod
+usr/lib/perl5/site_perl/5.30.0/Locale/Codes/Script_Codes.pm
+usr/lib/perl5/site_perl/5.30.0/Locale/Codes/Script_Retired.pm
+#usr/lib/perl5/site_perl/5.30.0/Locale/Codes/Types.pod
+usr/lib/perl5/site_perl/5.30.0/Locale/Country.pm
+#usr/lib/perl5/site_perl/5.30.0/Locale/Country.pod
+usr/lib/perl5/site_perl/5.30.0/Locale/Currency.pm
+#usr/lib/perl5/site_perl/5.30.0/Locale/Currency.pod
+usr/lib/perl5/site_perl/5.30.0/Locale/Language.pm
+#usr/lib/perl5/site_perl/5.30.0/Locale/Language.pod
+usr/lib/perl5/site_perl/5.30.0/Locale/Script.pm
+#usr/lib/perl5/site_perl/5.30.0/Locale/Script.pod
+#usr/lib/perl5/site_perl/5.30.0/xxxMACHINExxx-linux-thread-multi/auto/Locale
+#usr/lib/perl5/site_perl/5.30.0/xxxMACHINExxx-linux-thread-multi/auto/Locale/Codes
+#usr/lib/perl5/site_perl/5.30.0/xxxMACHINExxx-linux-thread-multi/auto/Locale/Codes/.packlist
#usr/share/man/man3/Locale::Codes.3
-#usr/share/man/man3/Locale::Codes::API.3
#usr/share/man/man3/Locale::Codes::Changes.3
-#usr/share/man/man3/Locale::Codes::Constants.3
#usr/share/man/man3/Locale::Codes::Country.3
#usr/share/man/man3/Locale::Codes::Currency.3
#usr/share/man/man3/Locale::Codes::LangExt.3
#usr/share/man/man3/Locale::Codes::LangFam.3
-#usr/share/man/man3/Locale::Codes::LangFam_Retired.3
#usr/share/man/man3/Locale::Codes::LangVar.3
#usr/share/man/man3/Locale::Codes::Language.3
#usr/share/man/man3/Locale::Codes::Script.3
+#usr/share/man/man3/Locale::Codes::Types.3
#usr/share/man/man3/Locale::Country.3
#usr/share/man/man3/Locale::Currency.3
#usr/share/man/man3/Locale::Language.3
etc/rc.d/init.d/networking/red.up/98-leds
etc/rc.d/init.d/networking/red.up/99-beep
etc/rc.d/init.d/networking/red.up/99-fireinfo
-etc/rc.d/init.d/networking/red.up/99-geoip-database
etc/rc.d/init.d/networking/red.up/99-pakfire-update
etc/rc.d/init.d/networking/wpa_supplicant.exe
etc/rc.d/init.d/ntp
usr/local/bin/timecheck
usr/local/bin/timezone-transition
usr/local/bin/update-ids-ruleset
-usr/local/bin/update-lang-cache
-usr/local/bin/xt_geoip_update
+usr/local/bin/update-location-database
#usr/local/include
#usr/local/lib
#usr/local/lib/sse2
etc/rc.d/init.d/networking/red.up/98-leds
etc/rc.d/init.d/networking/red.up/99-beep
etc/rc.d/init.d/networking/red.up/99-fireinfo
-etc/rc.d/init.d/networking/red.up/99-geoip-database
etc/rc.d/init.d/networking/red.up/99-pakfire-update
etc/rc.d/init.d/networking/wpa_supplicant.exe
etc/rc.d/init.d/ntp
#var/ipfire/extrahd/settings
var/ipfire/firewall
#var/ipfire/firewall/config
-#var/ipfire/firewall/geoipblock
#var/ipfire/firewall/input
+#var/ipfire/firewall/locationblock
#var/ipfire/firewall/outgoing
#var/ipfire/firewall/p2protocols
#var/ipfire/firewall/settings
var/ipfire/fwhosts
-#var/ipfire/fwhosts/customgeoipgrp
#var/ipfire/fwhosts/customgroups
#var/ipfire/fwhosts/customhosts
+#var/ipfire/fwhosts/customlocationgrp
#var/ipfire/fwhosts/customnetworks
#var/ipfire/fwhosts/customservicegrp
#var/ipfire/fwhosts/customservices
#var/ipfire/fwlogs/ipsettings
#var/ipfire/fwlogs/portsettings
var/ipfire/general-functions.pl
-var/ipfire/geoip-functions.pl
var/ipfire/graphs.pl
var/ipfire/header.pl
+var/ipfire/location-functions.pl
var/ipfire/ids-functions.pl
var/ipfire/isdn
#var/ipfire/isdn/settings
+++ /dev/null
-usr/share/GeoIP/GeoIP.dat
-usr/share/xt_geoip/A1.iv4
-usr/share/xt_geoip/A1.iv6
-usr/share/xt_geoip/A2.iv4
-usr/share/xt_geoip/A2.iv6
-usr/share/xt_geoip/AD.iv4
-usr/share/xt_geoip/AD.iv6
-usr/share/xt_geoip/AE.iv4
-usr/share/xt_geoip/AE.iv6
-usr/share/xt_geoip/AF.iv4
-usr/share/xt_geoip/AF.iv6
-usr/share/xt_geoip/AG.iv4
-usr/share/xt_geoip/AG.iv6
-usr/share/xt_geoip/AI.iv4
-usr/share/xt_geoip/AI.iv6
-usr/share/xt_geoip/AL.iv4
-usr/share/xt_geoip/AL.iv6
-usr/share/xt_geoip/AM.iv4
-usr/share/xt_geoip/AM.iv6
-usr/share/xt_geoip/AO.iv4
-usr/share/xt_geoip/AO.iv6
-usr/share/xt_geoip/AQ.iv4
-usr/share/xt_geoip/AQ.iv6
-usr/share/xt_geoip/AR.iv4
-usr/share/xt_geoip/AR.iv6
-usr/share/xt_geoip/AS.iv4
-usr/share/xt_geoip/AS.iv6
-usr/share/xt_geoip/AT.iv4
-usr/share/xt_geoip/AT.iv6
-usr/share/xt_geoip/AU.iv4
-usr/share/xt_geoip/AU.iv6
-usr/share/xt_geoip/AW.iv4
-usr/share/xt_geoip/AW.iv6
-usr/share/xt_geoip/AX.iv4
-usr/share/xt_geoip/AX.iv6
-usr/share/xt_geoip/AZ.iv4
-usr/share/xt_geoip/AZ.iv6
-usr/share/xt_geoip/BA.iv4
-usr/share/xt_geoip/BA.iv6
-usr/share/xt_geoip/BB.iv4
-usr/share/xt_geoip/BB.iv6
-usr/share/xt_geoip/BD.iv4
-usr/share/xt_geoip/BD.iv6
-usr/share/xt_geoip/BE.iv4
-usr/share/xt_geoip/BE.iv6
-usr/share/xt_geoip/BF.iv4
-usr/share/xt_geoip/BF.iv6
-usr/share/xt_geoip/BG.iv4
-usr/share/xt_geoip/BG.iv6
-usr/share/xt_geoip/BH.iv4
-usr/share/xt_geoip/BH.iv6
-usr/share/xt_geoip/BI.iv4
-usr/share/xt_geoip/BI.iv6
-usr/share/xt_geoip/BJ.iv4
-usr/share/xt_geoip/BJ.iv6
-usr/share/xt_geoip/BL.iv4
-usr/share/xt_geoip/BL.iv6
-usr/share/xt_geoip/BM.iv4
-usr/share/xt_geoip/BM.iv6
-usr/share/xt_geoip/BN.iv4
-usr/share/xt_geoip/BN.iv6
-usr/share/xt_geoip/BO.iv4
-usr/share/xt_geoip/BO.iv6
-usr/share/xt_geoip/BQ.iv4
-usr/share/xt_geoip/BQ.iv6
-usr/share/xt_geoip/BR.iv4
-usr/share/xt_geoip/BR.iv6
-usr/share/xt_geoip/BS.iv4
-usr/share/xt_geoip/BS.iv6
-usr/share/xt_geoip/BT.iv4
-usr/share/xt_geoip/BT.iv6
-usr/share/xt_geoip/BV.iv4
-usr/share/xt_geoip/BV.iv6
-usr/share/xt_geoip/BW.iv4
-usr/share/xt_geoip/BW.iv6
-usr/share/xt_geoip/BY.iv4
-usr/share/xt_geoip/BY.iv6
-usr/share/xt_geoip/BZ.iv4
-usr/share/xt_geoip/BZ.iv6
-usr/share/xt_geoip/CA.iv4
-usr/share/xt_geoip/CA.iv6
-usr/share/xt_geoip/CC.iv4
-usr/share/xt_geoip/CC.iv6
-usr/share/xt_geoip/CD.iv4
-usr/share/xt_geoip/CD.iv6
-usr/share/xt_geoip/CF.iv4
-usr/share/xt_geoip/CF.iv6
-usr/share/xt_geoip/CG.iv4
-usr/share/xt_geoip/CG.iv6
-usr/share/xt_geoip/CH.iv4
-usr/share/xt_geoip/CH.iv6
-usr/share/xt_geoip/CI.iv4
-usr/share/xt_geoip/CI.iv6
-usr/share/xt_geoip/CK.iv4
-usr/share/xt_geoip/CK.iv6
-usr/share/xt_geoip/CL.iv4
-usr/share/xt_geoip/CL.iv6
-usr/share/xt_geoip/CM.iv4
-usr/share/xt_geoip/CM.iv6
-usr/share/xt_geoip/CN.iv4
-usr/share/xt_geoip/CN.iv6
-usr/share/xt_geoip/CO.iv4
-usr/share/xt_geoip/CO.iv6
-usr/share/xt_geoip/CR.iv4
-usr/share/xt_geoip/CR.iv6
-usr/share/xt_geoip/CU.iv4
-usr/share/xt_geoip/CU.iv6
-usr/share/xt_geoip/CV.iv4
-usr/share/xt_geoip/CV.iv6
-usr/share/xt_geoip/CW.iv4
-usr/share/xt_geoip/CW.iv6
-usr/share/xt_geoip/CX.iv4
-usr/share/xt_geoip/CX.iv6
-usr/share/xt_geoip/CY.iv4
-usr/share/xt_geoip/CY.iv6
-usr/share/xt_geoip/CZ.iv4
-usr/share/xt_geoip/CZ.iv6
-usr/share/xt_geoip/DE.iv4
-usr/share/xt_geoip/DE.iv6
-usr/share/xt_geoip/DJ.iv4
-usr/share/xt_geoip/DJ.iv6
-usr/share/xt_geoip/DK.iv4
-usr/share/xt_geoip/DK.iv6
-usr/share/xt_geoip/DM.iv4
-usr/share/xt_geoip/DM.iv6
-usr/share/xt_geoip/DO.iv4
-usr/share/xt_geoip/DO.iv6
-usr/share/xt_geoip/DZ.iv4
-usr/share/xt_geoip/DZ.iv6
-usr/share/xt_geoip/EC.iv4
-usr/share/xt_geoip/EC.iv6
-usr/share/xt_geoip/EE.iv4
-usr/share/xt_geoip/EE.iv6
-usr/share/xt_geoip/EG.iv4
-usr/share/xt_geoip/EG.iv6
-usr/share/xt_geoip/EH.iv4
-usr/share/xt_geoip/EH.iv6
-usr/share/xt_geoip/ER.iv4
-usr/share/xt_geoip/ER.iv6
-usr/share/xt_geoip/ES.iv4
-usr/share/xt_geoip/ES.iv6
-usr/share/xt_geoip/ET.iv4
-usr/share/xt_geoip/ET.iv6
-usr/share/xt_geoip/EU.iv4
-usr/share/xt_geoip/EU.iv6
-usr/share/xt_geoip/FI.iv4
-usr/share/xt_geoip/FI.iv6
-usr/share/xt_geoip/FJ.iv4
-usr/share/xt_geoip/FJ.iv6
-usr/share/xt_geoip/FK.iv4
-usr/share/xt_geoip/FK.iv6
-usr/share/xt_geoip/FM.iv4
-usr/share/xt_geoip/FM.iv6
-usr/share/xt_geoip/FO.iv4
-usr/share/xt_geoip/FO.iv6
-usr/share/xt_geoip/FR.iv4
-usr/share/xt_geoip/FR.iv6
-usr/share/xt_geoip/GA.iv4
-usr/share/xt_geoip/GA.iv6
-usr/share/xt_geoip/GB.iv4
-usr/share/xt_geoip/GB.iv6
-usr/share/xt_geoip/GD.iv4
-usr/share/xt_geoip/GD.iv6
-usr/share/xt_geoip/GE.iv4
-usr/share/xt_geoip/GE.iv6
-usr/share/xt_geoip/GF.iv4
-usr/share/xt_geoip/GF.iv6
-usr/share/xt_geoip/GG.iv4
-usr/share/xt_geoip/GG.iv6
-usr/share/xt_geoip/GH.iv4
-usr/share/xt_geoip/GH.iv6
-usr/share/xt_geoip/GI.iv4
-usr/share/xt_geoip/GI.iv6
-usr/share/xt_geoip/GL.iv4
-usr/share/xt_geoip/GL.iv6
-usr/share/xt_geoip/GM.iv4
-usr/share/xt_geoip/GM.iv6
-usr/share/xt_geoip/GN.iv4
-usr/share/xt_geoip/GN.iv6
-usr/share/xt_geoip/GP.iv4
-usr/share/xt_geoip/GP.iv6
-usr/share/xt_geoip/GQ.iv4
-usr/share/xt_geoip/GQ.iv6
-usr/share/xt_geoip/GR.iv4
-usr/share/xt_geoip/GR.iv6
-usr/share/xt_geoip/GS.iv4
-usr/share/xt_geoip/GS.iv6
-usr/share/xt_geoip/GT.iv4
-usr/share/xt_geoip/GT.iv6
-usr/share/xt_geoip/GU.iv4
-usr/share/xt_geoip/GU.iv6
-usr/share/xt_geoip/GW.iv4
-usr/share/xt_geoip/GW.iv6
-usr/share/xt_geoip/GY.iv4
-usr/share/xt_geoip/GY.iv6
-usr/share/xt_geoip/HK.iv4
-usr/share/xt_geoip/HK.iv6
-usr/share/xt_geoip/HM.iv4
-usr/share/xt_geoip/HM.iv6
-usr/share/xt_geoip/HN.iv4
-usr/share/xt_geoip/HN.iv6
-usr/share/xt_geoip/HR.iv4
-usr/share/xt_geoip/HR.iv6
-usr/share/xt_geoip/HT.iv4
-usr/share/xt_geoip/HT.iv6
-usr/share/xt_geoip/HU.iv4
-usr/share/xt_geoip/HU.iv6
-usr/share/xt_geoip/ID.iv4
-usr/share/xt_geoip/ID.iv6
-usr/share/xt_geoip/IE.iv4
-usr/share/xt_geoip/IE.iv6
-usr/share/xt_geoip/IL.iv4
-usr/share/xt_geoip/IL.iv6
-usr/share/xt_geoip/IM.iv4
-usr/share/xt_geoip/IM.iv6
-usr/share/xt_geoip/IN.iv4
-usr/share/xt_geoip/IN.iv6
-usr/share/xt_geoip/IO.iv4
-usr/share/xt_geoip/IO.iv6
-usr/share/xt_geoip/IQ.iv4
-usr/share/xt_geoip/IQ.iv6
-usr/share/xt_geoip/IR.iv4
-usr/share/xt_geoip/IR.iv6
-usr/share/xt_geoip/IS.iv4
-usr/share/xt_geoip/IS.iv6
-usr/share/xt_geoip/IT.iv4
-usr/share/xt_geoip/IT.iv6
-usr/share/xt_geoip/JE.iv4
-usr/share/xt_geoip/JE.iv6
-usr/share/xt_geoip/JM.iv4
-usr/share/xt_geoip/JM.iv6
-usr/share/xt_geoip/JO.iv4
-usr/share/xt_geoip/JO.iv6
-usr/share/xt_geoip/JP.iv4
-usr/share/xt_geoip/JP.iv6
-usr/share/xt_geoip/KE.iv4
-usr/share/xt_geoip/KE.iv6
-usr/share/xt_geoip/KG.iv4
-usr/share/xt_geoip/KG.iv6
-usr/share/xt_geoip/KH.iv4
-usr/share/xt_geoip/KH.iv6
-usr/share/xt_geoip/KI.iv4
-usr/share/xt_geoip/KI.iv6
-usr/share/xt_geoip/KM.iv4
-usr/share/xt_geoip/KM.iv6
-usr/share/xt_geoip/KN.iv4
-usr/share/xt_geoip/KN.iv6
-usr/share/xt_geoip/KP.iv4
-usr/share/xt_geoip/KP.iv6
-usr/share/xt_geoip/KR.iv4
-usr/share/xt_geoip/KR.iv6
-usr/share/xt_geoip/KW.iv4
-usr/share/xt_geoip/KW.iv6
-usr/share/xt_geoip/KY.iv4
-usr/share/xt_geoip/KY.iv6
-usr/share/xt_geoip/KZ.iv4
-usr/share/xt_geoip/KZ.iv6
-usr/share/xt_geoip/LA.iv4
-usr/share/xt_geoip/LA.iv6
-usr/share/xt_geoip/LB.iv4
-usr/share/xt_geoip/LB.iv6
-usr/share/xt_geoip/LC.iv4
-usr/share/xt_geoip/LC.iv6
-usr/share/xt_geoip/LI.iv4
-usr/share/xt_geoip/LI.iv6
-usr/share/xt_geoip/LK.iv4
-usr/share/xt_geoip/LK.iv6
-usr/share/xt_geoip/LR.iv4
-usr/share/xt_geoip/LR.iv6
-usr/share/xt_geoip/LS.iv4
-usr/share/xt_geoip/LS.iv6
-usr/share/xt_geoip/LT.iv4
-usr/share/xt_geoip/LT.iv6
-usr/share/xt_geoip/LU.iv4
-usr/share/xt_geoip/LU.iv6
-usr/share/xt_geoip/LV.iv4
-usr/share/xt_geoip/LV.iv6
-usr/share/xt_geoip/LY.iv4
-usr/share/xt_geoip/LY.iv6
-usr/share/xt_geoip/MA.iv4
-usr/share/xt_geoip/MA.iv6
-usr/share/xt_geoip/MC.iv4
-usr/share/xt_geoip/MC.iv6
-usr/share/xt_geoip/MD.iv4
-usr/share/xt_geoip/MD.iv6
-usr/share/xt_geoip/ME.iv4
-usr/share/xt_geoip/ME.iv6
-usr/share/xt_geoip/MF.iv4
-usr/share/xt_geoip/MF.iv6
-usr/share/xt_geoip/MG.iv4
-usr/share/xt_geoip/MG.iv6
-usr/share/xt_geoip/MH.iv4
-usr/share/xt_geoip/MH.iv6
-usr/share/xt_geoip/MK.iv4
-usr/share/xt_geoip/MK.iv6
-usr/share/xt_geoip/ML.iv4
-usr/share/xt_geoip/ML.iv6
-usr/share/xt_geoip/MM.iv4
-usr/share/xt_geoip/MM.iv6
-usr/share/xt_geoip/MN.iv4
-usr/share/xt_geoip/MN.iv6
-usr/share/xt_geoip/MO.iv4
-usr/share/xt_geoip/MO.iv6
-usr/share/xt_geoip/MP.iv4
-usr/share/xt_geoip/MP.iv6
-usr/share/xt_geoip/MQ.iv4
-usr/share/xt_geoip/MQ.iv6
-usr/share/xt_geoip/MR.iv4
-usr/share/xt_geoip/MR.iv6
-usr/share/xt_geoip/MS.iv4
-usr/share/xt_geoip/MS.iv6
-usr/share/xt_geoip/MT.iv4
-usr/share/xt_geoip/MT.iv6
-usr/share/xt_geoip/MU.iv4
-usr/share/xt_geoip/MU.iv6
-usr/share/xt_geoip/MV.iv4
-usr/share/xt_geoip/MV.iv6
-usr/share/xt_geoip/MW.iv4
-usr/share/xt_geoip/MW.iv6
-usr/share/xt_geoip/MX.iv4
-usr/share/xt_geoip/MX.iv6
-usr/share/xt_geoip/MY.iv4
-usr/share/xt_geoip/MY.iv6
-usr/share/xt_geoip/MZ.iv4
-usr/share/xt_geoip/MZ.iv6
-usr/share/xt_geoip/NA.iv4
-usr/share/xt_geoip/NA.iv6
-usr/share/xt_geoip/NC.iv4
-usr/share/xt_geoip/NC.iv6
-usr/share/xt_geoip/NE.iv4
-usr/share/xt_geoip/NE.iv6
-usr/share/xt_geoip/NF.iv4
-usr/share/xt_geoip/NF.iv6
-usr/share/xt_geoip/NG.iv4
-usr/share/xt_geoip/NG.iv6
-usr/share/xt_geoip/NI.iv4
-usr/share/xt_geoip/NI.iv6
-usr/share/xt_geoip/NL.iv4
-usr/share/xt_geoip/NL.iv6
-usr/share/xt_geoip/NO.iv4
-usr/share/xt_geoip/NO.iv6
-usr/share/xt_geoip/NP.iv4
-usr/share/xt_geoip/NP.iv6
-usr/share/xt_geoip/NR.iv4
-usr/share/xt_geoip/NR.iv6
-usr/share/xt_geoip/NU.iv4
-usr/share/xt_geoip/NU.iv6
-usr/share/xt_geoip/NZ.iv4
-usr/share/xt_geoip/NZ.iv6
-usr/share/xt_geoip/O1.iv4
-usr/share/xt_geoip/O1.iv6
-usr/share/xt_geoip/OM.iv4
-usr/share/xt_geoip/OM.iv6
-usr/share/xt_geoip/PA.iv4
-usr/share/xt_geoip/PA.iv6
-usr/share/xt_geoip/PE.iv4
-usr/share/xt_geoip/PE.iv6
-usr/share/xt_geoip/PF.iv4
-usr/share/xt_geoip/PF.iv6
-usr/share/xt_geoip/PG.iv4
-usr/share/xt_geoip/PG.iv6
-usr/share/xt_geoip/PH.iv4
-usr/share/xt_geoip/PH.iv6
-usr/share/xt_geoip/PK.iv4
-usr/share/xt_geoip/PK.iv6
-usr/share/xt_geoip/PL.iv4
-usr/share/xt_geoip/PL.iv6
-usr/share/xt_geoip/PM.iv4
-usr/share/xt_geoip/PM.iv6
-usr/share/xt_geoip/PN.iv4
-usr/share/xt_geoip/PN.iv6
-usr/share/xt_geoip/PR.iv4
-usr/share/xt_geoip/PR.iv6
-usr/share/xt_geoip/PS.iv4
-usr/share/xt_geoip/PS.iv6
-usr/share/xt_geoip/PT.iv4
-usr/share/xt_geoip/PT.iv6
-usr/share/xt_geoip/PW.iv4
-usr/share/xt_geoip/PW.iv6
-usr/share/xt_geoip/PY.iv4
-usr/share/xt_geoip/PY.iv6
-usr/share/xt_geoip/QA.iv4
-usr/share/xt_geoip/QA.iv6
-usr/share/xt_geoip/RE.iv4
-usr/share/xt_geoip/RE.iv6
-usr/share/xt_geoip/RO.iv4
-usr/share/xt_geoip/RO.iv6
-usr/share/xt_geoip/RS.iv4
-usr/share/xt_geoip/RS.iv6
-usr/share/xt_geoip/RU.iv4
-usr/share/xt_geoip/RU.iv6
-usr/share/xt_geoip/RW.iv4
-usr/share/xt_geoip/RW.iv6
-usr/share/xt_geoip/SA.iv4
-usr/share/xt_geoip/SA.iv6
-usr/share/xt_geoip/SB.iv4
-usr/share/xt_geoip/SB.iv6
-usr/share/xt_geoip/SC.iv4
-usr/share/xt_geoip/SC.iv6
-usr/share/xt_geoip/SD.iv4
-usr/share/xt_geoip/SD.iv6
-usr/share/xt_geoip/SE.iv4
-usr/share/xt_geoip/SE.iv6
-usr/share/xt_geoip/SG.iv4
-usr/share/xt_geoip/SG.iv6
-usr/share/xt_geoip/SH.iv4
-usr/share/xt_geoip/SH.iv6
-usr/share/xt_geoip/SI.iv4
-usr/share/xt_geoip/SI.iv6
-usr/share/xt_geoip/SJ.iv4
-usr/share/xt_geoip/SJ.iv6
-usr/share/xt_geoip/SK.iv4
-usr/share/xt_geoip/SK.iv6
-usr/share/xt_geoip/SL.iv4
-usr/share/xt_geoip/SL.iv6
-usr/share/xt_geoip/SM.iv4
-usr/share/xt_geoip/SM.iv6
-usr/share/xt_geoip/SN.iv4
-usr/share/xt_geoip/SN.iv6
-usr/share/xt_geoip/SO.iv4
-usr/share/xt_geoip/SO.iv6
-usr/share/xt_geoip/SR.iv4
-usr/share/xt_geoip/SR.iv6
-usr/share/xt_geoip/SS.iv4
-usr/share/xt_geoip/SS.iv6
-usr/share/xt_geoip/ST.iv4
-usr/share/xt_geoip/ST.iv6
-usr/share/xt_geoip/SV.iv4
-usr/share/xt_geoip/SV.iv6
-usr/share/xt_geoip/SX.iv4
-usr/share/xt_geoip/SX.iv6
-usr/share/xt_geoip/SY.iv4
-usr/share/xt_geoip/SY.iv6
-usr/share/xt_geoip/SZ.iv4
-usr/share/xt_geoip/SZ.iv6
-usr/share/xt_geoip/TC.iv4
-usr/share/xt_geoip/TC.iv6
-usr/share/xt_geoip/TD.iv4
-usr/share/xt_geoip/TD.iv6
-usr/share/xt_geoip/TF.iv4
-usr/share/xt_geoip/TF.iv6
-usr/share/xt_geoip/TG.iv4
-usr/share/xt_geoip/TG.iv6
-usr/share/xt_geoip/TH.iv4
-usr/share/xt_geoip/TH.iv6
-usr/share/xt_geoip/TJ.iv4
-usr/share/xt_geoip/TJ.iv6
-usr/share/xt_geoip/TK.iv4
-usr/share/xt_geoip/TK.iv6
-usr/share/xt_geoip/TL.iv4
-usr/share/xt_geoip/TL.iv6
-usr/share/xt_geoip/TM.iv4
-usr/share/xt_geoip/TM.iv6
-usr/share/xt_geoip/TN.iv4
-usr/share/xt_geoip/TN.iv6
-usr/share/xt_geoip/TO.iv4
-usr/share/xt_geoip/TO.iv6
-usr/share/xt_geoip/TR.iv4
-usr/share/xt_geoip/TR.iv6
-usr/share/xt_geoip/TT.iv4
-usr/share/xt_geoip/TT.iv6
-usr/share/xt_geoip/TV.iv4
-usr/share/xt_geoip/TV.iv6
-usr/share/xt_geoip/TW.iv4
-usr/share/xt_geoip/TW.iv6
-usr/share/xt_geoip/TZ.iv4
-usr/share/xt_geoip/TZ.iv6
-usr/share/xt_geoip/UA.iv4
-usr/share/xt_geoip/UA.iv6
-usr/share/xt_geoip/UG.iv4
-usr/share/xt_geoip/UG.iv6
-usr/share/xt_geoip/UM.iv4
-usr/share/xt_geoip/UM.iv6
-usr/share/xt_geoip/US.iv4
-usr/share/xt_geoip/US.iv6
-usr/share/xt_geoip/UY.iv4
-usr/share/xt_geoip/UY.iv6
-usr/share/xt_geoip/UZ.iv4
-usr/share/xt_geoip/UZ.iv6
-usr/share/xt_geoip/VA.iv4
-usr/share/xt_geoip/VA.iv6
-usr/share/xt_geoip/VC.iv4
-usr/share/xt_geoip/VC.iv6
-usr/share/xt_geoip/VE.iv4
-usr/share/xt_geoip/VE.iv6
-usr/share/xt_geoip/VG.iv4
-usr/share/xt_geoip/VG.iv6
-usr/share/xt_geoip/VI.iv4
-usr/share/xt_geoip/VI.iv6
-usr/share/xt_geoip/VN.iv4
-usr/share/xt_geoip/VN.iv6
-usr/share/xt_geoip/VU.iv4
-usr/share/xt_geoip/VU.iv6
-usr/share/xt_geoip/WF.iv4
-usr/share/xt_geoip/WF.iv6
-usr/share/xt_geoip/WS.iv4
-usr/share/xt_geoip/WS.iv6
-usr/share/xt_geoip/XK.iv4
-usr/share/xt_geoip/XK.iv6
-usr/share/xt_geoip/YE.iv4
-usr/share/xt_geoip/YE.iv6
-usr/share/xt_geoip/YT.iv4
-usr/share/xt_geoip/YT.iv6
-usr/share/xt_geoip/ZA.iv4
-usr/share/xt_geoip/ZA.iv6
-usr/share/xt_geoip/ZM.iv4
-usr/share/xt_geoip/ZM.iv6
-usr/share/xt_geoip/ZW.iv4
-usr/share/xt_geoip/ZW.iv6
-#var/lib/GeoIP
-var/lib/GeoIP/COPYRIGHT.txt
-var/lib/GeoIP/GeoLite2-Country-Blocks-IPv4.csv
-var/lib/GeoIP/GeoLite2-Country-Blocks-IPv6.csv
-var/lib/GeoIP/GeoLite2-Country-Locations-de.csv
-var/lib/GeoIP/GeoLite2-Country-Locations-en.csv
-var/lib/GeoIP/GeoLite2-Country-Locations-es.csv
-var/lib/GeoIP/GeoLite2-Country-Locations-fr.csv
-var/lib/GeoIP/GeoLite2-Country-Locations-ja.csv
-var/lib/GeoIP/GeoLite2-Country-Locations-pt-BR.csv
-var/lib/GeoIP/GeoLite2-Country-Locations-ru.csv
-var/lib/GeoIP/GeoLite2-Country-Locations-zh-CN.csv
-var/lib/GeoIP/LICENSE.txt
-var/lib/GeoIP/README.txt
+++ /dev/null
-#usr/bin/geoiplookup
-#usr/bin/geoiplookup6
-#usr/include/GeoIP.h
-#usr/include/GeoIPCity.h
-#usr/lib/libGeoIP.a
-#usr/lib/libGeoIP.la
-usr/lib/libGeoIP.so
-usr/lib/libGeoIP.so.1
-usr/lib/libGeoIP.so.1.6.12
-#usr/lib/pkgconfig/geoip.pc
-#usr/share/GeoIP/bin
-usr/share/GeoIP/bin/countryInfo.txt
-usr/share/GeoIP/bin/geoip-generator
-usr/share/GeoIP/bin/geolite2-to-legacy-csv.sh
-#usr/share/man/man1/geoiplookup.1
-#usr/share/man/man1/geoiplookup6.1
etc/rc.d/init.d/networking/red.up/98-leds
etc/rc.d/init.d/networking/red.up/99-beep
etc/rc.d/init.d/networking/red.up/99-fireinfo
-etc/rc.d/init.d/networking/red.up/99-geoip-database
etc/rc.d/init.d/networking/red.up/99-pakfire-update
etc/rc.d/init.d/networking/wpa_supplicant.exe
etc/rc.d/init.d/ntp
--- /dev/null
+usr/bin/location
+#usr/bin/location-importer
+#usr/include/libloc
+#usr/include/libloc/as.h
+#usr/include/libloc/compat.h
+#usr/include/libloc/country.h
+#usr/include/libloc/database.h
+#usr/include/libloc/format.h
+#usr/include/libloc/libloc.h
+#usr/include/libloc/network.h
+#usr/include/libloc/private.h
+#usr/include/libloc/resolv.h
+#usr/include/libloc/stringpool.h
+#usr/include/libloc/writer.h
+#usr/lib/libloc.la
+#usr/lib/libloc.so
+usr/lib/libloc.so.0
+usr/lib/libloc.so.0.0.0
+usr/lib/perl5/site_perl/5.30.0/xxxMACHINExxx-linux-thread-multi/Location.pm
+#usr/lib/perl5/site_perl/5.30.0/xxxMACHINExxx-linux-thread-multi/auto/Location
+#usr/lib/perl5/site_perl/5.30.0/xxxMACHINExxx-linux-thread-multi/auto/Location/.packlist
+usr/lib/perl5/site_perl/5.30.0/xxxMACHINExxx-linux-thread-multi/auto/Location/Location.so
+#usr/lib/pkgconfig/libloc.pc
+#usr/lib/python3.8/site-packages/_location.la
+usr/lib/python3.8/site-packages/_location.so
+#usr/lib/python3.8/site-packages/location
+usr/lib/python3.8/site-packages/location/__init__.py
+#usr/lib/python3.8/site-packages/location/database.py
+usr/lib/python3.8/site-packages/location/downloader.py
+usr/lib/python3.8/site-packages/location/export.py
+usr/lib/python3.8/site-packages/location/i18n.py
+#usr/lib/python3.8/site-packages/location/importer.py
+usr/lib/python3.8/site-packages/location/logger.py
+#usr/share/locale/de/LC_MESSAGES/libloc.mo
+#usr/share/man/man3/Location.3
+usr/share/xt_geoip/A1.iv4
+usr/share/xt_geoip/A2.iv4
+usr/share/xt_geoip/A3.iv4
+usr/share/xt_geoip/AD.iv4
+usr/share/xt_geoip/AE.iv4
+usr/share/xt_geoip/AF.iv4
+usr/share/xt_geoip/AG.iv4
+usr/share/xt_geoip/AI.iv4
+usr/share/xt_geoip/AL.iv4
+usr/share/xt_geoip/AM.iv4
+usr/share/xt_geoip/AN.iv4
+usr/share/xt_geoip/AO.iv4
+usr/share/xt_geoip/AP.iv4
+usr/share/xt_geoip/AQ.iv4
+usr/share/xt_geoip/AR.iv4
+usr/share/xt_geoip/AS.iv4
+usr/share/xt_geoip/AT.iv4
+usr/share/xt_geoip/AU.iv4
+usr/share/xt_geoip/AW.iv4
+usr/share/xt_geoip/AX.iv4
+usr/share/xt_geoip/AZ.iv4
+usr/share/xt_geoip/BA.iv4
+usr/share/xt_geoip/BB.iv4
+usr/share/xt_geoip/BD.iv4
+usr/share/xt_geoip/BE.iv4
+usr/share/xt_geoip/BF.iv4
+usr/share/xt_geoip/BG.iv4
+usr/share/xt_geoip/BH.iv4
+usr/share/xt_geoip/BI.iv4
+usr/share/xt_geoip/BJ.iv4
+usr/share/xt_geoip/BL.iv4
+usr/share/xt_geoip/BM.iv4
+usr/share/xt_geoip/BN.iv4
+usr/share/xt_geoip/BO.iv4
+usr/share/xt_geoip/BQ.iv4
+usr/share/xt_geoip/BR.iv4
+usr/share/xt_geoip/BS.iv4
+usr/share/xt_geoip/BT.iv4
+usr/share/xt_geoip/BV.iv4
+usr/share/xt_geoip/BW.iv4
+usr/share/xt_geoip/BY.iv4
+usr/share/xt_geoip/BZ.iv4
+usr/share/xt_geoip/CA.iv4
+usr/share/xt_geoip/CC.iv4
+usr/share/xt_geoip/CD.iv4
+usr/share/xt_geoip/CF.iv4
+usr/share/xt_geoip/CG.iv4
+usr/share/xt_geoip/CH.iv4
+usr/share/xt_geoip/CI.iv4
+usr/share/xt_geoip/CK.iv4
+usr/share/xt_geoip/CL.iv4
+usr/share/xt_geoip/CM.iv4
+usr/share/xt_geoip/CN.iv4
+usr/share/xt_geoip/CO.iv4
+usr/share/xt_geoip/CR.iv4
+usr/share/xt_geoip/CU.iv4
+usr/share/xt_geoip/CV.iv4
+usr/share/xt_geoip/CW.iv4
+usr/share/xt_geoip/CX.iv4
+usr/share/xt_geoip/CY.iv4
+usr/share/xt_geoip/CZ.iv4
+usr/share/xt_geoip/DE.iv4
+usr/share/xt_geoip/DJ.iv4
+usr/share/xt_geoip/DK.iv4
+usr/share/xt_geoip/DM.iv4
+usr/share/xt_geoip/DO.iv4
+usr/share/xt_geoip/DZ.iv4
+usr/share/xt_geoip/EC.iv4
+usr/share/xt_geoip/EE.iv4
+usr/share/xt_geoip/EG.iv4
+usr/share/xt_geoip/EH.iv4
+usr/share/xt_geoip/ER.iv4
+usr/share/xt_geoip/ES.iv4
+usr/share/xt_geoip/ET.iv4
+usr/share/xt_geoip/EU.iv4
+usr/share/xt_geoip/FI.iv4
+usr/share/xt_geoip/FJ.iv4
+usr/share/xt_geoip/FK.iv4
+usr/share/xt_geoip/FM.iv4
+usr/share/xt_geoip/FO.iv4
+usr/share/xt_geoip/FR.iv4
+usr/share/xt_geoip/FX.iv4
+usr/share/xt_geoip/GA.iv4
+usr/share/xt_geoip/GB.iv4
+usr/share/xt_geoip/GD.iv4
+usr/share/xt_geoip/GE.iv4
+usr/share/xt_geoip/GF.iv4
+usr/share/xt_geoip/GG.iv4
+usr/share/xt_geoip/GH.iv4
+usr/share/xt_geoip/GI.iv4
+usr/share/xt_geoip/GL.iv4
+usr/share/xt_geoip/GM.iv4
+usr/share/xt_geoip/GN.iv4
+usr/share/xt_geoip/GP.iv4
+usr/share/xt_geoip/GQ.iv4
+usr/share/xt_geoip/GR.iv4
+usr/share/xt_geoip/GS.iv4
+usr/share/xt_geoip/GT.iv4
+usr/share/xt_geoip/GU.iv4
+usr/share/xt_geoip/GW.iv4
+usr/share/xt_geoip/GY.iv4
+usr/share/xt_geoip/HK.iv4
+usr/share/xt_geoip/HM.iv4
+usr/share/xt_geoip/HN.iv4
+usr/share/xt_geoip/HR.iv4
+usr/share/xt_geoip/HT.iv4
+usr/share/xt_geoip/HU.iv4
+usr/share/xt_geoip/ID.iv4
+usr/share/xt_geoip/IE.iv4
+usr/share/xt_geoip/IL.iv4
+usr/share/xt_geoip/IM.iv4
+usr/share/xt_geoip/IN.iv4
+usr/share/xt_geoip/IO.iv4
+usr/share/xt_geoip/IQ.iv4
+usr/share/xt_geoip/IR.iv4
+usr/share/xt_geoip/IS.iv4
+usr/share/xt_geoip/IT.iv4
+usr/share/xt_geoip/JE.iv4
+usr/share/xt_geoip/JM.iv4
+usr/share/xt_geoip/JO.iv4
+usr/share/xt_geoip/JP.iv4
+usr/share/xt_geoip/KE.iv4
+usr/share/xt_geoip/KG.iv4
+usr/share/xt_geoip/KH.iv4
+usr/share/xt_geoip/KI.iv4
+usr/share/xt_geoip/KM.iv4
+usr/share/xt_geoip/KN.iv4
+usr/share/xt_geoip/KP.iv4
+usr/share/xt_geoip/KR.iv4
+usr/share/xt_geoip/KW.iv4
+usr/share/xt_geoip/KY.iv4
+usr/share/xt_geoip/KZ.iv4
+usr/share/xt_geoip/LA.iv4
+usr/share/xt_geoip/LB.iv4
+usr/share/xt_geoip/LC.iv4
+usr/share/xt_geoip/LI.iv4
+usr/share/xt_geoip/LK.iv4
+usr/share/xt_geoip/LR.iv4
+usr/share/xt_geoip/LS.iv4
+usr/share/xt_geoip/LT.iv4
+usr/share/xt_geoip/LU.iv4
+usr/share/xt_geoip/LV.iv4
+usr/share/xt_geoip/LY.iv4
+usr/share/xt_geoip/MA.iv4
+usr/share/xt_geoip/MC.iv4
+usr/share/xt_geoip/MD.iv4
+usr/share/xt_geoip/ME.iv4
+usr/share/xt_geoip/MF.iv4
+usr/share/xt_geoip/MG.iv4
+usr/share/xt_geoip/MH.iv4
+usr/share/xt_geoip/MK.iv4
+usr/share/xt_geoip/ML.iv4
+usr/share/xt_geoip/MM.iv4
+usr/share/xt_geoip/MN.iv4
+usr/share/xt_geoip/MO.iv4
+usr/share/xt_geoip/MP.iv4
+usr/share/xt_geoip/MQ.iv4
+usr/share/xt_geoip/MR.iv4
+usr/share/xt_geoip/MS.iv4
+usr/share/xt_geoip/MT.iv4
+usr/share/xt_geoip/MU.iv4
+usr/share/xt_geoip/MV.iv4
+usr/share/xt_geoip/MW.iv4
+usr/share/xt_geoip/MX.iv4
+usr/share/xt_geoip/MY.iv4
+usr/share/xt_geoip/MZ.iv4
+usr/share/xt_geoip/NA.iv4
+usr/share/xt_geoip/NC.iv4
+usr/share/xt_geoip/NE.iv4
+usr/share/xt_geoip/NF.iv4
+usr/share/xt_geoip/NG.iv4
+usr/share/xt_geoip/NI.iv4
+usr/share/xt_geoip/NL.iv4
+usr/share/xt_geoip/NO.iv4
+usr/share/xt_geoip/NP.iv4
+usr/share/xt_geoip/NR.iv4
+usr/share/xt_geoip/NU.iv4
+usr/share/xt_geoip/NZ.iv4
+usr/share/xt_geoip/OM.iv4
+usr/share/xt_geoip/PA.iv4
+usr/share/xt_geoip/PE.iv4
+usr/share/xt_geoip/PF.iv4
+usr/share/xt_geoip/PG.iv4
+usr/share/xt_geoip/PH.iv4
+usr/share/xt_geoip/PK.iv4
+usr/share/xt_geoip/PL.iv4
+usr/share/xt_geoip/PM.iv4
+usr/share/xt_geoip/PN.iv4
+usr/share/xt_geoip/PR.iv4
+usr/share/xt_geoip/PS.iv4
+usr/share/xt_geoip/PT.iv4
+usr/share/xt_geoip/PW.iv4
+usr/share/xt_geoip/PY.iv4
+usr/share/xt_geoip/QA.iv4
+usr/share/xt_geoip/RE.iv4
+usr/share/xt_geoip/RO.iv4
+usr/share/xt_geoip/RS.iv4
+usr/share/xt_geoip/RU.iv4
+usr/share/xt_geoip/RW.iv4
+usr/share/xt_geoip/SA.iv4
+usr/share/xt_geoip/SB.iv4
+usr/share/xt_geoip/SC.iv4
+usr/share/xt_geoip/SD.iv4
+usr/share/xt_geoip/SE.iv4
+usr/share/xt_geoip/SG.iv4
+usr/share/xt_geoip/SH.iv4
+usr/share/xt_geoip/SI.iv4
+usr/share/xt_geoip/SJ.iv4
+usr/share/xt_geoip/SK.iv4
+usr/share/xt_geoip/SL.iv4
+usr/share/xt_geoip/SM.iv4
+usr/share/xt_geoip/SN.iv4
+usr/share/xt_geoip/SO.iv4
+usr/share/xt_geoip/SR.iv4
+usr/share/xt_geoip/SS.iv4
+usr/share/xt_geoip/ST.iv4
+usr/share/xt_geoip/SV.iv4
+usr/share/xt_geoip/SX.iv4
+usr/share/xt_geoip/SY.iv4
+usr/share/xt_geoip/SZ.iv4
+usr/share/xt_geoip/TC.iv4
+usr/share/xt_geoip/TD.iv4
+usr/share/xt_geoip/TF.iv4
+usr/share/xt_geoip/TG.iv4
+usr/share/xt_geoip/TH.iv4
+usr/share/xt_geoip/TJ.iv4
+usr/share/xt_geoip/TK.iv4
+usr/share/xt_geoip/TL.iv4
+usr/share/xt_geoip/TM.iv4
+usr/share/xt_geoip/TN.iv4
+usr/share/xt_geoip/TO.iv4
+usr/share/xt_geoip/TR.iv4
+usr/share/xt_geoip/TT.iv4
+usr/share/xt_geoip/TV.iv4
+usr/share/xt_geoip/TW.iv4
+usr/share/xt_geoip/TZ.iv4
+usr/share/xt_geoip/UA.iv4
+usr/share/xt_geoip/UG.iv4
+usr/share/xt_geoip/UM.iv4
+usr/share/xt_geoip/US.iv4
+usr/share/xt_geoip/UY.iv4
+usr/share/xt_geoip/UZ.iv4
+usr/share/xt_geoip/VA.iv4
+usr/share/xt_geoip/VC.iv4
+usr/share/xt_geoip/VE.iv4
+usr/share/xt_geoip/VG.iv4
+usr/share/xt_geoip/VI.iv4
+usr/share/xt_geoip/VN.iv4
+usr/share/xt_geoip/VU.iv4
+usr/share/xt_geoip/WF.iv4
+usr/share/xt_geoip/WS.iv4
+usr/share/xt_geoip/YE.iv4
+usr/share/xt_geoip/YT.iv4
+usr/share/xt_geoip/ZA.iv4
+usr/share/xt_geoip/ZM.iv4
+usr/share/xt_geoip/ZW.iv4
+#var/lib/location
+var/lib/location/database.db
+var/lib/location/signing-key.pem
usr/local/bin/consort.sh
usr/local/bin/convert-dns-settings
usr/local/bin/convert-ovpn
+usr/local/bin/convert-to-location
usr/local/bin/filesystem-cleanup
usr/local/bin/hddshutdown
usr/local/bin/ipsec-interfaces
usr/local/bin/timezone-transition
usr/local/bin/update-lang-cache
usr/local/bin/update-ids-ruleset
-usr/local/bin/xt_geoip_build
-usr/local/bin/xt_geoip_update
+usr/local/bin/update-location-database
#usr/local/include
#usr/local/lib
#usr/local/lib/sse2
srv/web/ipfire/cgi-bin/fireinfo.cgi
srv/web/ipfire/cgi-bin/firewall.cgi
srv/web/ipfire/cgi-bin/fwhosts.cgi
-srv/web/ipfire/cgi-bin/geoip-block.cgi
srv/web/ipfire/cgi-bin/gpl.cgi
#srv/web/ipfire/cgi-bin/guardian.cgi
srv/web/ipfire/cgi-bin/gui.cgi
srv/web/ipfire/cgi-bin/index.cgi
srv/web/ipfire/cgi-bin/ipinfo.cgi
srv/web/ipfire/cgi-bin/iptables.cgi
+srv/web/ipfire/cgi-bin/location-block.cgi
srv/web/ipfire/cgi-bin/logs.cgi
srv/web/ipfire/cgi-bin/logs.cgi/calamaris.dat
srv/web/ipfire/cgi-bin/logs.cgi/config.dat
etc/rc.d/init.d/networking/red.up/98-leds
etc/rc.d/init.d/networking/red.up/99-beep
etc/rc.d/init.d/networking/red.up/99-fireinfo
-etc/rc.d/init.d/networking/red.up/99-geoip-database
etc/rc.d/init.d/networking/red.up/99-pakfire-update
etc/rc.d/init.d/networking/wpa_supplicant.exe
etc/rc.d/init.d/ntp
usr/local/bin/timezone-transition
usr/local/bin/update-ids-ruleset
usr/local/bin/update-lang-cache
-usr/local/bin/xt_geoip_build
-usr/local/bin/xt_geoip_update
+usr/local/bin/update-location-database
#usr/local/include
#usr/local/lib
#usr/local/lib/sse2
usr/lib/libxt_ACCOUNT_cl.so.0
usr/lib/libxt_ACCOUNT_cl.so.0.0.0
#usr/libexec/xtables-addons
-usr/libexec/xtables-addons/xt_geoip_build
-usr/libexec/xtables-addons/xt_geoip_dl
-usr/local/bin/xt_geoip_build
+#usr/libexec/xtables-addons/xt_geoip_build
+#usr/libexec/xtables-addons/xt_geoip_dl
usr/sbin/iptaccount
#usr/share/man/man1/xt_geoip_build.1
#usr/share/man/man1/xt_geoip_dl.1
#usr/share/man/man8/iptaccount.8
#usr/share/man/man8/xtables-addons.8
+/usr/share/xt_geoip/
WARNING: untranslated string: fwdfw wd_tue = Tue
WARNING: untranslated string: fwdfw wd_wed = Wed
WARNING: untranslated string: fwhost OpenVPN N-2-N = OpenVPN Net-to-Net
-WARNING: untranslated string: fwhost addgeoipgrp = Add new GeoIP group
+WARNING: untranslated string: fwhost addgeoipgrp = Add new Location group
WARNING: untranslated string: fwhost addgrp = Add new network/host group
WARNING: untranslated string: fwhost addgrpname = Group name:
WARNING: untranslated string: fwhost addhost = Add new host
WARNING: untranslated string: fwhost ccdnet = OpenVPN networks:
WARNING: untranslated string: fwhost change = Modify
WARNING: untranslated string: fwhost cust addr = Hosts
-WARNING: untranslated string: fwhost cust geoipgroup = GeoIP Groups
+WARNING: untranslated string: fwhost cust geoipgroup = Location Groups
WARNING: untranslated string: fwhost cust geoipgrp = unknown string
-WARNING: untranslated string: fwhost cust geoiplocation = GeoIP Locations
+WARNING: untranslated string: fwhost cust geoiplocation = Location Locations
WARNING: untranslated string: fwhost cust grp = Network/Host Groups
WARNING: untranslated string: fwhost cust net = Networks
WARNING: untranslated string: fwhost cust service = Services
WARNING: untranslated string: fwhost ipsec net = IPsec networks:
WARNING: untranslated string: fwhost menu = Firewall Groups
WARNING: untranslated string: fwhost netaddress = Network address
-WARNING: untranslated string: fwhost newgeoipgrp = GeoIP Groups
+WARNING: untranslated string: fwhost newgeoipgrp = Location Groups
WARNING: untranslated string: fwhost newgrp = Network/Host Groups
WARNING: untranslated string: fwhost newhost = Hosts
WARNING: untranslated string: fwhost newnet = Networks
WARNING: untranslated string: generate root/host certificates = Generate root/host certificates
WARNING: untranslated string: generating the root and host certificates may take a long time. it can take up to several minutes on older hardware. please be patient = Generating the root and host certificates may take a long time. It can take up to several minutes on older hardware. Please be patient.
WARNING: untranslated string: genre = Genre
-WARNING: untranslated string: geoip = GeoIP
-WARNING: untranslated string: geoipblock = GeoIP Block
+WARNING: untranslated string: geoip = Location
+WARNING: untranslated string: geoipblock = Location Block
WARNING: untranslated string: geoipblock block countries = Block countries
-WARNING: untranslated string: geoipblock configuration = GeoIP Configuration
+WARNING: untranslated string: geoipblock configuration = Location Configuration
WARNING: untranslated string: geoipblock country is allowed = Incoming traffic from this country is allowed
WARNING: untranslated string: geoipblock country is blocked = Incoming traffic from this country will be blocked
-WARNING: untranslated string: geoipblock enable feature = Enable GeoIP based blocking:
+WARNING: untranslated string: geoipblock enable feature = Enable Location based blocking:
WARNING: untranslated string: global settings = Global Settings
WARNING: untranslated string: gpl i accept these terms and conditions = I accept these terms and conditions
WARNING: untranslated string: gpl license agreement = License Agreement
WARNING: untranslated string: fwdfw wd_tue = Tue
WARNING: untranslated string: fwdfw wd_wed = Wed
WARNING: untranslated string: fwhost OpenVPN N-2-N = OpenVPN Net-to-Net
-WARNING: untranslated string: fwhost addgeoipgrp = Add new GeoIP group
+WARNING: untranslated string: fwhost addgeoipgrp = Add new Location group
WARNING: untranslated string: fwhost addgrp = Add new network/host group
WARNING: untranslated string: fwhost addgrpname = Group name:
WARNING: untranslated string: fwhost addhost = Add new host
WARNING: untranslated string: fwhost ccdnet = OpenVPN networks:
WARNING: untranslated string: fwhost change = Modify
WARNING: untranslated string: fwhost cust addr = Hosts
-WARNING: untranslated string: fwhost cust geoipgroup = GeoIP Groups
+WARNING: untranslated string: fwhost cust geoipgroup = Location Groups
WARNING: untranslated string: fwhost cust geoipgrp = unknown string
-WARNING: untranslated string: fwhost cust geoiplocation = GeoIP Locations
+WARNING: untranslated string: fwhost cust geoiplocation = Location Locations
WARNING: untranslated string: fwhost cust grp = Network/Host Groups
WARNING: untranslated string: fwhost cust net = Networks
WARNING: untranslated string: fwhost cust service = Services
WARNING: untranslated string: fwhost ipsec net = IPsec networks:
WARNING: untranslated string: fwhost menu = Firewall Groups
WARNING: untranslated string: fwhost netaddress = Network address
-WARNING: untranslated string: fwhost newgeoipgrp = GeoIP Groups
+WARNING: untranslated string: fwhost newgeoipgrp = Location Groups
WARNING: untranslated string: fwhost newgrp = Network/Host Groups
WARNING: untranslated string: fwhost newhost = Hosts
WARNING: untranslated string: fwhost newnet = Networks
WARNING: untranslated string: fwdfw maxconcon = Max. concurrent connections
WARNING: untranslated string: fwdfw numcon = Number of connections
WARNING: untranslated string: fwdfw ratelimit = Rate-limit new connections
-WARNING: untranslated string: fwhost addgeoipgrp = Add new GeoIP group
-WARNING: untranslated string: fwhost cust geoipgroup = GeoIP Groups
+WARNING: untranslated string: fwhost addgeoipgrp = Add new Location group
+WARNING: untranslated string: fwhost cust geoipgroup = Location Groups
WARNING: untranslated string: fwhost cust geoipgrp = unknown string
-WARNING: untranslated string: fwhost cust geoiplocation = GeoIP Locations
+WARNING: untranslated string: fwhost cust geoiplocation = Location Locations
WARNING: untranslated string: fwhost err hostip = unknown string
-WARNING: untranslated string: fwhost newgeoipgrp = GeoIP Groups
+WARNING: untranslated string: fwhost newgeoipgrp = Location Groups
WARNING: untranslated string: generate ptr = Generate PTR
-WARNING: untranslated string: geoip = GeoIP
-WARNING: untranslated string: geoipblock = GeoIP Block
+WARNING: untranslated string: geoip = Location
+WARNING: untranslated string: geoipblock = Location Block
WARNING: untranslated string: geoipblock block countries = Block countries
-WARNING: untranslated string: geoipblock configuration = GeoIP Configuration
+WARNING: untranslated string: geoipblock configuration = Location Configuration
WARNING: untranslated string: geoipblock country is allowed = Incoming traffic from this country is allowed
WARNING: untranslated string: geoipblock country is blocked = Incoming traffic from this country will be blocked
-WARNING: untranslated string: geoipblock enable feature = Enable GeoIP based blocking:
+WARNING: untranslated string: geoipblock enable feature = Enable Location based blocking:
WARNING: untranslated string: guaranteed bandwith = Guaranteed bandwith
WARNING: untranslated string: guardian = Guardian
WARNING: untranslated string: guardian block a host = unknown string
WARNING: untranslated string: fwdfw maxconcon = Max. concurrent connections
WARNING: untranslated string: fwdfw numcon = Number of connections
WARNING: untranslated string: fwdfw ratelimit = Rate-limit new connections
-WARNING: untranslated string: fwhost addgeoipgrp = Add new GeoIP group
-WARNING: untranslated string: fwhost cust geoipgroup = GeoIP Groups
+WARNING: untranslated string: fwhost addgeoipgrp = Add new Location group
+WARNING: untranslated string: fwhost cust geoipgroup = Location Groups
WARNING: untranslated string: fwhost cust geoipgrp = unknown string
-WARNING: untranslated string: fwhost cust geoiplocation = GeoIP Locations
+WARNING: untranslated string: fwhost cust geoiplocation = Location Locations
WARNING: untranslated string: fwhost err hostip = unknown string
-WARNING: untranslated string: fwhost newgeoipgrp = GeoIP Groups
+WARNING: untranslated string: fwhost newgeoipgrp = Location Groups
WARNING: untranslated string: gen dh = Generate new Diffie-Hellman parameters
WARNING: untranslated string: generate dh key = Generate Diffie-Hellman parameters
WARNING: untranslated string: generate ptr = Generate PTR
-WARNING: untranslated string: geoip = GeoIP
-WARNING: untranslated string: geoipblock = GeoIP Block
+WARNING: untranslated string: geoip = Location
+WARNING: untranslated string: geoipblock = Location Block
WARNING: untranslated string: geoipblock block countries = Block countries
-WARNING: untranslated string: geoipblock configuration = GeoIP Configuration
+WARNING: untranslated string: geoipblock configuration = Location Configuration
WARNING: untranslated string: geoipblock country is allowed = Incoming traffic from this country is allowed
WARNING: untranslated string: geoipblock country is blocked = Incoming traffic from this country will be blocked
-WARNING: untranslated string: geoipblock enable feature = Enable GeoIP based blocking:
+WARNING: untranslated string: geoipblock enable feature = Enable Location based blocking:
WARNING: untranslated string: guardian = Guardian
WARNING: untranslated string: guardian block a host = unknown string
WARNING: untranslated string: guardian block httpd brute-force = unknown string
WARNING: untranslated string: fwdfw wd_tue = Tue
WARNING: untranslated string: fwdfw wd_wed = Wed
WARNING: untranslated string: fwhost OpenVPN N-2-N = OpenVPN Net-to-Net
-WARNING: untranslated string: fwhost addgeoipgrp = Add new GeoIP group
+WARNING: untranslated string: fwhost addgeoipgrp = Add new Location group
WARNING: untranslated string: fwhost addgrp = Add new network/host group
WARNING: untranslated string: fwhost addgrpname = Group name:
WARNING: untranslated string: fwhost addhost = Add new host
WARNING: untranslated string: fwhost ccdnet = OpenVPN networks:
WARNING: untranslated string: fwhost change = Modify
WARNING: untranslated string: fwhost cust addr = Hosts
-WARNING: untranslated string: fwhost cust geoipgroup = GeoIP Groups
+WARNING: untranslated string: fwhost cust geoipgroup = Location Groups
WARNING: untranslated string: fwhost cust geoipgrp = unknown string
-WARNING: untranslated string: fwhost cust geoiplocation = GeoIP Locations
+WARNING: untranslated string: fwhost cust geoiplocation = Location Locations
WARNING: untranslated string: fwhost cust grp = Network/Host Groups
WARNING: untranslated string: fwhost cust net = Networks
WARNING: untranslated string: fwhost cust service = Services
WARNING: untranslated string: fwhost ipsec net = IPsec networks:
WARNING: untranslated string: fwhost menu = Firewall Groups
WARNING: untranslated string: fwhost netaddress = Network address
-WARNING: untranslated string: fwhost newgeoipgrp = GeoIP Groups
+WARNING: untranslated string: fwhost newgeoipgrp = Location Groups
WARNING: untranslated string: fwhost newgrp = Network/Host Groups
WARNING: untranslated string: fwhost newhost = Hosts
WARNING: untranslated string: fwhost newnet = Networks
WARNING: untranslated string: fwdfw wd_tue = Tue
WARNING: untranslated string: fwdfw wd_wed = Wed
WARNING: untranslated string: fwhost OpenVPN N-2-N = OpenVPN Net-to-Net
-WARNING: untranslated string: fwhost addgeoipgrp = Add new GeoIP group
+WARNING: untranslated string: fwhost addgeoipgrp = Add new Location group
WARNING: untranslated string: fwhost addgrp = Add new network/host group
WARNING: untranslated string: fwhost addgrpname = Group name:
WARNING: untranslated string: fwhost addhost = Add new host
WARNING: untranslated string: fwhost ccdnet = OpenVPN networks:
WARNING: untranslated string: fwhost change = Modify
WARNING: untranslated string: fwhost cust addr = Hosts
-WARNING: untranslated string: fwhost cust geoipgroup = GeoIP Groups
+WARNING: untranslated string: fwhost cust geoipgroup = Location Groups
WARNING: untranslated string: fwhost cust geoipgrp = unknown string
-WARNING: untranslated string: fwhost cust geoiplocation = GeoIP Locations
+WARNING: untranslated string: fwhost cust geoiplocation = Location Locations
WARNING: untranslated string: fwhost cust grp = Network/Host Groups
WARNING: untranslated string: fwhost cust net = Networks
WARNING: untranslated string: fwhost cust service = Services
WARNING: untranslated string: fwhost ipsec net = IPsec networks:
WARNING: untranslated string: fwhost menu = Firewall Groups
WARNING: untranslated string: fwhost netaddress = Network address
-WARNING: untranslated string: fwhost newgeoipgrp = GeoIP Groups
+WARNING: untranslated string: fwhost newgeoipgrp = Location Groups
WARNING: untranslated string: fwhost newgrp = Network/Host Groups
WARNING: untranslated string: fwhost newhost = Hosts
WARNING: untranslated string: fwhost newnet = Networks
WARNING: untranslated string: gen dh = Generate new Diffie-Hellman parameters
WARNING: untranslated string: generate dh key = Generate Diffie-Hellman parameters
WARNING: untranslated string: generate ptr = Generate PTR
-WARNING: untranslated string: geoip = GeoIP
-WARNING: untranslated string: geoipblock = GeoIP Block
+WARNING: untranslated string: geoip = Location
+WARNING: untranslated string: geoipblock = Location Block
WARNING: untranslated string: geoipblock block countries = Block countries
-WARNING: untranslated string: geoipblock configuration = GeoIP Configuration
+WARNING: untranslated string: geoipblock configuration = Location Configuration
WARNING: untranslated string: geoipblock country is allowed = Incoming traffic from this country is allowed
WARNING: untranslated string: geoipblock country is blocked = Incoming traffic from this country will be blocked
-WARNING: untranslated string: geoipblock enable feature = Enable GeoIP based blocking:
+WARNING: untranslated string: geoipblock enable feature = Enable Location based blocking:
WARNING: untranslated string: grouptype = Grouptype:
WARNING: untranslated string: guardian = Guardian
WARNING: untranslated string: guardian block a host = unknown string
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
-require "${General::swroot}/geoip-functions.pl";
+require "${General::swroot}/location-functions.pl";
my $colour_multicast = "#A0A0A0";
my @dummy = ( ${Header::table1colour} );
undef (@dummy);
+# Init libloc database connection.
+my $libloc_db_handle = &Location::Functions::init();
+
# check sorting arguments
if ( $cgiin{'sort_field'} ~~ [ '1','2','3','4','5','6','7','8','9' ] ) {
$SORT_FIELD = $cgiin{'sort_field'};
my $bytes_in = format_bytes($bytes[0]);
my $bytes_out = format_bytes($bytes[1]);
- # enumerate GeoIP information
- my $srcccode = &GeoIP::lookup($sip_ret);
- my $src_flag_icon = &GeoIP::get_flag_icon($srcccode);
- my $dstccode = &GeoIP::lookup($dip_ret);
- my $dst_flag_icon = &GeoIP::get_flag_icon($dstccode);
+ # enumerate location information
+ my $srcccode = &Location::Functions::lookup_country_code($libloc_db_handle, $sip_ret);
+ my $src_flag_icon = &Location::Functions::get_flag_icon($srcccode);
+ my $dstccode = &Location::Functions::lookup_country_code($libloc_db_handle, $dip_ret);
+ my $dst_flag_icon = &Location::Functions::get_flag_icon($dstccode);
# Format TTL
$ttl = format_time($ttl);
my $lines2 = '';
require '/var/ipfire/general-functions.pl';
-require "${General::swroot}/geoip-functions.pl";
+require "${General::swroot}/location-functions.pl";
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
$country = uc($country);
# Get flag icon for of the country.
- my $flag_icon = &GeoIP::get_flag_icon($country);
+ my $flag_icon = &Location::Functions::get_flag_icon($country);
# Get country name.
- my $name = &GeoIP::get_full_country_name($country);
+ my $name = &Location::Functions::get_full_country_name($country);
if ($lines % 2) {
print "<td $col><a id='$country'><img src='$flag_icon' alt='$country' title='$country'/></a></td>";
;
&Header::closebox();
-&Header::openbox("100%", "left", $Lang::tr{'other'});
-print <<END
- <p>
- This product includes GeoLite data created by MaxMind, available from
- <a href='http://www.maxmind.com/' target="_blank">http://www.maxmind.com/</a>.
- </p>
-END
-;
-&Header::closebox();
-
&Header::closebigbox();
&Header::closepage();
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
-require "${General::swroot}/geoip-functions.pl";
+require "${General::swroot}/location-functions.pl";
require "${General::swroot}/ids-functions.pl";
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
# Read-in config file.
&General::readhasharray("$servers_file", \%dns_servers);
+# Libloc database handle
+my $libloc_db_handle = &Location::Functions::init();
+
&Header::openpage($Lang::tr{'dns'}, 1, '');
&Header::openbigbox('100%', 'left', '', $errormessage);
$status_colour = ${Header::colourred};
}
- # collect more information about name server (rDNS, GeoIP country code)
- my $ccode = &GeoIP::lookup($nameserver);
- my $flag_icon = &GeoIP::get_flag_icon($ccode);
+ # collect more information about name server (rDNS, country code)
+ my $ccode = &Location::Functions::lookup_country_code($libloc_db_handle, $nameserver);
+ my $flag_icon = &Location::Functions::get_flag_icon($ccode);
my $rdns;
require '/var/ipfire/network-functions.pl';
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
-require "${General::swroot}/geoip-functions.pl";
+require "${General::swroot}/location-functions.pl";
require "/usr/lib/firewall/firewall-lib.pl";
unless (-d "${General::swroot}/firewall") { system("mkdir ${General::swroot}/firewall"); }
my %netsettings=();
my %customhost=();
my %customgrp=();
-my %customgeoipgrp=();
+my %customlocationgrp=();
my %customnetworks=();
my %customservice=();
my %customservicegrp=();
my $confignet = "${General::swroot}/fwhosts/customnetworks";
my $confighost = "${General::swroot}/fwhosts/customhosts";
my $configgrp = "${General::swroot}/fwhosts/customgroups";
-my $configgeoipgrp = "${General::swroot}/fwhosts/customgeoipgrp";
+my $configlocationgrp = "${General::swroot}/fwhosts/customlocationgrp";
my $configsrv = "${General::swroot}/fwhosts/customservices";
my $configsrvgrp = "${General::swroot}/fwhosts/customservicegrp";
my $configccdnet = "${General::swroot}/ovpn/ccd.conf";
}
print"</select></td>";
}
- # geoip locations / groups.
- my @geoip_locations = &fwlib::get_geoip_locations();
+ # Locations / groups.
+ my @locations = &fwlib::get_locations();
print "<tr>\n";
- print "<td valign='top'><input type='radio' name='$grp' id='cust_geoip_$srctgt' value='cust_geoip_$srctgt' $checked{$grp}{'cust_geoip_'.$srctgt}></td>\n";
- print "<td>$Lang::tr{'geoip'}</td>\n";
- print "<td align='right'><select name='cust_geoip_$srctgt' style='width:200px;'>\n";
-
- # Add GeoIP groups to dropdown.
- if (!-z $configgeoipgrp) {
- print "<optgroup label='$Lang::tr{'fwhost cust geoipgroup'}'>\n";
- foreach my $key (sort { ncmp($customgeoipgrp{$a}[0],$customgeoipgrp{$b}[0]) } keys %customgeoipgrp) {
+ print "<td valign='top'><input type='radio' name='$grp' id='cust_location_$srctgt' value='cust_location_$srctgt' $checked{$grp}{'cust_location_'.$srctgt}></td>\n";
+ print "<td>$Lang::tr{'location'}</td>\n";
+ print "<td align='right'><select name='cust_location_$srctgt' style='width:200px;'>\n";
+
+ # Add Location groups to dropdown.
+ if (!-z $configlocationgrp) {
+ print "<optgroup label='$Lang::tr{'fwhost cust locationgroup'}'>\n";
+ foreach my $key (sort { ncmp($customlocationgrp{$a}[0],$customlocationgrp{$b}[0]) } keys %customlocationgrp) {
my $selected;
# Generate stored value for select detection.
- my $stored = join(':', "group",$customgeoipgrp{$key}[0]);
+ my $stored = join(':', "group",$customlocationgrp{$key}[0]);
# Only show a group once and group with elements.
- if($helper ne $customgeoipgrp{$key}[0] && $customgeoipgrp{$key}[2] ne 'none') {
+ if($helper ne $customlocationgrp{$key}[0] && $customlocationgrp{$key}[2] ne 'none') {
# Mark current entry as selected.
if ($fwdfwsettings{$fwdfwsettings{$grp}} eq $stored) {
$selected = "selected='selected'";
}
- print"<option $selected value='group:$customgeoipgrp{$key}[0]'>$customgeoipgrp{$key}[0]</option>\n";
+ print"<option $selected value='group:$customlocationgrp{$key}[0]'>$customlocationgrp{$key}[0]</option>\n";
}
- $helper=$customgeoipgrp{$key}[0];
+ $helper=$customlocationgrp{$key}[0];
}
print "</optgroup>\n";
}
# Add locations.
- print "<optgroup label='$Lang::tr{'fwhost cust geoiplocation'}'>\n";
- foreach my $location (@geoip_locations) {
+ print "<optgroup label='$Lang::tr{'fwhost cust location'}'>\n";
+ foreach my $location (@locations) {
# Get country name.
- my $country_name = &GeoIP::get_full_country_name($location);
+ my $country_name = &Location::Functions::get_full_country_name($location);
# Mark current entry as selected.
my $selected;
}
print "</optgroup>\n";
- # Close GeoIP dropdown.
+ # Close Locations dropdown.
print "</select></td>\n";
#End left table. start right table (vpn)
&General::readhasharray("$confighost", \%customhost);
&General::readhasharray("$configccdhost", \%ccdhost);
&General::readhasharray("$configgrp", \%customgrp);
- &General::readhasharray("$configgeoipgrp", \%customgeoipgrp);
+ &General::readhasharray("$configlocationgrp", \%customlocationgrp);
&General::readhasharray("$configipsec", \%ipsecconf);
&General::get_aliases(\%aliases);
my %checked=();
}else{
print $$hash{$key}[4];
}
- }elsif ($$hash{$key}[3] eq 'cust_geoip_src') {
+ }elsif ($$hash{$key}[3] eq 'cust_location_src') {
my ($split1,$split2) = split(":", $$hash{$key}[4]);
if ($split2) {
print "$split2\n";
}else{
- print "$Lang::tr{'geoip'}: $$hash{$key}[4]\n";
+ print "$Lang::tr{'location'}: $$hash{$key}[4]\n";
}
}elsif ($$hash{$key}[4] eq 'RED1'){
print "$ipfireiface $Lang::tr{'fwdfw red'}";
}else{
print $$hash{$key}[6];
}
- }elsif ($$hash{$key}[5] eq 'cust_geoip_tgt') {
+ }elsif ($$hash{$key}[5] eq 'cust_location_tgt') {
my ($split1,$split2) = split(":", $$hash{$key}[6]);
if ($split2) {
print "$split2\n";
}else{
- print "$Lang::tr{'geoip'}: $$hash{$key}[6]\n";
+ print "$Lang::tr{'location'}: $$hash{$key}[6]\n";
}
}elsif ($$hash{$key}[5] eq 'tgt_addr'){
my ($split1,$split2) = split("/",$$hash{$key}[6]);
no warnings 'uninitialized';
require '/var/ipfire/general-functions.pl';
require '/var/ipfire/network-functions.pl';
-require "/var/ipfire/geoip-functions.pl";
+require "/var/ipfire/location-functions.pl";
require "/usr/lib/firewall/firewall-lib.pl";
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
my %customgrp=();
my %customservice=();
my %customservicegrp=();
-my %customgeoipgrp=();
+my %customlocationgrp=();
my %ccdnet=();
my %ccdhost=();
my %ipsecconf=();
my $configipsec = "${General::swroot}/vpn/config";
my $configsrv = "${General::swroot}/fwhosts/customservices";
my $configsrvgrp = "${General::swroot}/fwhosts/customservicegrp";
-my $configgeoipgrp = "${General::swroot}/fwhosts/customgeoipgrp";
+my $configlocationgrp = "${General::swroot}/fwhosts/customlocationgrp";
my $fwconfigfwd = "${General::swroot}/firewall/config";
my $fwconfiginp = "${General::swroot}/firewall/input";
my $fwconfigout = "${General::swroot}/firewall/outgoing";
unless (-e $configgrp) { system("touch $configgrp"); }
unless (-e $configsrv) { system("touch $configsrv"); }
unless (-e $configsrvgrp) { system("touch $configsrvgrp"); }
-unless (-e $configgeoipgrp) { system("touch $configgeoipgrp"); }
+unless (-e $configlocationgrp) { system("touch $configlocationgrp"); }
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
&addgrp;
&viewtablegrp;
}
-if ($fwhostsettings{'ACTION'} eq 'savegeoipgrp')
+if ($fwhostsettings{'ACTION'} eq 'savelocationgrp')
{
my $grp=$fwhostsettings{'grp_name'};
my $rem=$fwhostsettings{'remark'};
my $type;
my @target;
my @newgrp;
- &General::readhasharray("$configgeoipgrp", \%customgeoipgrp);
+ &General::readhasharray("$configlocationgrp", \%customlocationgrp);
&General::readhasharray("$fwconfigfwd", \%fwfwd);
&General::readhasharray("$fwconfiginp", \%fwinp);
&General::readhasharray("$fwconfigout", \%fwout);
if ($fwhostsettings{'update'} eq 'on'){
@target=$fwhostsettings{'COUNTRY_CODE'};
- $type='GeoIP Group';
+ $type='Location Group';
#check if host/net exists in grp
my $test="$grp,$fwhostsettings{'oldremark'},@target";
- foreach my $key (keys %customgeoipgrp) {
- my $test1="$customgeoipgrp{$key}[0],$customgeoipgrp{$key}[1],$customgeoipgrp{$key}[2]";
+ foreach my $key (keys %customlocationgrp) {
+ my $test1="$customlocationgrp{$key}[0],$customlocationgrp{$key}[1],$customlocationgrp{$key}[2]";
if ($test1 eq $test){
$errormessage=$Lang::tr{'fwhost err isingrp'};
$fwhostsettings{'update'} = 'on';
@target="none";
}
#on update, we have to delete the dummy entry
- foreach my $key (keys %customgeoipgrp){
- if ($customgeoipgrp{$key}[0] eq $grp && $customgeoipgrp{$key}[2] eq "none"){
- delete $customgeoipgrp{$key};
+ foreach my $key (keys %customlocationgrp){
+ if ($customlocationgrp{$key}[0] eq $grp && $customlocationgrp{$key}[2] eq "none"){
+ delete $customlocationgrp{$key};
last;
}
}
- &General::writehasharray("$configgeoipgrp", \%customgeoipgrp);
- &General::readhasharray("$configgeoipgrp", \%customgeoipgrp);
+ &General::writehasharray("$configlocationgrp", \%customlocationgrp);
+ &General::readhasharray("$configlocationgrp", \%customlocationgrp);
#create array with new lines
foreach my $line (@target){
push (@newgrp,"$grp,$rem,$line");
}
#append new entries
- my $key = &General::findhasharraykey (\%customgeoipgrp);
+ my $key = &General::findhasharraykey (\%customlocationgrp);
foreach my $line (@newgrp){
- foreach my $i (0 .. 3) { $customgeoipgrp{$key}[$i] = "";}
+ foreach my $i (0 .. 3) { $customlocationgrp{$key}[$i] = "";}
my ($a,$b,$c,$d) = split (",",$line);
- $customgeoipgrp{$key}[0] = $a;
- $customgeoipgrp{$key}[1] = $b;
- $customgeoipgrp{$key}[2] = $c;
- $customgeoipgrp{$key}[3] = $type;
+ $customlocationgrp{$key}[0] = $a;
+ $customlocationgrp{$key}[1] = $b;
+ $customlocationgrp{$key}[2] = $c;
+ $customlocationgrp{$key}[3] = $type;
}
- &General::writehasharray("$configgeoipgrp", \%customgeoipgrp);
+ &General::writehasharray("$configlocationgrp", \%customlocationgrp);
#update counter in Host/Net
$fwhostsettings{'update'}='on';
}
#check if ruleupdate is needed
- my $geoipgrpcount=0;
- $geoipgrpcount=&getgeoipcount($grp);
- if($geoipgrpcount > 0 )
+ my $locationgrpcount=0;
+ $locationgrpcount=&getlocationcount($grp);
+ if($locationgrpcount > 0 )
{
&General::firewall_config_changed();
}
- &addgeoipgrp;
- &viewtablegeoipgrp;
+ &addlocationgrp;
+ &viewtablelocationgrp;
}
if ($fwhostsettings{'ACTION'} eq 'saveservice')
{
&addgrp;
&viewtablegrp;
}
-if ($fwhostsettings{'ACTION'} eq 'editgeoipgrp')
+if ($fwhostsettings{'ACTION'} eq 'editlocationgrp')
{
$fwhostsettings{'update'}='on';
- &addgeoipgrp;
- &viewtablegeoipgrp;
+ &addlocationgrp;
+ &viewtablelocationgrp;
}
if ($fwhostsettings{'ACTION'} eq 'editservice')
{
$fwhostsettings{'remark'} ="";
&showmenu;
}
-if ($fwhostsettings{'ACTION'} eq 'resetgeoipgrp')
+if ($fwhostsettings{'ACTION'} eq 'resetlocationgrp')
{
$fwhostsettings{'grp_name'} ="";
$fwhostsettings{'remark'} ="";
&addgrp;
&viewtablegrp;
}
-if ($fwhostsettings{'ACTION'} eq 'deletegeoipgrpentry')
+if ($fwhostsettings{'ACTION'} eq 'deletelocationgrpentry')
{
my $grpremark;
my $grpname;
- &General::readhasharray("$configgeoipgrp", \%customgeoipgrp);
- foreach my $key (keys %customgeoipgrp){
- if($customgeoipgrp{$key}[0].",".$customgeoipgrp{$key}[1].",".$customgeoipgrp{$key}[2].",".$customgeoipgrp{$key}[3] eq $fwhostsettings{'delentry'}){
- $grpname=$customgeoipgrp{$key}[0];
- $grpremark=$customgeoipgrp{$key}[1];
+ &General::readhasharray("$configlocationgrp", \%customlocationgrp);
+ foreach my $key (keys %customlocationgrp){
+ if($customlocationgrp{$key}[0].",".$customlocationgrp{$key}[1].",".$customlocationgrp{$key}[2].",".$customlocationgrp{$key}[3] eq $fwhostsettings{'delentry'}){
+ $grpname=$customlocationgrp{$key}[0];
+ $grpremark=$customlocationgrp{$key}[1];
#check if we delete the last entry, then generate dummy
if ($fwhostsettings{'last'} eq 'on'){
- $customgeoipgrp{$key}[1] = '';
- $customgeoipgrp{$key}[2] = 'none';
- $customgeoipgrp{$key}[3] = '';
+ $customlocationgrp{$key}[1] = '';
+ $customlocationgrp{$key}[2] = 'none';
+ $customlocationgrp{$key}[3] = '';
$fwhostsettings{'last'}='';
last;
}else{
- delete $customgeoipgrp{$key};
+ delete $customlocationgrp{$key};
}
}
}
- &General::writehasharray("$configgeoipgrp", \%customgeoipgrp);
+ &General::writehasharray("$configlocationgrp", \%customlocationgrp);
&General::firewall_config_changed();
if ($fwhostsettings{'update'} eq 'on'){
$fwhostsettings{'remark'}= $grpremark;
$fwhostsettings{'grp_name'}=$grpname;
}
- &addgeoipgrp;
- &viewtablegeoipgrp;
+ &addlocationgrp;
+ &viewtablelocationgrp;
}
if ($fwhostsettings{'ACTION'} eq 'delgrp')
&addgrp;
&viewtablegrp;
}
-if ($fwhostsettings{'ACTION'} eq 'delgeoipgrp')
+if ($fwhostsettings{'ACTION'} eq 'dellocationgrp')
{
- &General::readhasharray("$configgeoipgrp", \%customgeoipgrp);
+ &General::readhasharray("$configlocationgrp", \%customlocationgrp);
&decrease($fwhostsettings{'grp_name'});
- foreach my $key (sort keys %customgeoipgrp)
+ foreach my $key (sort keys %customlocationgrp)
{
- if($customgeoipgrp{$key}[0] eq $fwhostsettings{'grp_name'})
+ if($customlocationgrp{$key}[0] eq $fwhostsettings{'grp_name'})
{
- delete $customgeoipgrp{$key};
+ delete $customlocationgrp{$key};
}
}
- &General::writehasharray("$configgeoipgrp", \%customgeoipgrp);
+ &General::writehasharray("$configlocationgrp", \%customlocationgrp);
$fwhostsettings{'grp_name'}='';
- &addgeoipgrp;
- &viewtablegeoipgrp;
+ &addlocationgrp;
+ &viewtablelocationgrp;
}
if ($fwhostsettings{'ACTION'} eq 'delservice')
{
&addgrp;
&viewtablegrp;
}
-if ($fwhostsettings{'ACTION'} eq $Lang::tr{'fwhost newgeoipgrp'})
+if ($fwhostsettings{'ACTION'} eq $Lang::tr{'fwhost newlocationgrp'})
{
- &addgeoipgrp;
- &viewtablegeoipgrp;
+ &addlocationgrp;
+ &viewtablelocationgrp;
}
if ($fwhostsettings{'ACTION'} eq $Lang::tr{'fwhost newservice'})
{
&addgrp;
&viewtablegrp;
}
-if ($fwhostsettings{'ACTION'} eq 'changegeoipgrpremark')
+if ($fwhostsettings{'ACTION'} eq 'changelocationgrpremark')
{
- &General::readhasharray("$configgeoipgrp", \%customgeoipgrp);
+ &General::readhasharray("$configlocationgrp", \%customlocationgrp);
if ($fwhostsettings{'oldrem'} ne $fwhostsettings{'newrem'} && (&validremark($fwhostsettings{'newrem'}) || $fwhostsettings{'newrem'} eq '')){
- foreach my $key (sort keys %customgeoipgrp)
+ foreach my $key (sort keys %customlocationgrp)
{
- if($customgeoipgrp{$key}[0] eq $fwhostsettings{'grp'} && $customgeoipgrp{$key}[1] eq $fwhostsettings{'oldrem'})
+ if($customlocationgrp{$key}[0] eq $fwhostsettings{'grp'} && $customlocationgrp{$key}[1] eq $fwhostsettings{'oldrem'})
{
- $customgeoipgrp{$key}[1]='';
- $customgeoipgrp{$key}[1]=$fwhostsettings{'newrem'};
+ $customlocationgrp{$key}[1]='';
+ $customlocationgrp{$key}[1]=$fwhostsettings{'newrem'};
}
}
- &General::writehasharray("$configgeoipgrp", \%customgeoipgrp);
+ &General::writehasharray("$configlocationgrp", \%customlocationgrp);
$fwhostsettings{'update'}='on';
$fwhostsettings{'remark'}=$fwhostsettings{'newrem'};
}else{
$fwhostsettings{'update'} = 'on';
}
$fwhostsettings{'grp_name'}=$fwhostsettings{'grp'};
- &addgeoipgrp;
- &viewtablegeoipgrp;
+ &addlocationgrp;
+ &viewtablelocationgrp;
}
if ($fwhostsettings{'ACTION'} eq 'changesrvgrpremark')
{
&addgrp;
&viewtablegrp;
}
-if ($fwhostsettings{'ACTION'} eq 'changegeoipgrpname')
+if ($fwhostsettings{'ACTION'} eq 'changelocationgrpname')
{
- &General::readhasharray("$configgeoipgrp", \%customgeoipgrp );
+ &General::readhasharray("$configlocationgrp", \%customlocationgrp );
if ($fwhostsettings{'oldgrpname'} ne $fwhostsettings{'grp'}){
#Check new groupname
if (!&validhostname($fwhostsettings{'grp'})){
}
if (!$errormessage){
# Rename group.
- foreach my $key (keys %customgeoipgrp) {
- if($customgeoipgrp{$key}[0] eq $fwhostsettings{'oldgrpname'}){
- $customgeoipgrp{$key}[0]=$fwhostsettings{'grp'};
+ foreach my $key (keys %customlocationgrp) {
+ if($customlocationgrp{$key}[0] eq $fwhostsettings{'oldgrpname'}){
+ $customlocationgrp{$key}[0]=$fwhostsettings{'grp'};
}
}
- &General::writehasharray("$configgeoipgrp", \%customgeoipgrp );
+ &General::writehasharray("$configlocationgrp", \%customlocationgrp );
#change name in FW Rules
- &changenameinfw($fwhostsettings{'oldgrpname'},$fwhostsettings{'grp'},4,"geoip");
- &changenameinfw($fwhostsettings{'oldgrpname'},$fwhostsettings{'grp'},6,"geoip");
+ &changenameinfw($fwhostsettings{'oldgrpname'},$fwhostsettings{'grp'},4,"location");
+ &changenameinfw($fwhostsettings{'oldgrpname'},$fwhostsettings{'grp'},6,"location");
}
}
- &addgeoipgrp;
- &viewtablegeoipgrp;
+ &addlocationgrp;
+ &viewtablelocationgrp;
}
### VIEW ###
if($fwhostsettings{'ACTION'} eq '')
print "$Lang::tr{'fwhost welcome'}";
print<<END;
<br><br><table border='0' width='100%'>
- <tr><td><form method='post'><input type='submit' name='ACTION' value='$Lang::tr{'fwhost newnet'}' ><input type='submit' name='ACTION' value='$Lang::tr{'fwhost newhost'}' ><input type='submit' name='ACTION' value='$Lang::tr{'fwhost newgrp'}' ><input type='submit' name='ACTION' value='$Lang::tr{'fwhost newgeoipgrp'}' ></form></td>
+ <tr><td><form method='post'><input type='submit' name='ACTION' value='$Lang::tr{'fwhost newnet'}' ><input type='submit' name='ACTION' value='$Lang::tr{'fwhost newhost'}' ><input type='submit' name='ACTION' value='$Lang::tr{'fwhost newgrp'}' ><input type='submit' name='ACTION' value='$Lang::tr{'fwhost newlocationgrp'}' ></form></td>
<td align='right'><form method='post'><input type='submit' name='ACTION' value='$Lang::tr{'fwhost newservice'}' ><input type='submit' name='ACTION' value='$Lang::tr{'fwhost newservicegrp'}' ></form></td></tr>
<tr><td colspan='6'></td></tr></table>
END
print"<tr><td style='text-align:right;'><input type='submit' value='$Lang::tr{'add'}' style='min-width:100px;' /><input type='hidden' name='oldremark' value='$fwhostsettings{'oldremark'}'><input type='hidden' name='update' value=\"$fwhostsettings{'update'}\"><input type='hidden' name='ACTION' value='savegrp' ></form><form method='post' style='display:inline'><input type='submit' value='$Lang::tr{'fwhost back'}' style='min-width:100px;'><input type='hidden' name='ACTION' value='resetgrp'></form></td></table>";
&Header::closebox();
}
-sub addgeoipgrp
+sub addlocationgrp
{
&hint;
&error;
&showmenu;
- &Header::openbox('100%', 'left', $Lang::tr{'fwhost addgeoipgrp'});
+ &Header::openbox('100%', 'left', $Lang::tr{'fwhost addlocationgrp'});
my %checked=();
my $show='';
<td>
<input type='submit' value='$Lang::tr{'fwhost change'}'>
<input type='hidden' name='oldgrpname' value='$fwhostsettings{'oldgrpname'}'>
- <input type='hidden' name='ACTION' value='changegeoipgrpname'>
+ <input type='hidden' name='ACTION' value='changelocationgrpname'>
</td>
<td></td>
</tr></form>
<input type='submit' value='$Lang::tr{'fwhost change'}'>
<input type='hidden' name='grp' value='$fwhostsettings{'grp_name'}'>
<input type='hidden' name='oldrem' value='$fwhostsettings{'oldremark'}'>
- <input type='hidden' name='ACTION' value='changegeoipgrpremark'>
+ <input type='hidden' name='ACTION' value='changelocationgrpremark'>
</td>
</tr></form>
</table>
END
}
if ($fwhostsettings{'update'} eq 'on') {
- my @geoip_locations = &fwlib::get_geoip_locations();
+ my @location_locations = &fwlib::get_locations();
print<<END;
<form method='post'>
<td style='text-align:left;'>
<select name='COUNTRY_CODE' style='width:16em;'>";
END
- foreach my $location (@geoip_locations) {
+ foreach my $location (@location_locations) {
# Get full country name.
- my $fullname = &GeoIP::get_full_country_name($location);
+ my $fullname = &Location::Functions::get_full_country_name($location);
print"<option value='$location'>$location - $fullname</option>\n";
}
<input type='submit' value='$Lang::tr{'add'}' style='min-width:100px;' />
<input type='hidden' name='oldremark' value='$fwhostsettings{'oldremark'}'>
<input type='hidden' name='update' value=\"$fwhostsettings{'update'}\">
- <input type='hidden' name='ACTION' value='savegeoipgrp' >
+ <input type='hidden' name='ACTION' value='savelocationgrp' >
</form>
<form method='post' style='display:inline'>
<input type='submit' value='$Lang::tr{'fwhost back'}' style='min-width:100px;'>
- <input type='hidden' name='ACTION' value='resetgeoipgrp'>
+ <input type='hidden' name='ACTION' value='resetlocationgrp'>
</form>
</td></tr></table>
}
}
-sub viewtablegeoipgrp
+sub viewtablelocationgrp
{
# If our filesize is "zero" there is nothing to read-in.
- if (-z "$configgeoipgrp") {
+ if (-z "$configlocationgrp") {
return;
}
- &Header::openbox('100%', 'left', $Lang::tr{'fwhost cust geoipgrp'});
- &General::readhasharray("$configgeoipgrp", \%customgeoipgrp);
+ &Header::openbox('100%', 'left', $Lang::tr{'fwhost cust locationgrp'});
+ &General::readhasharray("$configlocationgrp", \%customlocationgrp);
&General::readhasharray("$fwconfigfwd", \%fwfwd);
&General::readhasharray("$fwconfiginp", \%fwinp);
&General::readhasharray("$fwconfigout", \%fwout);
my %hash;
# If there are no groups we are finished here.
- if (!keys %customgeoipgrp) {
+ if (!keys %customlocationgrp) {
print "<center><b>$Lang::tr{'fwhost err emptytable'}</b>";
return;
}
# Put all groups in a hash.
- foreach my $key (sort { ncmp($customgeoipgrp{$a}[0],$customgeoipgrp{$b}[0]) }
- sort { ncmp($customgeoipgrp{$a}[2],$customgeoipgrp{$b}[2]) } keys %customgeoipgrp) {
- push (@counter,$customgeoipgrp{$key}[0]);
+ foreach my $key (sort { ncmp($customlocationgrp{$a}[0],$customlocationgrp{$b}[0]) }
+ sort { ncmp($customlocationgrp{$a}[2],$customlocationgrp{$b}[2]) } keys %customlocationgrp) {
+ push (@counter,$customlocationgrp{$key}[0]);
}
# Increase current used key.
}
# Sort hash.
- foreach my $key (sort { ncmp($customgeoipgrp{$a}[0],$customgeoipgrp{$b}[0]) }
- sort { ncmp($customgeoipgrp{$a}[2],$customgeoipgrp{$b}[2]) } keys %customgeoipgrp) {
+ foreach my $key (sort { ncmp($customlocationgrp{$a}[0],$customlocationgrp{$b}[0]) }
+ sort { ncmp($customlocationgrp{$a}[2],$customlocationgrp{$b}[2]) } keys %customlocationgrp) {
$count++;
- if ($helper ne $customgeoipgrp{$key}[0]) {
+ if ($helper ne $customlocationgrp{$key}[0]) {
$delflag='0';
- foreach my $key1 (sort { ncmp($customgeoipgrp{$a}[0],$customgeoipgrp{$b}[0]) }
- sort { ncmp($customgeoipgrp{$a}[2],$customgeoipgrp{$b}[2]) } keys %customgeoipgrp) {
+ foreach my $key1 (sort { ncmp($customlocationgrp{$a}[0],$customlocationgrp{$b}[0]) }
+ sort { ncmp($customlocationgrp{$a}[2],$customlocationgrp{$b}[2]) } keys %customlocationgrp) {
- if ($customgeoipgrp{$key}[0] eq $customgeoipgrp{$key1}[0])
+ if ($customlocationgrp{$key}[0] eq $customlocationgrp{$key1}[0])
{
$delflag++;
}
$number=1;
# Groupname.
- $grpname=$customgeoipgrp{$key}[0];
+ $grpname=$customlocationgrp{$key}[0];
# Group remark.
- $remark="$customgeoipgrp{$key}[1]";
+ $remark="$customlocationgrp{$key}[1]";
# Country code.
- $country_code="$customgeoipgrp{$key}[2]";
+ $country_code="$customlocationgrp{$key}[2]";
if ($count gt 1){
print"</table>";
print "<b>$Lang::tr{'remark'}:</b>  $remark  \n" if ($remark ne '');
# Get group count.
- my $geoipgrpcount=&getgeoipcount($grpname);
- print "<b>$Lang::tr{'used'}:</b> $geoipgrpcount x";
+ my $locationgrpcount=&getlocationcount($grpname);
+ print "<b>$Lang::tr{'used'}:</b> $locationgrpcount x";
# Only display delete icon, if the group is not used by a firewall rule.
- if($geoipgrpcount == '0') {
+ if($locationgrpcount == '0') {
print"<form method='post' style='display:inline'>\n";
print"<input type='image' src='/images/delete.gif' alt='$Lang::tr{'delete'}' title='$Lang::tr{'delete'}' align='right' />\n";
print"<input type='hidden' name='grp_name' value='$grpname' >\n";
- print"<input type='hidden' name='ACTION' value='delgeoipgrp'>\n";
+ print"<input type='hidden' name='ACTION' value='dellocationgrp'>\n";
print"</form>";
}
<input type='image' src='/images/edit.gif' alt='$Lang::tr{'edit'}' title='$Lang::tr{'edit'}' align='right'/>
<input type='hidden' name='grp_name' value='$grpname' >
<input type='hidden' name='remark' value='$remark' >
- <input type='hidden' name='ACTION' value='editgeoipgrp'>
+ <input type='hidden' name='ACTION' value='editlocationgrp'>
</form>
<table width='100%' cellspacing='0' class='tbl'>
} else {
# Check if we are currently editing a group and assign column backgound colors.
my $col='';
- if ( ($fwhostsettings{'ACTION'} eq 'editgeoipgrp' || $fwhostsettings{'update'} ne '')
- && $fwhostsettings{'grp_name'} eq $customgeoipgrp{$key}[0]) {
+ if ( ($fwhostsettings{'ACTION'} eq 'editlocationgrp' || $fwhostsettings{'update'} ne '')
+ && $fwhostsettings{'grp_name'} eq $customlocationgrp{$key}[0]) {
$col="bgcolor='${Header::colouryellow}'";
} elsif ($count %2 == 0){
$col="bgcolor='$color{'color20'}'";
}
# Get country flag.
- my $icon = &GeoIP::get_flag_icon($customgeoipgrp{$key}[2]);
+ my $icon = &Location::Functions::get_flag_icon($customlocationgrp{$key}[2]);
# Print column with flag icon.
my $col_content;
if ($icon) {
- $col_content = "<img src='$icon' alt='$customgeoipgrp{$key}[2]' title='$customgeoipgrp{$key}[2]'>";
+ $col_content = "<img src='$icon' alt='$customlocationgrp{$key}[2]' title='$customlocationgrp{$key}[2]'>";
} else {
$col_content = "<b>N/A</b>";
}
print "<td align='center' $col>$col_content</td>\n";
# Print column with country code.
- print "<td align='center' $col>$customgeoipgrp{$key}[2]</td>\n";
+ print "<td align='center' $col>$customlocationgrp{$key}[2]</td>\n";
# Print column with full country name.
- my $country_name = &GeoIP::get_full_country_name($customgeoipgrp{$key}[2]);
+ my $country_name = &Location::Functions::get_full_country_name($customlocationgrp{$key}[2]);
print "<td align='left' $col>$country_name</td>\n";
# Generate from for removing entries from a group.
# Check if this group only has a single entry.
foreach my $key2 (keys %hash) {
- if ($hash{$key2}<2 && $key2 eq $customgeoipgrp{$key}[0]){
+ if ($hash{$key2}<2 && $key2 eq $customlocationgrp{$key}[0]){
print "<input type='hidden' name='last' value='on'>" ;
}
}
}
- print "<input type='hidden' name='ACTION' value='deletegeoipgrpentry'>\n";
+ print "<input type='hidden' name='ACTION' value='deletelocationgrpentry'>\n";
print "<input type='hidden' name='update' value='$fwhostsettings{'update'}'>\n";
- print "<input type='hidden' name='delentry' value='$grpname,$remark,$customgeoipgrp{$key}[2],$customgeoipgrp{$key}[3]'>\n";
+ print "<input type='hidden' name='delentry' value='$grpname,$remark,$customlocationgrp{$key}[2],$customlocationgrp{$key}[3]'>\n";
print "</form>\n";
print "</td>\n";
print "</tr>\n";
}
- $helper=$customgeoipgrp{$key}[0];
+ $helper=$customlocationgrp{$key}[0];
$number++;
}
}
return $srvcounter;
}
-sub getgeoipcount
+sub getlocationcount
{
my $groupname=shift;
my $counter=0;
- # GeoIP groups are stored as "group:groupname" in the
+ # Location groups are stored as "group:groupname" in the
# firewall settings files.
my $searchstring = join(':', "group",$groupname);
my $fld=shift;
my $type=shift;
- if ($type eq 'geoip'){
+ if ($type eq 'location'){
$old="group:$old";
$new="group:$new";
}
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
-require "${General::swroot}/geoip-functions.pl";
+require "${General::swroot}/location-functions.pl";
my %cgiparams=();
my @lines=();
my $extraquery='';
+# Hash which contains the whois servers from
+# the responisible RIR of the continent.
+my %whois_servers_by_continent = (
+ "AF" => "whois.afrinic.net",
+ "AS" => "whois.apnic.net",
+ "EU" => "whois.ripe.net",
+ "NA" => "whois.arin.net",
+ "SA" => "whois.lacnic.net"
+);
+
+# Default whois server if no continent could be determined.
+my $whois_server = "whois.arin.net";
+
my $addr = CGI::param("ip") || "";
if (&General::validip($addr)) {
- $extraquery='';
- @lines=();
- my $whoisname = "whois.arin.net";
my $iaddr = inet_aton($addr);
my $hostname = gethostbyaddr($iaddr, AF_INET);
if (!$hostname) { $hostname = $Lang::tr{'lookup failed'}; }
- # enumerate GeoIP information for IP address...
- my $ccode = &GeoIP::lookup($addr);
- my $flag_icon = &GeoIP::get_flag_icon($ccode);
+ # enumerate location information for IP address...
+ my $db_handle = &Location::Functions::init();
+ my $ccode = &Location::Functions::lookup_country_code($db_handle, $addr);
+
+ # Try to get the continent of the country code.
+ my $continent = &Location::Functions::get_continent_code($db_handle, $ccode);
+
+ # Check if a whois server for the continent is known.
+ if($whois_servers_by_continent{$continent}) {
+ # Use it.
+ $whois_server = $whois_servers_by_continent{$continent};
+ }
+
+ my $flag_icon = &Location::Functions::get_flag_icon($ccode);
- my $sock = new IO::Socket::INET ( PeerAddr => $whoisname, PeerPort => 43, Proto => 'tcp');
+ my $sock = new IO::Socket::INET ( PeerAddr => $whois_server, PeerPort => 43, Proto => 'tcp');
if ($sock)
{
- print $sock "n $addr\n";
+ print $sock "$addr\n";
while (<$sock>) {
- $extraquery = $1 if (/ReferralServer: whois:\/\/(\S+)\s+/);
+ $extraquery = $1 if (/ReferralServer: whois:\/\/(\S+)\s+/);
push(@lines,$_);
}
close($sock);
if ($extraquery) {
undef (@lines);
- $whoisname = $extraquery;
- my $sock = new IO::Socket::INET ( PeerAddr => $whoisname, PeerPort => 43, Proto => 'tcp');
+ $whois_server = $extraquery;
+ my $sock = new IO::Socket::INET ( PeerAddr => $whois_server, PeerPort => 43, Proto => 'tcp');
if ($sock)
{
print $sock "$addr\n";
}
else
{
- @lines = ( "$Lang::tr{'unable to contact'} $whoisname" );
+ @lines = ( "$Lang::tr{'unable to contact'} $whois_server" );
}
}
}
else
{
- @lines = ( "$Lang::tr{'unable to contact'} $whoisname" );
+ @lines = ( "$Lang::tr{'unable to contact'} $whois_server" );
}
- &Header::openbox('100%', 'left', $addr . " <a href='country.cgi#$ccode'><img src='$flag_icon' border='0' align='absmiddle' alt='$ccode' title='$ccode' /></a> (" . $hostname . ') : '.$whoisname);
+ &Header::openbox('100%', 'left', $addr . " <a href='country.cgi#$ccode'><img src='$flag_icon' border='0' align='absmiddle' alt='$ccode' title='$ccode' /></a> (" . $hostname . ') : '.$whois_server);
print "<pre>\n";
foreach my $line (@lines) {
print &Header::cleanhtml($line,"y");
###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2014 IPFire Developemnt Team <info@ipfire.org> #
+# Copyright (C) 2014 - 2020 IPFire Developemnt Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
-require "${General::swroot}/geoip-functions.pl";
+require "${General::swroot}/location-functions.pl";
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
require "/usr/lib/firewall/firewall-lib.pl";
my $notice;
-my $settingsfile = "${General::swroot}/firewall/geoipblock";
+my $settingsfile = "${General::swroot}/firewall/locationblock";
my %color = ();
my %mainsettings = ();
&Header::getcgihash(\%cgiparams);
# Call subfunction to get all available locations.
-my @locations = &fwlib::get_geoip_locations();
+my @locations = &Location::Functions::get_locations();
if ($cgiparams{'ACTION'} eq $Lang::tr{'save'}) {
- # Check if we want to disable geoipblock.
- if (exists $cgiparams{'GEOIPBLOCK_ENABLED'}) {
- $settings{'GEOIPBLOCK_ENABLED'} = "on";
+ # Check if we want to disable locationblock.
+ if (exists $cgiparams{'LOCATIONBLOCK_ENABLED'}) {
+ $settings{'LOCATIONBLOCK_ENABLED'} = "on";
} else {
- $settings{'GEOIPBLOCK_ENABLED'} = "off";
+ $settings{'LOCATIONBLOCK_ENABLED'} = "off";
}
# Loop through our locations array to prevent from
$notice = $Lang::tr{'p2p block save notice'};
}
-&Header::openpage($Lang::tr{'geoipblock configuration'}, 1, '');
+&Header::openpage($Lang::tr{'locationblock configuration'}, 1, '');
# Print notice that a firewall reload is required.
if ($notice) {
# Checkbox pre-selection.
my $checked;
-if ($settings{'GEOIPBLOCK_ENABLED'} eq "on") {
+if ($settings{'LOCATIONBLOCK_ENABLED'} eq "on") {
$checked = "checked='checked'";
}
-# Print box to enable/disable geoipblock.
+# Print box to enable/disable locationblock.
print"<form method='POST' action='$ENV{'SCRIPT_NAME'}'>\n";
-&Header::openbox('100%', 'center', $Lang::tr{'geoipblock'});
+&Header::openbox('100%', 'center', $Lang::tr{'locationblock'});
print <<END;
<table width='95%'>
<tr>
- <td width='25%' class='base'>$Lang::tr{'geoipblock enable feature'}
- <td><input type='checkbox' name='GEOIPBLOCK_ENABLED' $checked></td>
+ <td width='25%' class='base'>$Lang::tr{'locationblock enable feature'}
+ <td><input type='checkbox' name='LOCATIONBLOCK_ENABLED' $checked></td>
</tr>
<tr>
<td colspan='2'><br></td>
&Header::closebox();
-&Header::openbox('100%', 'center', $Lang::tr{'geoipblock block countries'});
+&Header::openbox('100%', 'center', $Lang::tr{'locationblock block countries'});
### JAVA SCRIPT ###
print <<END;
<script>
my $ccode_lc = lc($location);
# Full name of the country based on the country code.
- my $cname = &GeoIP::get_full_country_name($ccode_lc);
+ my $cname = &Location::Functions::get_full_country_name($ccode_lc);
# Get flag icon for of the country.
- my $flag_icon = &GeoIP::get_flag_icon($ccode_uc);
+ my $flag_icon = &Location::Functions::get_flag_icon($ccode_uc);
my $flag;
# Check if a flag for the country is available.
<table width='70%'>
<tr>
<td width='5%'><img src='/images/on.gif'></td>
- <td>$Lang::tr{'geoipblock country is blocked'}</td>
+ <td>$Lang::tr{'locationblock country is blocked'}</td>
<td width='5%'><img src='/images/off.gif'></td>
- <td>$Lang::tr{'geoipblock country is allowed'}</td>
+ <td>$Lang::tr{'locationblock country is allowed'}</td>
</tr>
</table>
END
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
-require "${General::swroot}/geoip-functions.pl";
+require "${General::swroot}/location-functions.pl";
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
+# Libloc database handle.
+my $libloc_db_handle = &Location::Functions::init();
+
my %color = ();
my %mainsettings = ();
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
$srcport=$1 if $packet =~ /SPT=(\d+)/;
$dstport=$1 if $packet =~ /DPT=(\d+)/;
- my $ccode = &GeoIP::lookup($srcaddr);
+ my $ccode = &Location::Functions::lookup_country_code($libloc_db_handle, $srcaddr);
my $servi = uc(getservbyport($srcport, lc($proto)));
if ($servi ne '' && $srcport < 1024) {
END
;
# Get flag icon for of the country.
- my $flag_icon = &GeoIP::get_flag_icon($ccode);
+ my $flag_icon = &Location::Functions::get_flag_icon($ccode);
if ( $flag_icon) {
print "<td align='center' $col><a href='../country.cgi#$ccode'><img src='$flag_icon' border='0' align='absmiddle' alt='$ccode'></a></td>";
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
-require "${General::swroot}/geoip-functions.pl";
+require "${General::swroot}/location-functions.pl";
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
+# Libloc database handle.
+my $libloc_db_handle = &Location::Functions::init();
+
use POSIX();
my %cgiparams=();
# Traffic from red
if($srcaddr ne '') {
# srcaddr is set
- my $ccode = &GeoIP::lookup($srcaddr);
+ my $ccode = &Location::Functions::lookup_country_code($libloc_db_handle, $srcaddr);
if ($ccode eq '') {
$ccode = 'unknown';
}
my $fcode = lc($key[$s]);
# Get flag icon for of the country.
- my $flag_icon = &GeoIP::get_flag_icon($fcode);
+ my $flag_icon = &Location::Functions::get_flag_icon($fcode);
if($flag_icon) {
print "<td align='center' $col><a href='/cgi-bin/country.cgi#$fcode'><img src='$flag_icon' border='0' align='absmiddle' alt='$key[$s]' title='$key[$s]'></a></td>";
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
-require "${General::swroot}/geoip-functions.pl";
+require "${General::swroot}/location-functions.pl";
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
+# Libloc database handle.
+my $libloc_db_handle = &Location::Functions::init();
+
use POSIX();
my %cgiparams=();
$col="bgcolor='$color{\"color$colorIndex\"}'";
print "<tr>";
- my $ccode = &GeoIP::lookup($key[$s]);
+ my $ccode = &Location::Functions::lookup_country_code($libloc_db_handle, $key[$s]);
$color++;
print "<td align='center' $col><form method='post' action='showrequestfromip.dat'><input type='hidden' name='MONTH' value='$cgiparams{'MONTH'}'> <input type='hidden' name='DAY' value='$cgiparams{'DAY'}'> <input type='hidden' name='ip' value='$key[$s]'> <input type='submit' value='$Lang::tr{'details'}'></form></td>";
print "<td align='center' $col><a href='/cgi-bin/ipinfo.cgi?ip=$key[$s]'>$key[$s]</a></td>";
# Get flag icon for of the country.
- my $flag_icon = &GeoIP::get_flag_icon($ccode);
+ my $flag_icon = &Location::Functions::get_flag_icon($ccode);
if ( $flag_icon ) {
print "<td align='center' $col><a href='/cgi-bin/country.cgi#$ccode'><img src='$flag_icon' border='0' align='absmiddle' alt='$ccode' title='$ccode'></a></td>";
#use strict;
require '/var/ipfire/general-functions.pl';
-require "${General::swroot}/geoip-functions.pl";
+require "${General::swroot}/location-functions.pl";
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
+# Libloc database handle.
+my $libloc_db_handle = &Location::Functions::init();
+
use POSIX();
#workaround to suppress a warning when a variable is used only once
}
elsif($srcaddr ne '') {
# or srcaddr matches country code
- my $ccode = &GeoIP::lookup($srcaddr);
+ my $ccode = &Location::Functions::lookup_country_code($libloc_db_handle, $srcaddr);
if($ccode eq uc($country)){
$log[$lines] = $_;
$lines++;
if($iface eq $country || $srcaddr ne '') {
my $ccode='';
if($iface ne $country) {
- $ccode = &GeoIP::lookup($srcaddr);
+ $ccode = &Location::Functions::lookup_country_code($libloc_db_handle, $srcaddr);
}
if($iface eq $country || $ccode eq uc($country)) {
my $chain = '';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
-require "${General::swroot}/geoip-functions.pl";
require "${General::swroot}/graphs.pl";
my %color = ();
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
require "${General::swroot}/countries.pl";
-require "${General::swroot}/geoip-functions.pl";
+require "${General::swroot}/location-functions.pl";
# enable only the following on debugging purpose
#use warnings;
&Header::openbigbox('100%', 'LEFT', '', '');
&Header::openbox('100%', 'LEFT', $Lang::tr{'ovpn con stat'});
+ # Libloc database handle.
+ my $libloc_db_handle = &Location::Functions::init();
+
#
# <td><b>$Lang::tr{'protocol'}</b></td>
# protocol temp removed
$users[$uid]{'Proto'} = $proto;
# get country code for "RealAddress"...
- my $ccode = &GeoIP::lookup((split ':', $users[$uid]{'RealAddress'})[0]);
- my $flag_icon = &GeoIP::get_flag_icon($ccode);
+ my $ccode = &Location::Functions::lookup_country_code($libloc_db_handle, (split ':', $users[$uid]{'RealAddress'})[0]);
+ my $flag_icon = &Location::Functions::get_flag_icon($ccode);
$users[$uid]{'Country'} = "<a href='country.cgi#$ccode'><img src='$flag_icon' border='0' align='absmiddle' alt='$ccode' title='$ccode' /></a>";
$uid++;
}
use IO::Socket;
require '/var/ipfire/general-functions.pl';
-require "${General::swroot}/geoip-functions.pl";
+require "${General::swroot}/location-functions.pl";
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
} else {
# list active logins...
+ # Libloc database handle.
+ my $libloc_db_handle = &Location::Functions::init();
+
foreach my $line (@output)
{
my @arry = split(/\ +/, $line);
$remoteip =~ s/[()]//g;
# display more information about that IP adress...
- my $ccode = &GeoIP::lookup($remoteip);
- my $flag_icon = &GeoIP::get_flag_icon($ccode);
+ my $ccode = &Location::Functions::lookup_country_code($libloc_db_handle, $remoteip);
+ my $flag_icon = &Location::Functions::get_flag_icon($ccode);
# get rDNS...
my $iaddr = inet_aton($remoteip);
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
-require "${General::swroot}/geoip-functions.pl";
+require "${General::swroot}/location-functions.pl";
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
if (exists($node->{'country_code'})) {
# Get the flag icon of the country.
- my $flag_icon = &GeoIP::get_flag_icon($node->{'country_code'});
+ my $flag_icon = &Location::Functions::get_flag_icon($node->{'country_code'});
# Check if a flag for the given country is available.
if ($flag_icon) {
'fwhost OpenVPN static host' => 'OpenVPN statischer Host',
'fwhost OpenVPN static network' => 'OpenVPN statisches Netzwerk',
'fwhost Standard Network' => 'Standard-Netzwerk',
-'fwhost addgeoipgrp' => 'Neue GeoIP-Gruppe hinzufügen',
+'fwhost addlocationgrp' => 'Neue Location-Gruppe hinzufügen',
'fwhost addgrp' => 'Neue Gruppe hinzufügen',
'fwhost addgrpname' => 'Gruppenname:',
'fwhost addhost' => 'Neuen Host hinzufügen',
'fwhost change' => 'Ändern',
'fwhost changeremark' => 'Es wurde nur die Bemerkung angepasst.',
'fwhost cust addr' => 'Hosts',
-'fwhost cust geoip' => 'GeoIP-Gruppen',
-'fwhost cust geoipgroup' => 'GeoIP-Gruppen',
-'fwhost cust geoiplocation' => 'GeoIP-Ländercodes',
+'fwhost cust location' => 'Location-Gruppen',
+'fwhost cust locationgroup' => 'Location-Gruppen',
+'fwhost cust locationlocation' => 'Location-Ländercodes',
'fwhost cust grp' => 'Gruppen',
'fwhost cust net' => 'Netzwerke',
'fwhost cust service' => 'Dienste',
'fwhost ipsec net' => 'IPsec-Netzwerke:',
'fwhost menu' => 'Firewallgruppen',
'fwhost netaddress' => 'Netzwerkadresse',
-'fwhost newgeoipgrp' => 'GeoIP-Gruppen',
+'fwhost newlocationgrp' => 'Location-Gruppen',
'fwhost newgrp' => 'Netzwerk-/Hostgruppen',
'fwhost newhost' => 'Hosts',
'fwhost newnet' => 'Netzwerke',
'generating the root and host certificates may take a long time. it can take up to several minutes on older hardware. please be patient' => 'Die Erzeugung der Root- und Host-Zertifikate kann eine Weile dauern. Auf älterer Hardware kann dies mehrere Minuten in Anspruch nehmen. Bitte haben Sie etwas Geduld.',
'genkey' => 'PSK erzeugen',
'genre' => 'Genre',
-'geoip' => 'Länderfilter konfigurieren',
-'geoipblock' => 'GeoIP-Filter',
-'geoipblock block countries' => 'Länderfilter',
-'geoipblock configuration' => 'GeoIP-Konfiguration',
-'geoipblock country code' => 'Ländercode',
-'geoipblock country is allowed' => 'Eingehende Verbindungen aus diesem Land sind erlaubt.',
-'geoipblock country is blocked' => 'Eingehende Verbindungen aus diesem Land werden blockiert.',
-'geoipblock country name' => 'Ländername',
-'geoipblock enable feature' => 'GeoIP-basierte Filterung aktivieren:',
-'geoipblock flag' => 'Flagge',
+'location' => 'Länderfilter konfigurieren',
+'locationblock' => 'Location-Filter',
+'locationblock block countries' => 'Länderfilter',
+'locationblock configuration' => 'Location-Konfiguration',
+'locationblock country code' => 'Ländercode',
+'locationblock country is allowed' => 'Eingehende Verbindungen aus diesem Land sind erlaubt.',
+'locationblock country is blocked' => 'Eingehende Verbindungen aus diesem Land werden blockiert.',
+'locationblock country name' => 'Ländername',
+'locationblock enable feature' => 'Location-basierte Filterung aktivieren:',
+'locationblock flag' => 'Flagge',
'global settings' => 'Globale Einstellungen',
'gpl i accept these terms and conditions' => 'Ich akzeptiere diese Bedingungen und Konditionen',
'gpl license agreement' => 'Lizenzvereinbarung',
'fwhost OpenVPN static host' => 'OpenVPN static host',
'fwhost OpenVPN static network' => 'OpenVPN static network',
'fwhost Standard Network' => 'Standard network',
-'fwhost addgeoipgrp' => 'Add new GeoIP group',
+'fwhost addlocationgrp' => 'Add new Location group',
'fwhost addgrp' => 'Add new network/host group',
'fwhost addgrpname' => 'Group name:',
'fwhost addhost' => 'Add new host',
'fwhost change' => 'Modify',
'fwhost changeremark' => 'You modified just the remark',
'fwhost cust addr' => 'Hosts',
-'fwhost cust geoip' => 'GeoIP Groups',
-'fwhost cust geoipgroup' => 'GeoIP Groups',
-'fwhost cust geoiplocation' => 'GeoIP Locations',
+'fwhost cust location' => 'Location Groups',
+'fwhost cust locationgroup' => 'Location Groups',
+'fwhost cust locationlocation' => 'Location Locations',
'fwhost cust grp' => 'Network/Host Groups',
'fwhost cust net' => 'Networks',
'fwhost cust service' => 'Services',
'fwhost ipsec net' => 'IPsec networks:',
'fwhost menu' => 'Firewall Groups',
'fwhost netaddress' => 'Network address',
-'fwhost newgeoipgrp' => 'GeoIP Groups',
+'fwhost newlocationgrp' => 'Location Groups',
'fwhost newgrp' => 'Network/Host Groups',
'fwhost newhost' => 'Hosts',
'fwhost newnet' => 'Networks',
'generating the root and host certificates may take a long time. it can take up to several minutes on older hardware. please be patient' => 'Generating the root and host certificates may take a long time. It can take up to several minutes on older hardware. Please be patient.',
'genkey' => 'Generate PSK',
'genre' => 'Genre',
-'geoip' => 'GeoIP',
-'geoipblock' => 'GeoIP Block',
-'geoipblock block countries' => 'Block countries',
-'geoipblock configuration' => 'GeoIP Configuration',
-'geoipblock country code' => 'Country Code',
-'geoipblock country is allowed' => 'Incoming traffic from this country is allowed',
-'geoipblock country is blocked' => 'Incoming traffic from this country will be blocked',
-'geoipblock country name' => 'Country Name',
-'geoipblock enable feature' => 'Enable GeoIP based blocking:',
-'geoipblock flag' => 'Flag',
+'location' => 'Location',
+'locationblock' => 'Location Block',
+'locationblock block countries' => 'Block countries',
+'locationblock configuration' => 'Location Configuration',
+'locationblock country code' => 'Country Code',
+'locationblock country is allowed' => 'Incoming traffic from this country is allowed',
+'locationblock country is blocked' => 'Incoming traffic from this country will be blocked',
+'locationblock country name' => 'Country Name',
+'locationblock enable feature' => 'Enable Location based blocking:',
+'locationblock flag' => 'Flag',
'global settings' => 'Global Settings',
'gpl i accept these terms and conditions' => 'I accept these terms and conditions',
'gpl license agreement' => 'License Agreement',
'generating the root and host certificates may take a long time. it can take up to several minutes on older hardware. please be patient' => 'Generar los certificador root y host puede tomar mucho tiempo. Puede durar varios minutos en equipos antiguos. Por favor sea paciente.',
'genkey' => 'Generar PSK',
'genre' => 'Género',
-'geoip' => 'GeoIP',
-'geoipblock' => 'GeoIP Block',
-'geoipblock block countries' => 'Países bloqueados',
-'geoipblock configuration' => 'Configuración GeoIP',
-'geoipblock country code' => 'Código del País',
-'geoipblock country is allowed' => 'Se permite el tráfico procedente de este País',
-'geoipblock country is blocked' => 'Se deniega el tráfico procedente de este País',
-'geoipblock country name' => 'Nombre del País',
-'geoipblock enable feature' => 'Habilitar bloqueo basado GeoIP:',
-'geoipblock flag' => 'Bandera',
+'location' => 'Location',
+'locationblock' => 'Location Block',
+'locationblock block countries' => 'Países bloqueados',
+'locationblock configuration' => 'Configuración Location',
+'locationblock country code' => 'Código del País',
+'locationblock country is allowed' => 'Se permite el tráfico procedente de este País',
+'locationblock country is blocked' => 'Se deniega el tráfico procedente de este País',
+'locationblock country name' => 'Nombre del País',
+'locationblock enable feature' => 'Habilitar bloqueo basado Location:',
+'locationblock flag' => 'Bandera',
'global settings' => 'Configuraciones globales',
'gpl i accept these terms and conditions' => 'I accept these terms and conditions',
'gpl license agreement' => 'License Agreement',
'fwhost OpenVPN static host' => 'Hôte statique OpenVPN',
'fwhost OpenVPN static network' => 'Réseau statique OpenVPN',
'fwhost Standard Network' => 'Réseau standard',
-'fwhost addgeoipgrp' => 'Ajouter un groupe GeoIP',
+'fwhost addlocationgrp' => 'Ajouter un groupe Location',
'fwhost addgrp' => 'Ajouter un réseau / groupe d\'hôtes',
'fwhost addgrpname' => 'Nom du groupe :',
'fwhost addhost' => 'Ajouter un hôte',
'fwhost change' => 'Modifier',
'fwhost changeremark' => 'Vous avez juste modifié la remarque',
'fwhost cust addr' => 'Hôtes',
-'fwhost cust geoip' => 'Groupes GeoIP',
-'fwhost cust geoipgroup' => 'Groupes GeoIP',
-'fwhost cust geoiplocation' => 'Emplacements GeoIP',
+'fwhost cust location' => 'Groupes Location',
+'fwhost cust locationgroup' => 'Groupes Location',
+'fwhost cust locationlocation' => 'Emplacements Location',
'fwhost cust grp' => 'Réseau / groupes hôte',
'fwhost cust net' => 'Réseaux',
'fwhost cust service' => 'Services',
'fwhost ipsec net' => 'Réseaux IPsec :',
'fwhost menu' => 'Groupes de pare-feu',
'fwhost netaddress' => 'Adresse réseau ',
-'fwhost newgeoipgrp' => 'Groupes GeoIP',
+'fwhost newlocationgrp' => 'Groupes Location',
'fwhost newgrp' => 'Réseau / groupes hôtes',
'fwhost newhost' => 'Hôtes',
'fwhost newnet' => 'Réseaux',
'generating the root and host certificates may take a long time. it can take up to several minutes on older hardware. please be patient' => 'Générer le certificat root et le certificat hôte peut prendre du temps. Cela peut prendre plusieurs minutes sur du matériel ancien, veuillez patienter.',
'genkey' => 'Générer PSK',
'genre' => 'Genre',
-'geoip' => 'GeoIP',
-'geoipblock' => 'Blocage GeoIP',
-'geoipblock block countries' => 'Blocage des pays',
-'geoipblock configuration' => 'Configuration GeoIP',
-'geoipblock country code' => 'Code pays',
-'geoipblock country is allowed' => 'Le trafic entrant de ce pays sera autorisé',
-'geoipblock country is blocked' => 'Le trafic entrant de ce pays sera bloqué',
-'geoipblock country name' => 'Nom de pays',
-'geoipblock enable feature' => 'Activer le blocage GeoIP :',
-'geoipblock flag' => 'Drap.',
+'location' => 'Location',
+'locationblock' => 'Blocage Location',
+'locationblock block countries' => 'Blocage des pays',
+'locationblock configuration' => 'Configuration Location',
+'locationblock country code' => 'Code pays',
+'locationblock country is allowed' => 'Le trafic entrant de ce pays sera autorisé',
+'locationblock country is blocked' => 'Le trafic entrant de ce pays sera bloqué',
+'locationblock country name' => 'Nom de pays',
+'locationblock enable feature' => 'Activer le blocage Location :',
+'locationblock flag' => 'Drap.',
'global settings' => 'Configuration générale',
'gpl i accept these terms and conditions' => 'J\'accepte les termes et les conditions',
'gpl license agreement' => 'Accord de licence',
'fwhost OpenVPN static host' => 'OpenVPN statik ana bilgisayar',
'fwhost OpenVPN static network' => 'OpenVPN statik ağ',
'fwhost Standard Network' => 'Standart ağ',
-'fwhost addgeoipgrp' => 'Yeni GeoIP grubu ekle',
+'fwhost addlocationgrp' => 'Yeni Location grubu ekle',
'fwhost addgrp' => 'Yeni ağ/ana bilgisayar grubu ekle:',
'fwhost addgrpname' => 'Grup adı:',
'fwhost addhost' => 'Yeni bir ana bilgisayar ekle:',
'fwhost change' => 'Değiştir',
'fwhost changeremark' => 'Sadece açıklamalar değiştirilmiş',
'fwhost cust addr' => 'Ana bilgisayarlar',
-'fwhost cust geoip' => 'GeoIP Grupları',
-'fwhost cust geoipgroup' => 'GeoIP Grupları',
-'fwhost cust geoiplocation' => 'GeoIP Konumları',
+'fwhost cust location' => 'Location Grupları',
+'fwhost cust locationgroup' => 'Location Grupları',
+'fwhost cust locationlocation' => 'Location Konumları',
'fwhost cust grp' => 'Ağ/Ana Bilgisayar Grupları:',
'fwhost cust net' => 'Ağlar',
'fwhost cust service' => 'Hizmetler:',
'fwhost ipsec net' => 'IPsec ağları:',
'fwhost menu' => 'Güvenlik Duvarı Grupları',
'fwhost netaddress' => 'Ağ adresi',
-'fwhost newgeoipgrp' => 'GeoIP Grupları',
+'fwhost newlocationgrp' => 'Location Grupları',
'fwhost newgrp' => 'Ağ/Ana Bilgisayar Grupları',
'fwhost newhost' => 'Ana Bilgisayarlar',
'fwhost newnet' => 'Ağlar',
'generating the root and host certificates may take a long time. it can take up to several minutes on older hardware. please be patient' => 'Yönetici ve sunucu sertifikalarının oluşturulması biraz zaman alır. Eski donanımlarda bu süre birkaç dakikayı bulabilir. Lütfen bekleyin.',
'genkey' => 'PSK oluştur',
'genre' => 'Tür',
-'geoip' => 'GeoIP',
-'geoipblock' => 'GeoIP Engelleme',
-'geoipblock block countries' => 'Engellenen ülkeler',
-'geoipblock configuration' => 'GeoIP Yapılandırması',
-'geoipblock country code' => 'Ülke Kodu',
-'geoipblock country is allowed' => 'Bu ülkeden gelen trafiğe izin ver',
-'geoipblock country is blocked' => 'Bu ülkeden gelen trafiği engelle',
-'geoipblock country name' => 'Ülke Adı',
-'geoipblock enable feature' => 'GeoIP tabanlı engellemeyi aktifleştir:',
-'geoipblock flag' => 'Bayrak',
+'location' => 'Location',
+'locationblock' => 'Location Engelleme',
+'locationblock block countries' => 'Engellenen ülkeler',
+'locationblock configuration' => 'Location Yapılandırması',
+'locationblock country code' => 'Ülke Kodu',
+'locationblock country is allowed' => 'Bu ülkeden gelen trafiğe izin ver',
+'locationblock country is blocked' => 'Bu ülkeden gelen trafiği engelle',
+'locationblock country name' => 'Ülke Adı',
+'locationblock enable feature' => 'Location tabanlı engellemeyi aktifleştir:',
+'locationblock flag' => 'Bayrak',
'global settings' => 'Genel ayarlar',
'gpl i accept these terms and conditions' => 'Bu şartları kabul ediyorum',
'gpl license agreement' => 'Lisans Sözleşmesi',
+++ /dev/null
-###############################################################################
-# #
-# IPFire.org - A linux based firewall #
-# Copyright (C) 2007-2018 IPFire Team <info@ipfire.org> #
-# #
-# This program is free software: you can redistribute it and/or modify #
-# it under the terms of the GNU General Public License as published by #
-# the Free Software Foundation, either version 3 of the License, or #
-# (at your option) any later version. #
-# #
-# This program is distributed in the hope that it will be useful, #
-# but WITHOUT ANY WARRANTY; without even the implied warranty of #
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
-# GNU General Public License for more details. #
-# #
-# You should have received a copy of the GNU General Public License #
-# along with this program. If not, see <http://www.gnu.org/licenses/>. #
-# #
-###############################################################################
-
-###############################################################################
-# Definitions
-###############################################################################
-
-include Config
-
-VER = 1.25
-DATVER = 30062018
-
-THISAPP = Geo-IP-PurePerl-$(VER)
-DL_FILE = $(THISAPP).tar.gz
-DL_FROM = $(URL_IPFIRE)
-DIR_APP = $(DIR_SRC)/$(THISAPP)
-TARGET = $(DIR_INFO)/$(THISAPP)
-
-###############################################################################
-# Top-level Rules
-###############################################################################
-
-objects = $(DL_FILE) GeoIP.dat-$(DATVER).gz
-
-$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-GeoIP.dat-$(DATVER).gz = $(DL_FROM)/GeoIP.dat-$(DATVER).gz
-
-$(DL_FILE)_MD5 = a47a1b71f7cd7c46cca9efcc448e0726
-GeoIP.dat-$(DATVER).gz_MD5 = d538e57ad9268fdc7955c6cf9a37c4a9
-
-install : $(TARGET)
-
-check : $(patsubst %,$(DIR_CHK)/%,$(objects))
-
-download :$(patsubst %,$(DIR_DL)/%,$(objects))
-
-md5 : $(subst %,%_MD5,$(objects))
-
-###############################################################################
-# Downloading, checking, md5sum
-###############################################################################
-
-$(patsubst %,$(DIR_CHK)/%,$(objects)) :
- @$(CHECK)
-
-$(patsubst %,$(DIR_DL)/%,$(objects)) :
- @$(LOAD)
-
-$(subst %,%_MD5,$(objects)) :
- @$(MD5)
-
-###############################################################################
-# Installation Details
-###############################################################################
-
-$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
- @$(PREBUILD)
- @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
- cd $(DIR_APP) && patch -Np0 -i $(DIR_SRC)/src/patches/geoip_1_25_change_database_path.patch
- cd $(DIR_APP) && perl Makefile.PL
- cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
- cd $(DIR_APP) && make install
- cd $(DIR_APP) && mkdir -p /usr/share/GeoIP && \
- zcat $(DIR_DL)/GeoIP.dat-$(DATVER).gz > /usr/share/GeoIP/GeoIP.dat
- cd $(DIR_APP) && chmod 777 /srv/web/ipfire/html/images/flags
- @rm -rf $(DIR_APP)
- @$(POSTBUILD)
include Config
-VER = 3.33
+VER = 3.62
THISAPP = Locale-Codes-$(VER)
DL_FILE = $(THISAPP).tar.gz
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = bc7496f97889de8504e80addaa0ee40c
+$(DL_FILE)_MD5 = d4ee6fb8b5483c54abde1aa2b94e555a
install : $(TARGET)
for i in auth/users backup/include.user backup/exclude.user \
captive/settings captive/agb.txt captive/clients captive/voucher_out certs/index.txt certs/index.txt.attr ddns/config ddns/settings ddns/ipcache dhcp/settings \
dhcp/fixleases dhcp/advoptions dhcp/dhcpd.conf.local dns/settings dns/servers dnsforward/config ethernet/aliases ethernet/settings ethernet/known_nics ethernet/scanned_nics \
- ethernet/wireless extrahd/scan extrahd/devices extrahd/partitions extrahd/settings firewall/settings firewall/config firewall/geoipblock firewall/input firewall/outgoing \
- fwhosts/customnetworks fwhosts/customhosts fwhosts/customgroups fwhosts/customservicegrp fwhosts/customgeoipgrp fwlogs/ipsettings fwlogs/portsettings \
+ ethernet/wireless extrahd/scan extrahd/devices extrahd/partitions extrahd/settings firewall/settings firewall/config firewall/locationblock firewall/input firewall/outgoing \
+ fwhosts/customnetworks fwhosts/customhosts fwhosts/customgroups fwhosts/customservicegrp fwhosts/customlocationgrp fwlogs/ipsettings fwlogs/portsettings \
isdn/settings mac/settings main/hosts main/routing main/security main/settings optionsfw/settings \
ovpn/ccd.conf ovpn/ccdroute ovpn/ccdroute2 pakfire/settings portfw/config ppp/settings-1 ppp/settings-2 ppp/settings-3 ppp/settings-4 \
ppp/settings-5 ppp/settings proxy/settings proxy/squid.conf proxy/advanced/settings proxy/advanced/cre/enable remote/settings qos/settings qos/classes qos/subclasses qos/level7config qos/portconfig \
cp $(DIR_SRC)/config/cfgroot/header.pl $(CONFIG_ROOT)/
cp $(DIR_SRC)/config/cfgroot/general-functions.pl $(CONFIG_ROOT)/
cp $(DIR_SRC)/config/cfgroot/network-functions.pl $(CONFIG_ROOT)/
- cp $(DIR_SRC)/config/cfgroot/geoip-functions.pl $(CONFIG_ROOT)/
+ cp $(DIR_SRC)/config/cfgroot/location-functions.pl $(CONFIG_ROOT)/
cp $(DIR_SRC)/config/cfgroot/ids-functions.pl $(CONFIG_ROOT)/
cp $(DIR_SRC)/config/cfgroot/lang.pl $(CONFIG_ROOT)/
cp $(DIR_SRC)/config/cfgroot/countries.pl $(CONFIG_ROOT)/
+++ /dev/null
-###############################################################################
-# #
-# IPFire.org - A linux based firewall #
-# Copyright (C) 2007-2020 IPFire Team <info@ipfire.org> #
-# #
-# This program is free software: you can redistribute it and/or modify #
-# it under the terms of the GNU General Public License as published by #
-# the Free Software Foundation, either version 3 of the License, or #
-# (at your option) any later version. #
-# #
-# This program is distributed in the hope that it will be useful, #
-# but WITHOUT ANY WARRANTY; without even the implied warranty of #
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
-# GNU General Public License for more details. #
-# #
-# You should have received a copy of the GNU General Public License #
-# along with this program. If not, see <http://www.gnu.org/licenses/>. #
-# #
-###############################################################################
-
-###############################################################################
-# Definitions
-###############################################################################
-
-include Config
-
-VER = 20191217
-
-THISAPP = GeoIP-LiteCity-1-2csv-xtables-$(VER)
-DL_FILE = $(THISAPP).tar.xz
-DL_FROM = $(URL_IPFIRE)
-DIR_APP = $(DIR_SRC)/$(THISAPP)
-TARGET = $(DIR_INFO)/$(THISAPP)
-
-###############################################################################
-# Top-level Rules
-###############################################################################
-
-objects = $(DL_FILE)
-
-$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-
-$(DL_FILE)_MD5 = 6265289716880fd8e8a6061fef8d5747
-
-install : $(TARGET)
-
-check : $(patsubst %,$(DIR_CHK)/%,$(objects))
-
-download :$(patsubst %,$(DIR_DL)/%,$(objects))
-
-md5 : $(subst %,%_MD5,$(objects))
-
-###############################################################################
-# Downloading, checking, md5sum
-###############################################################################
-
-$(patsubst %,$(DIR_CHK)/%,$(objects)) :
- @$(CHECK)
-
-$(patsubst %,$(DIR_DL)/%,$(objects)) :
- @$(LOAD)
-
-$(subst %,%_MD5,$(objects)) :
- @$(MD5)
-
-###############################################################################
-# Installation Details
-###############################################################################
-
-$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
- @$(PREBUILD)
- @cd / && tar axf $(DIR_DL)/$(DL_FILE)
- @$(POSTBUILD)
###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2007-2018 IPFire Team <info@ipfire.org> #
+# Copyright (C) 2007-2019 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
include Config
-VER = 1.6.12
-DVER = 1.6.12-3
+VER = 0.9.2
+DB_DATE = 2020-06-10
-THISAPP = geoip-api-c-$(VER)
+THISAPP = libloc-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_IPFIRE)
-DIR_APP = $(DIR_SRC)/$(THISAPP)
+DIR_APP = $(DIR_SRC)/libloc-$(VER)
TARGET = $(DIR_INFO)/$(THISAPP)
###############################################################################
# Top-level Rules
###############################################################################
-objects = $(DL_FILE) geoip_$(DVER).debian.tar.xz
+objects = $(DL_FILE) \
+ location-$(DB_DATE).db.xz
-$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-geoip_$(DVER).debian.tar.xz = $(DL_FROM)/geoip_$(DVER).debian.tar.xz
+$(DL_FILE) = https://source.ipfire.org/releases/libloc//$(DL_FILE)
+location-$(DB_DATE).db.xz = https://location.ipfire.org/databases/1/archive/location-$(DB_DATE).db.xz
-$(DL_FILE)_MD5 = 727e5d6df9e9fc039dbc3a323cc56d2e
-geoip_$(DVER).debian.tar.xz_MD5 = 64fb561362dc456b45b799da20d47dd4
+$(DL_FILE)_MD5 = c6ed4fcbdb2ce4ca7e6df8abbd985411
+location-$(DB_DATE).db.xz_MD5 = 268b6d58a26c6d36081ed1e899b89020
install : $(TARGET)
md5 : $(subst %,%_MD5,$(objects))
+dist:
+ @$(PAK)
+
###############################################################################
# Downloading, checking, md5sum
###############################################################################
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
- @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
- cd $(DIR_APP) && ./bootstrap
- cd $(DIR_APP) && ./configure --prefix=/usr
+ @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar xvf $(DIR_DL)/$(DL_FILE)
+
+ cd $(DIR_APP) && ./autogen.sh
+ cd $(DIR_APP) && ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --disable-manpages
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
- cd $(DIR_APP) && tar axf $(DIR_DL)/geoip_$(DVER).debian.tar.xz
- cd $(DIR_APP) && sed -i "s/use diagnostics;//g" debian/src/geolite2-to-legacy-csv.sh
- cd $(DIR_APP) && g++ -std=gnu++11 -g debian/src/geoip-csv-to-dat.cpp \
- -o geoip-generator -lGeoIP
- -mkdir -p /usr/share/GeoIP/bin
- cd $(DIR_APP) && install -m 755 geoip-generator /usr/share/GeoIP/bin
- cd $(DIR_APP) && install -m 755 debian/src/geolite2-to-legacy-csv.sh /usr/share/GeoIP/bin
- cd $(DIR_APP) && install -m 644 debian/src/countryInfo.txt /usr/share/GeoIP/bin
+
+ # Copy database to correct location.
+ cd $(DIR_APP) && cp -avf $(DIR_DL)/location-$(DB_DATE).db.xz /var/lib/location/database.db.xz
+
+ # Uncompress database.
+ cd $(DIR_APP) && xz -d /var/lib/location/database.db.xz
+
+ # Launch location util and export all locations in xt_geoip format.
+ cd $(DIR_APP) && /usr/bin/location export \
+ --directory=/usr/share/xt_geoip \
+ --family=ipv4 \
+ --format=xt_geoip
+
+ # Remove exported IPv6 zones.
+ cd $(DIR_APP) && rm -rvf /usr/share/xt_geoip/*.iv6
+
@rm -rf $(DIR_APP)
@$(POSTBUILD)
VERSUFIX = ipfire$(KCFG)
MODPATH = /lib/modules/$(KVER)-$(VERSUFIX)/extra/
-VER = 3.2
+VER = 3.7
THISAPP = xtables-addons-$(VER)
DL_FILE = $(THISAPP).tar.xz
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = 80ea89ba8d5a001a8d71c7f05b2f0141
+$(DL_FILE)_MD5 = d81776d6320ebd741042bf8eb7e13d1d
install : $(TARGET)
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/xtables-addons-3.2-fix-database-generation.patch
-
# Only build the specified modules.
cp -avf $(DIR_SRC)/config/xtables-addons/mconfig \
$(DIR_APP)/mconfig
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
-
- # Install xt_geoip_build.
- cd $(DIR_APP) && install -m 755 geoip/xt_geoip_build \
- /usr/local/bin/
else
cd $(DIR_APP) && ./configure \
--with-kbuild=/lib/modules/$$(uname -r)$(KCFG)/build
done
endif
+ # Create directory for the databases.
+ mkdir -pv /usr/share/xt_geoip/
+
@rm -rf $(DIR_APP)
@$(POSTBUILD)
lfsmake2 python-daemon
lfsmake2 python-ipaddress
lfsmake2 glib
- lfsmake2 GeoIP
- lfsmake2 geoip-database
lfsmake2 ntp
lfsmake2 openssh
lfsmake2 fontconfig
lfsmake2 flashrom
lfsmake2 firmware-update
lfsmake2 tshark
- lfsmake2 geoip-generator
lfsmake2 speedtest-cli
lfsmake2 rfkill
lfsmake2 amazon-ssm-agent
+ lfsmake2 libloc
}
buildinstaller() {
cat doc/make.sh-usage
;;
esac
+
+++ /dev/null
-#!/bin/bash
-
-# Get the GeoIP database if no one exists yet
-
-database_exists() {
- local file
- for file in /usr/share/xt_geoip/*.iv4; do
- [ -e "${file}" ] && return 0
- done
-
- # Does not exist
- return 1
-}
-
-# Download ruleset if none has been found.
-if ! database_exists; then
- /usr/local/bin/xt_geoip_update >/dev/null 2>&1 &
-fi
-
-exit 0
iptables -A OUTPUT -o "${BLUE_DEV}" -j DHCPBLUEOUTPUT
fi
- # GeoIP block
- iptables -N GEOIPBLOCK
- iptables -A INPUT -j GEOIPBLOCK
- iptables -A FORWARD -j GEOIPBLOCK
+ # Location Block
+ iptables -N LOCATIONBLOCK
+ iptables -A INPUT -j LOCATIONBLOCK
+ iptables -A FORWARD -j LOCATIONBLOCK
# trafic from ipsecX/TUN/TAP interfaces, before "-i GREEN_DEV" accept everything
iptables -N IPSECINPUT
+++ /dev/null
---- lib/Geo/IP/PurePerl.pm Tue Mar 30 15:41:34 2010
-+++ lib/Geo/IP/PurePerl.pm Mon Jan 09 18:58:11 2017
-@@ -129,7 +129,7 @@
-
-
- # --- unfortunately we do not know the path so we assume the
--# default path /usr/local/share/GeoIP
-+# default path /usr/share/GeoIP
- # if thats not true, you can set $Geo::IP::PurePerl::OPEN_TYPE_PATH
- #
- sub open_type {
-@@ -210,7 +210,7 @@
- # this will be less messy once deprecated new( $path, [$flags] )
- # is no longer supported (that's what open() is for)
-
-- my $def_db_file = '/usr/local/share/GeoIP/GeoIP.dat';
-+ my $def_db_file = '/usr/share/GeoIP/GeoIP.dat';
- if ($^O eq 'NetWare') {
- $def_db_file = 'sys:/etc/GeoIP/GeoIP.dat';
- } elsif ($^O eq 'MSWin32') {
-@@ -758,7 +758,7 @@
- =item $gi = Geo::IP->new( [$flags] );
-
- Constructs a new Geo::IP object with the default database located inside your system's
--I<datadir>, typically I</usr/local/share/GeoIP/GeoIP.dat>.
-+I<datadir>, typically I</usr/share/GeoIP/GeoIP.dat>.
-
- Flags can be set to either GEOIP_STANDARD, or for faster performance
- (at a cost of using more memory), GEOIP_MEMORY_CACHE.
---- t/1_lookup.t Tue Mar 30 15:13:37 2010
-+++ t/1_lookup.t Mon Jan 09 18:58:13 2017
-@@ -2,7 +2,7 @@
- use vars qw($dat);
-
- BEGIN {
-- foreach my $file ("GeoIP.dat",'/usr/local/share/GeoIP/GeoIP.dat') {
-+ foreach my $file ("GeoIP.dat",'/usr/share/GeoIP/GeoIP.dat') {
- if (-f $file) {
- $dat = $file;
- last;
---- t/2_namelookup.t Tue Mar 30 15:21:37 2010
-+++ t/2_namelookup.t Mon Jan 09 18:58:21 2017
-@@ -2,7 +2,7 @@
- use vars qw($dat);
-
- BEGIN {
-- foreach my $file ("GeoIP.dat",'/usr/local/share/GeoIP/GeoIP.dat') {
-+ foreach my $file ("GeoIP.dat",'/usr/share/GeoIP/GeoIP.dat') {
- if (-f $file) {
- $dat = $file;
- last;
---- Changes Tue Mar 30 15:26:38 2010
-+++ Changes Mon Jan 09 18:57:37 2017
-@@ -35,7 +35,7 @@
- Country, City and Org requests benefit from GEOIP_MEMORY_CACHE and GEOIP_MMAP_CACHE
- Add GEOIP_MMAP_CACHE support ( Peter Shipley )
- Now works with new format of GeoIP ISP
-- Corrected path to /usr/local/share/GeoIP/GeoIP.dat in geoip-lookup program.
-+ Corrected path to /usr/share/GeoIP/GeoIP.dat in geoip-lookup program.
-
- 1.18 January 8th 2007
- Replaced CS/Serbia and Montenegro with RS/Serbia, removed ZR/Zaire, added ME/Montenegro
---- geoip-lookup Tue Mar 30 15:13:36 2010
-+++ geoip-lookup Mon Jan 09 18:57:44 2017
-@@ -15,7 +15,7 @@
-
- The I<geoip-lookup> program will return the country for the IP address or
- hostname given as the first command line argument.
--It queries the GeoIP Country database in C</usr/local/share/GeoIP/GeoIP.dat>.
-+It queries the GeoIP Country database in C</usr/share/GeoIP/GeoIP.dat>.
-
- By default it prints the ISO 3166 country code. Use the C<-l> option
- to print the country name.
---- geoip-lookup-city Tue Mar 30 15:13:36 2010
-+++ geoip-lookup-city Mon Jan 09 18:57:48 2017
-@@ -6,7 +6,7 @@
-
- my $addr = shift;
-
--my $gi = Geo::IP::PurePerl->new( "/usr/local/share/GeoIP/GeoIPCity.dat",
-+my $gi = Geo::IP::PurePerl->new( "/usr/share/GeoIP/GeoIPCity.dat",
- GEOIP_STANDARD );
-
- if ($addr) {
---- geoip-lookup-isp Tue Mar 30 15:13:36 2010
-+++ geoip-lookup-isp Mon Jan 09 18:57:50 2017
-@@ -7,7 +7,7 @@
-
- my $addr = shift;
-
--my $gi = Geo::IP::PurePerl->new("/usr/local/share/GeoIP/GeoIPISP.dat",GEOIP_STANDARD);
-+my $gi = Geo::IP::PurePerl->new("/usr/share/GeoIP/GeoIPISP.dat",GEOIP_STANDARD);
-
- my $isp = $gi->org_by_name($addr);
-
---- geoip-lookup-netspeed Tue Mar 30 15:13:36 2010
-+++ geoip-lookup-netspeed Mon Jan 09 18:57:53 2017
-@@ -6,7 +6,7 @@
-
- my $addr = $ARGV[0];
-
--my $gi = Geo::IP::PurePerl->new("/usr/local/share/GeoIP/GeoIPNetSpeed.dat",GEOIP_STANDARD);
-+my $gi = Geo::IP::PurePerl->new("/usr/share/GeoIP/GeoIPNetSpeed.dat",GEOIP_STANDARD);
-
- my $netspeed = $gi->id_by_addr($addr);
-
---- geoip-lookup-org Tue Mar 30 15:13:36 2010
-+++ geoip-lookup-org Mon Jan 09 18:57:59 2017
-@@ -7,7 +7,7 @@
-
- my $addr = shift;
-
--my $gi = Geo::IP::PurePerl->new("/usr/local/share/GeoIP/GeoIPOrg.dat",GEOIP_STANDARD);
-+my $gi = Geo::IP::PurePerl->new("/usr/share/GeoIP/GeoIPOrg.dat",GEOIP_STANDARD);
-
- my $org = $gi->org_by_name($addr);
-
---- geoip-lookup-region Tue Mar 30 15:13:36 2010
-+++ geoip-lookup-region Mon Jan 09 18:58:01 2017
-@@ -10,7 +10,7 @@
-
- my $addr = $ARGV[0];
-
--my $gi = Geo::IP::PurePerl->new("/usr/local/share/GeoIP/GeoIPRegion.dat",GEOIP_STANDARD);
-+my $gi = Geo::IP::PurePerl->new("/usr/share/GeoIP/GeoIPRegion.dat",GEOIP_STANDARD);
-
- my ($country,$region) = $gi->region_by_name($addr);
-
---- INSTALL Tue Mar 30 15:13:36 2010
-+++ INSTALL Mon Jan 09 18:58:05 2017
-@@ -3,7 +3,7 @@
- # fetch latest GeoIP database, updated monthly
- wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
- gunzip GeoIP.dat.gz
--mv GeoIP.dat /usr/local/share/GeoIP/GeoIP.dat
-+mv GeoIP.dat /usr/share/GeoIP/GeoIP.dat
-
- perl Makefile.PL
- make
+++ /dev/null
-diff --git a/geoip/xt_geoip_build b/geoip/xt_geoip_build
-index 3b15875..7bc42f3 100755
---- a/geoip/xt_geoip_build
-+++ b/geoip/xt_geoip_build
-@@ -259,7 +259,12 @@ sub writeCountry
- my ($start, $end) = split('-', $range);
- $start = inet_pton($family, $start);
- $end = inet_pton($family, $end);
-- print $fh $start, $end;
-+
-+ if ($family == AF_INET) {
-+ print $fh substr($start, 0, 4), substr($end, 0, 4);
-+ } else {
-+ print $fh $start, $end;
-+ }
- }
- close $fh;
- }
--- /dev/null
+#!/bin/bash
+
+###############################################################################
+# #
+# IPFire.org - A linux based firewall #
+# Copyright (C) 2020 IPFire Development Team <info@ipfire.org> #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+###############################################################################
+
+CONF_DIR="/var/ipfire"
+FW_CONF_DIR="$CONF_DIR/firewall"
+HOSTS_CONF_DIR="$CONF_DIR/fwhosts"
+
+# Check if the old blocking configuration file exists.
+if [ -f "$FW_CONF_DIR/geoipblock" ]; then
+ # Convert variable, if blocking is enabled or not.
+ sed -i 's/GEOIPBLOCK/LOCATIONBLOCK/g' "$FW_CONF_DIR/geoipblock"
+
+ # Rename file to the new name.
+ mv "$FW_CONF_DIR/geoipblock" "$FW_CONF_DIR/locationblock"
+
+ # Loop through the firewall config directory.
+ for file in "$FW_CONF_DIR/config" "$FW_CONF_DIR/input" "$FW_CONF_DIR/outgoing"; do
+ # Convert pattern which indicates location based rules to the new
+ # ones.
+ sed -i 's/cust_geoip/cust_location/g' "$FW_CONF_DIR/$file"
+ done
+
+ # Rename indicator for location based groups to the new one.
+ sed -i 's/GeoIP Group/Location Group/g' "$HOSTS_CONF_DIR/customgeoipgrp"
+
+ # Rename file to the new name.
+ mv "$HOSTS_CONF_DIR/customgeoipgrp" "$HOSTS_CONF_DIR/customlocationgrp"
+fi
+
+# Finished.
+exit 0
--- /dev/null
+#!/bin/bash
+###############################################################################
+# #
+# IPFire.org - A linux based firewall #
+# Copyright (C) 2019 IPFire Development Team <info@ipfire.org> #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+###############################################################################
+
+eval $(/usr/local/bin/readhash /var/ipfire/proxy/settings)
+
+# Proxy settings.
+# Check if a proxy should be used.
+if [[ $UPSTREAM_PROXY ]]; then
+ PROXYSETTINGS="https_proxy=http://"
+
+ # Check if authentication against the proxy is configured.
+ if [[ $UPSTREAM_USER && $UPSTREAM_PASSWORD ]]; then
+ PROXYSETTINGS="$PROXYSETTINGS$UPSTREAM_USER:$UPSTREAM_PASSWORD@"
+ fi
+
+ # Add proxy server.
+ PROXYSETTINGS="$PROXYSETTINGS$UPSTREAM_PROXY"
+
+ # Export proxy settings.
+ export HTTPS_PROXY="$PROXYSETTINGS"
+fi
+
+# Get the latest location database from server.
+if /usr/bin/location update; then
+ # Call location and export all countries in xt_geoip compatible format.
+ if /usr/bin/location export --directory=/usr/share/xt_geoip --family=ipv4 --format=xt_geoip; then
+
+ # Call initscript to reload the firewall.
+ /etc/init.d/firewall reload
+ fi
+fi
+++ /dev/null
-#!/bin/bash
-###############################################################################
-# #
-# IPFire.org - A linux based firewall #
-# Copyright (C) 2019 IPFire Development Team <info@ipfire.org> #
-# #
-# This program is free software: you can redistribute it and/or modify #
-# it under the terms of the GNU General Public License as published by #
-# the Free Software Foundation, either version 3 of the License, or #
-# (at your option) any later version. #
-# #
-# This program is distributed in the hope that it will be useful, #
-# but WITHOUT ANY WARRANTY; without even the implied warranty of #
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
-# GNU General Public License for more details. #
-# #
-# You should have received a copy of the GNU General Public License #
-# along with this program. If not, see <http://www.gnu.org/licenses/>. #
-# #
-###############################################################################
-
-TMP_PATH=$(mktemp -dp /var/tmp)
-TMP_FILE=$(mktemp -p $TMP_PATH)
-
-SCRIPT_PATH=/usr/local/bin
-DEST_PATH=/usr/share/xt_geoip
-DB_PATH=/var/lib/GeoIP
-DB1_PATH=/usr/share/GeoIP
-
-DL_URL=https://geolite.maxmind.com/download/geoip/database
-DL_FILE=GeoLite2-Country-CSV.zip
-
-eval $(/usr/local/bin/readhash /var/ipfire/proxy/settings)
-
-function download() {
- echo "Downloading latest GeoIP ruleset..."
-
- # Proxy settings.
- # Check if a proxy should be used.
- if [[ $UPSTREAM_PROXY ]]; then
- PROXYSETTINGS="-e https_proxy=http://"
-
- # Check if authentication against the proxy is configured.
- if [[ $UPSTREAM_USER && $UPSTREAM_PASSWORD ]]; then
- PROXYSETTINGS="$PROXYSETTINGS$UPSTREAM_USER:$UPSTREAM_PASSWORD@"
- fi
-
- # Add proxy server.
- PROXYSETTINGS="$PROXYSETTINGS$UPSTREAM_PROXY"
- fi
-
- # Get the latest GeoIP database from server.
- wget $DL_URL/$DL_FILE $PROXYSETTINGS -O $TMP_FILE
-
- # Extract files to database path.
- unzip $TMP_FILE -d $TMP_PATH
-
- return 0
-}
-
-function install() {
- echo "Install CSV database..."
-
- # Check if the database dir exists.
- if [ ! -e "$DB_PATH" ]; then
- mkdir -p $DB_PATH &>/dev/null
- fi
-
- # Check if the directory for binary databases exists.
- if [ ! -e "$DEST_PATH" ]; then
- mkdir -p $DEST_PATH &>/dev/null
- fi
-
- # Install CSV databases.
- if ! cp -af $TMP_PATH/*/* $DB_PATH &>/dev/null; then
- echo "Could not copy files. Aborting." >&2
- return 1
- fi
-
- return 0
-}
-
-function build_legacy() {
- echo "Convert database to legacy GeoIP.dat ..."
- cat $DB_PATH/GeoLite2-Country-Blocks-IPv4.csv | \
- $DB1_PATH/bin/geolite2-to-legacy-csv.sh $DB1_PATH/bin/countryInfo.txt > \
- $TMP_FILE
- $DB1_PATH/bin/geoip-generator -v -4 --info="$(date -u +'GEO-106FREE %Y%m%d Build -IPFire-' \
- -r $DB_PATH/GeoLite2-Country-Blocks-IPv4.csv) $(<$DB_PATH/COPYRIGHT.txt)" -o \
- $DB1_PATH/GeoIP.dat $TMP_FILE
-
- return 0
-}
-
-
-function build() {
- echo "Convert database..."
-
- # Run script to convert the CSV file into several xtables
- # compatible binary files.
- if ! $SCRIPT_PATH/xt_geoip_build -S $DB_PATH -D $DEST_PATH; then
- echo "Could not convert ruleset. Aborting." >&2
- return 1
- fi
-
- return 0
-}
-
-function cleanup() {
- echo "Cleaning up temporary files..."
- if ! rm -rf $TMP_PATH &>/dev/null; then
- echo "Could not remove files. Aborting." >&2
- return 1
- fi
-
- return 0
-}
-
-function main() {
- local func
- for func in download install build build_legacy; do
- if ! ${func}; then
- # Cleanup any temporary data
- cleanup
-
- return 1
- fi
- done
-
- # Cleanup
- cleanup || return $?
-
- # All done
- return 0
-}
-
-# Run the main function.
-main || exit $?