{"id":20579978,"url":"https://github.com/ntop/ipt_geofence","last_synced_at":"2025-04-05T16:04:35.924Z","repository":{"id":39859412,"uuid":"464670756","full_name":"ntop/ipt_geofence","owner":"ntop","description":"Geographical host protection for Linux/FreeBSD","archived":false,"fork":false,"pushed_at":"2025-01-02T14:22:22.000Z","size":525,"stargazers_count":111,"open_issues_count":2,"forks_count":16,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-29T15:04:30.641Z","etag":null,"topics":["cybersecurity","firewall","linux","netfilter"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ntop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-28T22:56:33.000Z","updated_at":"2025-03-17T23:37:35.000Z","dependencies_parsed_at":"2023-12-08T20:24:47.214Z","dependency_job_id":"aac5ed02-a6a4-479b-a09f-92a119dd2577","html_url":"https://github.com/ntop/ipt_geofence","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntop%2Fipt_geofence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntop%2Fipt_geofence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntop%2Fipt_geofence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntop%2Fipt_geofence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ntop","download_url":"https://codeload.github.com/ntop/ipt_geofence/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247361615,"owners_count":20926642,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cybersecurity","firewall","linux","netfilter"],"created_at":"2024-11-16T06:19:21.507Z","updated_at":"2025-04-05T16:04:35.903Z","avatar_url":"https://github.com/ntop.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ipt_geofence\nGeographical host protection for Linux and FreeBSD\n\nThis 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.\n\n# Prerequisites\nYou need to install GeoIP libraries, Netfilter Queue, curl and JSONCPP packages in addition to the compiler.\n\nFor Ubuntu/Debian based systems do:\n``sudo apt-get install build-essential autoconf automake autogen libmaxminddb-dev libcurl4-openssl-dev libnetfilter-queue-dev libjsoncpp-dev``\n\nOn FreeBSD\n``pkg install -y autoconf automake curl libmaxminddb jsoncpp libzmq4 python3``\n\nThe tool also needs a GeoIP database that you can obtain from sites such as [db-ip](https://db-ip.com/db/download/ip-to-country-lite) or [maxmind](https://dev.maxmind.com/geoip/geolite2-free-geolocation-data?lang=en).\n\n# Configuration\nThis 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](ipt_config_utils/single_iface.sh) that shows you how to send selected packets to the application for inspection.\n\nYou also need to configure a configuration file for your rules. We provide [sample_config.json](sample_config.json) as a configuration example.\n\n# Binary Packages\nUnder [packages/debian](packages/debian) you can build a binary package for easy install on Debian/Ubuntu-based systems.\n\n# Usage\nSupposing the you have configure the firewall as described above, you need to start (as root) the tool as follows\n\n``ipt_geofence -c config.json -m dbip-country-lite.mmdb``\n\n# Performance\nOn 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.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntop%2Fipt_geofence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fntop%2Fipt_geofence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntop%2Fipt_geofence/lists"}