The mod_geoip2
module for ProFTPD uses the MaxMind GeoIP library to look
up geographic information on connecting clients, and to provide ACLs based
on that geographic information.
See the mod_geoip2.html documentation for more details.
ProFTPD module for looking up geographic information about connected clients
The mod_geoip2
module for ProFTPD uses the MaxMind GeoIP library to look
up geographic information on connecting clients, and to provide ACLs based
on that geographic information.
See the mod_geoip2.html documentation for more details.
Hi. Thanks for the GeoIP2 module. No issue, however a request.
Currently, the GeoIPLog is working fine and output is minimal info, ie:
2022-03-12 20:13:26,960 mod_geoip2/0.1[53605]: CountryCode filter value 'XX' matched GeoIPAllowFilter pattern 'XX'
2022-03-12 20:13:27,108 mod_geoip2/0.1[53605]: CountryCode filter value 'XX' matched GeoIPAllowFilter pattern 'XX'
The request is as follows:
1. To add the Source IP address into the above line - %a
2. To add the User Name into the above line - %u
ex:
2022-03-12 20:13:27,108 mod_geoip2/0.1[53605]: [Client IP Address - %a] [User Name - %u] CountryCode filter value 'XX' matched GeoIPAllowFilter pattern 'XX'
2022-03-12 20:55:57,218 mod_geoip2/0.1[73498]: connection from 219.100.37.239, Username: %u denied due to GeoIP filter/policy
2022-03-12 20:56:03,974 mod_geoip2/0.1[73499]: CountryCode filter value 'JP' did not match GeoIPAllowFilter pattern 'XX'
Thanks and regards
Trying to build this on Alpine 3.10 in Docker. I can build when including the older GeoIP library, but just using libmaxminddb-dev
and libmaxminddb
without geoip
causes the error below:
libtool: compile: gcc -DHAVE_CONFIG_H -DLINUX -I.. -I../include -I../include -I/usr/include/libxml2 -I/usr/include/mysql -I/usr/include/mysql -g2 -O2 -Wall -fno-omit-frame-pointer -Werror=implicit-function-declaration -DPR_SHARED_MODULE -c ../modules/mod_digest.c -o mod_digest.o >/dev/null 2>&1
/bin/sh ../libtool --mode=link --tag=CC gcc -o mod_digest.la -rpath /usr/libexec/proftpd -L../lib -L../lib -rdynamic -L/usr/lib -L/usr/lib/ -avoid-version -export-dynamic -module mod_digest.lo `cat ../modules/mod_digest.c | grep '$Libraries:' | sed -e 's/^.*\$Libraries: \(.*\)\\$/\1/'`
libtool: link: gcc -shared .libs/mod_digest.o -L/usr/local/proftpd/lib -L/usr/lib -L/usr/lib/ -lcrypto -Wl,-soname -Wl,mod_digest.so -o .libs/mod_digest.so
libtool: link: ar cru .libs/mod_digest.a mod_digest.o
ar: `u' modifier ignored since `D' is the default (see `U')
libtool: link: ranlib .libs/mod_digest.a
libtool: link: ( cd ".libs" && rm -f "mod_digest.la" && ln -s "../mod_digest.la" "mod_digest.la" )
/bin/sh ../libtool --mode=compile --tag=CC gcc -DHAVE_CONFIG_H -DLINUX -I.. -I../include -I../include -I/usr/include/libxml2 -I/usr/include/mysql -I/usr/include/mysql -g2 -O2 -Wall -fno-omit-frame-pointer -Werror=implicit-function-declaration -DPR_SHARED_MODULE -c ../modules/mod_geoip.c
libtool: compile: gcc -DHAVE_CONFIG_H -DLINUX -I.. -I../include -I../include -I/usr/include/libxml2 -I/usr/include/mysql -I/usr/include/mysql -g2 -O2 -Wall -fno-omit-frame-pointer -Werror=implicit-function-declaration -DPR_SHARED_MODULE -c ../modules/mod_geoip.c -fPIC -DPIC -o .libs/mod_geoip.o
../modules/mod_geoip.c:45:10: fatal error: GeoIP.h: No such file or directory
#include <GeoIP.h>
^~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:34: mod_geoip.la] Error 1
make[1]: Leaving directory '/usr/local/proftpd/modules'
make: *** [Makefile:40: modules] Error 2
I try to build this module on RHEL 8.7 as built-in,shared or DSO but always with same outcom:
mod_geoip2.c: In function 'get_geoip_data_text':
mod_geoip2.c:672:7: error: implicit declaration of function 'pr_snprintf'; did you mean 'vsnprintf'? [-Werror=implicit-function-declaration]
pr_snprintf(buf, sizeof(buf)-1, "%lu", (unsigned long) entry_data.uint32);
^~~~~~~~~~~
vsnprintf
cc1: some warnings being treated as errors
make[1]: *** [Makefile:31: mod_geoip2.o] Error 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.