Changes

From SME Server
Jump to navigationJump to search
1,118 bytes added ,  08:49, 26 January 2020
Line 41: Line 41:  
End Quote
 
End Quote
   −
See the section below [[GeoIP#Installation_and_Updating_of_geoip_v2_db|Installation of V2 db ]] for steps on how to migrate to the new download mechanism.}}
+
See the section below [[Xt geoip#installation|Installation]] for steps on how to migrate to the new download mechanism.}}
    
<!-- add a description here --> This contribs installs xtables-addons  [http://xtables-addons.sourceforge.net/geoip.php (http://xtables-addons.sourceforge.net/geoip.php]) on SME Server 9.x.  
 
<!-- add a description here --> This contribs installs xtables-addons  [http://xtables-addons.sourceforge.net/geoip.php (http://xtables-addons.sourceforge.net/geoip.php]) on SME Server 9.x.  
Line 48: Line 48:     
=== Installation ===
 
=== Installation ===
 +
Sign up for a MaxMind account (no purchase required) https://dev.maxmind.com/geoip/geoip2/geolite2/
 +
 +
Important - Note your login details and in particular your AccountID and LicenceKey
 +
 +
Go to Services My Licence key and generate a licence key, carefully note the key details, multiple keys may be created, these details are also used in the smeserver-geoip contrib.
 +
 +
The following config property keys and values will be used to set the geoip config db for ongoing updates see below
 +
AccountID #######
 +
LicenseKey xxxxxxxxxxxxxxx
 +
 
  yum --enablerepo=smecontribs install smeserver-xt_geoip
 
  yum --enablerepo=smecontribs install smeserver-xt_geoip
    
you might need to update to last smeserver-yum >= 2.4.0-23 or you will get an error because of missing GPG key.  
 
you might need to update to last smeserver-yum >= 2.4.0-23 or you will get an error because of missing GPG key.  
 +
 +
A configuration db may already be present from another contrib, check for its existence
 +
 +
# config show geoip
 +
geoip=service
 +
status=enabled
 +
 +
If it does exists and the LicenseKey and AccountID are NOT present perform the following
 +
db configuration setprop LicenseKey "YOUR LIC KEY" AccountID "YOUR ACCT ID"
 +
 +
If the configuration db is not present it needs to be created with following keys and properties:
 +
db configuration set geoip service status enabled LicenseKey "YOUR LIC KEY" AccountID "YOUR ACCT ID"
 +
 +
# config show geoip
 +
geoip=service
 +
    AccountID=xxxxxx
 +
    LicenseKey=xxxxxxxxxxxxxxx
 +
    status=enabled
 +
 
then<syntaxhighlight lang="bash">
 
then<syntaxhighlight lang="bash">
 
modprobe xt_geoip
 
modprobe xt_geoip
Line 59: Line 88:  
you might have issues with kmod not populating the weak-updates folder, which results in geoip module being not available (modprobe xt_geoip will give an error, and panel will indicate iptable geoip not working),  if so just run :
 
you might have issues with kmod not populating the weak-updates folder, which results in geoip module being not available (modprobe xt_geoip will give an error, and panel will indicate iptable geoip not working),  if so just run :
 
  weak-modules  --add-kernel
 
  weak-modules  --add-kernel
 +
 
=== Configuration ===
 
=== Configuration ===
 
The easiest way should be to go to server manager and use the panel. There you will be able to :
 
The easiest way should be to go to server manager and use the panel. There you will be able to :

Navigation menu