Coder Social home page Coder Social logo

proftpd-mod_geoip2's Introduction

proftpd-mod_geoip2

Status

GitHub Actions CI Status License

Synopsis

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-mod_geoip2's People

Contributors

alexanderpronin avatar castaglia avatar paweltk avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

alexanderpronin

proftpd-mod_geoip2's Issues

Add client IP address, username to GeoIPLog

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

Alpine build with libmaxminddb

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

Build on RHEL 8.7 always fail

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.