ntop/ipt_geofence
ntop/ipt_geofence has 144 GitHub stars and 21 forks. GitHot measured 0 in 7 days. Last checked 2026-11-10 00:18 UTC. Last push 2026-10-30.
Geographical host protection for Linux/FreeBSD
Measured star growth
- in 24h
- Update delayed
- in 7 days
- 0
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalipt_geofence
Geographical host protection for Linux and FreeBSD
This tool allows you to protect your host/network by preventing communications with unwanted countries (aka geofencing). Furthermore, it allows you to specify a list of blacklists that enable you to drop well-known attackers.
Prerequisites
You need to install GeoIP libraries, Netfilter Queue, curl and JSONCPP packages in addition to the compiler.
For Ubuntu/Debian based systems do:
sudo apt-get install build-essential autoconf automake autogen libmaxminddb-dev libcurl4-openssl-dev libnetfilter-queue-dev libjsoncpp-dev cppzmq-dev
On Enterprise Linux (Red Hat, Alma Linux, Rocky Linux, Fedora, etc)
dnf install dnf-plugins-core
dnf config-manager --set-enabled crb
dnf install epel-release
dnf install autoconf automake libmaxminddb-devel libcurl-devel openssl-devel zlib-devel libidn2-devel libnetfilter_queue-devel jsoncpp-devel cppzmq-devel libtool libpcap-devel
dnf groupinstall -y "Development Tools"
On FreeBSD
pkg install -y autoconf automake curl libmaxminddb jsoncpp libzmq4 python3
The tool also needs a GeoIP database that you can obtain from sites such as db-ip or maxmind.
Configuration
This tool uses NFQUEUE to receive packets from kernel and analyze them in user-space. This means that you need to confiugure the Linux firewall prior to run the application. We provide you a simple configuration file that shows you how to send selected packets to the application for inspection.
You also need to configure a configuration file for your rules. We provide sample_config.json as a configuration example.
Binary Packages
Under packages/debian you can build a binary package for easy install on Debian/Ubuntu-based systems.
Usage
Supposing the you have configure the firewall as described above, you need to start (as root) the tool as follows
ipt_geofence -c config.json -m dbip-country-lite.mmdb
Performance
On Linux as only one packet per connection is sent to user-space, you will basically not observe any noticeable performance degradation. On FreeBSD instead, all packets have to pas through the application.
Explore related projects
trimstray/the-book-of-secret-knowledge
A collection of inspiring lists, manuals, cheatsheets, blogs, hacks, one-liners, cli/web tools and more.
257,536 starsHack-with-Github/Awesome-Hacking
A collection of various awesome lists for hackers, pentesters and security researchers
125,103 starsswisskyrepo/PayloadsAllTheThings
A list of useful payloads and bypass for Web Application Security and Pentest/CTF
82,542 starscaddyserver/caddy
Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
78,935 stars