geoipsets


Namegeoipsets JSON
Version 2.3.6 PyPI version JSON
download
home_pagehttps://github.com/chr0mag/geoipsets
SummaryUtility to build country-specific IP sets for ipset/iptables and nftables.
upload_time2024-01-07 03:36:44
maintainer
docs_urlNone
author
requires_python
licenseGPLv3
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![badge](https://github.com/chr0mag/geoipsets/actions/workflows/ci.yaml/badge.svg) ![PyPI](https://img.shields.io/pypi/v/geoipsets) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/geoipsets) [![Downloads](https://pepy.tech/badge/geoipsets)](https://pepy.tech/project/geoipsets) ![GitHub](https://img.shields.io/github/license/chr0mag/geoipsets)

Installation
------------

```pip install geoipsets```

Usage
------
Utility output can be controlled using a configuration file and/or command line options. For the MaxMind provider type, this configuration file is required in order to provide the license-key. See the [example](https://github.com/chr0mag/geoipsets/blob/main/python/geoipsets.conf) for details.

The example file enables all options which is likely not what you want as it will generate IPv4 and IPv6 sets for both firewall types for all countries.

Typically, you would want to select only one firewall type along with a short list of countries and perhaps only for the IPv4 address family.

The utility will attempt to read the configuration file at */etc/geoipsets.conf* but the location can be overidden using the *--config PATH_TO_FILE* command line option.

```shell
usage: geoipsets [-h] [-v] [-p {dbip,maxmind} [{dbip,maxmind} ...]] [-f {iptables,nftables} [{iptables,nftables} ...]] [-a {ipv6,ipv4} [{ipv6,ipv4} ...]]
                 [-l COUNTRIES] [-o OUTPUT_DIR] [-c CONFIG_FILE] [--checksum] [--no-checksum]

Utility to build country specific IP sets for ipset/iptables and nftables. Command line arguments take precedence over those in the configuration file.

options:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -p {dbip,maxmind} [{dbip,maxmind} ...], --provider {dbip,maxmind} [{dbip,maxmind} ...]
                        dataset provider(s) (default: dbip)
  -f {iptables,nftables} [{iptables,nftables} ...], --firewall {iptables,nftables} [{iptables,nftables} ...]
                        firewall(s) to build sets for (default: nftables)
  -a {ipv6,ipv4} [{ipv6,ipv4} ...], --address-family {ipv6,ipv4} [{ipv6,ipv4} ...]
                        IP protocol(s) to build sets for (default: ipv4)
  -l COUNTRIES, --countries COUNTRIES
                        Path to a file containing 2-character country codes, one per line, or a comma-separated list of country codes. Argument is treated
                        as a path first. If it does not resolve, or the resolved file is invalid, then it is parsed as a comma-separated list.
  -o OUTPUT_DIR, --output-dir OUTPUT_DIR
                        directory where geoipsets should be saved (default: /tmp)
  -c CONFIG_FILE, --config-file CONFIG_FILE
                        path to configuration file (default: /etc/geoipsets.conf)
  --checksum            enable checksum validation of downloaded files (default)
  --no-checksum         disable checksum validation of downloaded files
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/chr0mag/geoipsets",
    "name": "geoipsets",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/d1/d2/74927085f206efecc3c4c634b336f1b8643c23f32ee388fe071c11a9d6c8/geoipsets-2.3.6.tar.gz",
    "platform": null,
    "description": "![badge](https://github.com/chr0mag/geoipsets/actions/workflows/ci.yaml/badge.svg) ![PyPI](https://img.shields.io/pypi/v/geoipsets) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/geoipsets) [![Downloads](https://pepy.tech/badge/geoipsets)](https://pepy.tech/project/geoipsets) ![GitHub](https://img.shields.io/github/license/chr0mag/geoipsets)\n\nInstallation\n------------\n\n```pip install geoipsets```\n\nUsage\n------\nUtility output can be controlled using a configuration file and/or command line options. For the MaxMind provider type, this configuration file is required in order to provide the license-key. See the [example](https://github.com/chr0mag/geoipsets/blob/main/python/geoipsets.conf) for details.\n\nThe example file enables all options which is likely not what you want as it will generate IPv4 and IPv6 sets for both firewall types for all countries.\n\nTypically, you would want to select only one firewall type along with a short list of countries and perhaps only for the IPv4 address family.\n\nThe utility will attempt to read the configuration file at */etc/geoipsets.conf* but the location can be overidden using the *--config PATH_TO_FILE* command line option.\n\n```shell\nusage: geoipsets [-h] [-v] [-p {dbip,maxmind} [{dbip,maxmind} ...]] [-f {iptables,nftables} [{iptables,nftables} ...]] [-a {ipv6,ipv4} [{ipv6,ipv4} ...]]\n                 [-l COUNTRIES] [-o OUTPUT_DIR] [-c CONFIG_FILE] [--checksum] [--no-checksum]\n\nUtility to build country specific IP sets for ipset/iptables and nftables. Command line arguments take precedence over those in the configuration file.\n\noptions:\n  -h, --help            show this help message and exit\n  -v, --version         show program's version number and exit\n  -p {dbip,maxmind} [{dbip,maxmind} ...], --provider {dbip,maxmind} [{dbip,maxmind} ...]\n                        dataset provider(s) (default: dbip)\n  -f {iptables,nftables} [{iptables,nftables} ...], --firewall {iptables,nftables} [{iptables,nftables} ...]\n                        firewall(s) to build sets for (default: nftables)\n  -a {ipv6,ipv4} [{ipv6,ipv4} ...], --address-family {ipv6,ipv4} [{ipv6,ipv4} ...]\n                        IP protocol(s) to build sets for (default: ipv4)\n  -l COUNTRIES, --countries COUNTRIES\n                        Path to a file containing 2-character country codes, one per line, or a comma-separated list of country codes. Argument is treated\n                        as a path first. If it does not resolve, or the resolved file is invalid, then it is parsed as a comma-separated list.\n  -o OUTPUT_DIR, --output-dir OUTPUT_DIR\n                        directory where geoipsets should be saved (default: /tmp)\n  -c CONFIG_FILE, --config-file CONFIG_FILE\n                        path to configuration file (default: /etc/geoipsets.conf)\n  --checksum            enable checksum validation of downloaded files (default)\n  --no-checksum         disable checksum validation of downloaded files\n```\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "Utility to build country-specific IP sets for ipset/iptables and nftables.",
    "version": "2.3.6",
    "project_urls": {
        "Homepage": "https://github.com/chr0mag/geoipsets"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c5e4d419299653a1af2f63456420fefd6515b00ad8922b24b3d800bbf43fafae",
                "md5": "bf3262644d6a5397b91eeabdeb9a870b",
                "sha256": "93a45f876929503a46b6b4d08bed1349dda3d56936ea7f4ac467f252947be1fd"
            },
            "downloads": -1,
            "filename": "geoipsets-2.3.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bf3262644d6a5397b91eeabdeb9a870b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 11061,
            "upload_time": "2024-01-07T03:36:43",
            "upload_time_iso_8601": "2024-01-07T03:36:43.485914Z",
            "url": "https://files.pythonhosted.org/packages/c5/e4/d419299653a1af2f63456420fefd6515b00ad8922b24b3d800bbf43fafae/geoipsets-2.3.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d1d274927085f206efecc3c4c634b336f1b8643c23f32ee388fe071c11a9d6c8",
                "md5": "00ddffee3f67f7ac3c6bf31c0e0b6999",
                "sha256": "7136e3dd8ce7b81e2bc2e159cb96496f3e00d53b01df3b9353997484cb4af933"
            },
            "downloads": -1,
            "filename": "geoipsets-2.3.6.tar.gz",
            "has_sig": false,
            "md5_digest": "00ddffee3f67f7ac3c6bf31c0e0b6999",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 10009,
            "upload_time": "2024-01-07T03:36:44",
            "upload_time_iso_8601": "2024-01-07T03:36:44.891834Z",
            "url": "https://files.pythonhosted.org/packages/d1/d2/74927085f206efecc3c4c634b336f1b8643c23f32ee388fe071c11a9d6c8/geoipsets-2.3.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-07 03:36:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "chr0mag",
    "github_project": "geoipsets",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "geoipsets"
}
        
Elapsed time: 0.23672s