This mutator works with the help of nodejs which provides the GeoIP information via HTTP. This way the country database can be updated without changing the mutator or even without needing to restart the Killing Floor server.
Pros:
- Full country information for admins (City/Latitude/Longitude);
- The country database can be updated without restarting the KillingFloor server;
- The NodeJS application can serve several KillingFloor servers;
- Also for a farm of KF Servers the database can be updated with zero downtime;
- The NodeJS application is using native code (C++) for Country lookup;
- Automatic detection of LAN clients: they use ServerCountryTag config as tag (no need for Country lookup in this case);
- Support for other databases (IP2Location, WEBNet77, etc) can be added without touching Mutator source code.
Cons:
- Requires an additional application (NodeJS) running in the host;
INSTALL / RUNNING: (NodeJS app)
- LINUX (tested in Ubuntu 12.04.3 LTS):
1. Install prerequisites:
apt-get install nodejs npm g++ libgeoip1 libgeoip-dev
2. Copy the geoLiteCityApp.js to some folder;
3. Install the restify/geoip modules in the same folder:
cd <path-to-your-geoLiteCityApp.js-file>
npm install restify
npm install [email protected]
3. Download the Country database and gunzip the file:
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
gunzip GeoLiteCity.dat.gz
4. Run the NodeJS application:
node geoLiteCityApp.js
5. Test if the NodeJS application is ok, by opening the following link in browser:
http://127.0.0.1:3000/geoip/8.8.8.8
- WINDOWS:
See next post.
INSTALL / RUNNING: (KillingFloor server)
mutator: SumoCtryTags.SumoCtryTags
configuration: SumoCtryTags.ini
- if you have LAN users (including you) then change the ServerCountryTag;
- change the GeoIPServerAddress/GeoIPServerPort if you want to run the NodeJS application in other machine (see also "server.listen" in the javascript geoLiteCityApp.js)
- admins can see the full country/city/latitude information by typing:
mutate geoip
REMARKS:
- The geoLiteCityApp.js application is set to listen in localhost (127.0.0.1) - don't put this app in internet, in this case use at your own risk. This application needs some security hardening. See... this application is a HelloWorld like example...
- Use the geoipApp.js if you don't need/want the City information - in this case the database link is the following:
http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
Good luck!
And OFC, thanks to Marco for the original KFCtryTags concept/idea
Pros:
- Full country information for admins (City/Latitude/Longitude);
- The country database can be updated without restarting the KillingFloor server;
- The NodeJS application can serve several KillingFloor servers;
- Also for a farm of KF Servers the database can be updated with zero downtime;
- The NodeJS application is using native code (C++) for Country lookup;
- Automatic detection of LAN clients: they use ServerCountryTag config as tag (no need for Country lookup in this case);
- Support for other databases (IP2Location, WEBNet77, etc) can be added without touching Mutator source code.
Cons:
- Requires an additional application (NodeJS) running in the host;
INSTALL / RUNNING: (NodeJS app)
- LINUX (tested in Ubuntu 12.04.3 LTS):
1. Install prerequisites:
apt-get install nodejs npm g++ libgeoip1 libgeoip-dev
2. Copy the geoLiteCityApp.js to some folder;
3. Install the restify/geoip modules in the same folder:
cd <path-to-your-geoLiteCityApp.js-file>
npm install restify
npm install [email protected]
3. Download the Country database and gunzip the file:
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
gunzip GeoLiteCity.dat.gz
4. Run the NodeJS application:
node geoLiteCityApp.js
5. Test if the NodeJS application is ok, by opening the following link in browser:
http://127.0.0.1:3000/geoip/8.8.8.8
- WINDOWS:
See next post.
INSTALL / RUNNING: (KillingFloor server)
mutator: SumoCtryTags.SumoCtryTags
configuration: SumoCtryTags.ini
- if you have LAN users (including you) then change the ServerCountryTag;
- change the GeoIPServerAddress/GeoIPServerPort if you want to run the NodeJS application in other machine (see also "server.listen" in the javascript geoLiteCityApp.js)
- admins can see the full country/city/latitude information by typing:
mutate geoip
REMARKS:
- The geoLiteCityApp.js application is set to listen in localhost (127.0.0.1) - don't put this app in internet, in this case use at your own risk. This application needs some security hardening. See... this application is a HelloWorld like example...
- Use the geoipApp.js if you don't need/want the City information - in this case the database link is the following:
http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
Good luck!
And OFC, thanks to Marco for the original KFCtryTags concept/idea
Attachments
Last edited: