ntop / ipt_geofence

Geographical host protection for Linux/FreeBSD
GNU Affero General Public License v3.0
105 stars 15 forks source link

Rework JSON Configuration #12

Closed lucaderi closed 2 years ago

lucaderi commented 2 years ago

The JSON configuration is not much readable and some changes are required.This is an example of a better JSON that could replace the current one

{
    "queue_id": 0,
    "default_policy": "DROP",
    "monitored_ports": {
        "tcp": [22, 80, 443],
        "udp": [],
        "ignored_ports": [123]
    },
    "policy": {
        "drop": {
            "countries_whitelist": ["IT", "DE", "CH", "NL"],
            "continents_whitelist": ["NA"]
        },
        "pass": {
            "countries_blacklist": ["RU", "BY"],
            "continents_blacklist": ["EU"]
        }
    },
    "blacklists": [
        "https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/dshield_7d.netset",
        "https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/alienvault_reputation.ipset",
        "https://feodotracker.abuse.ch/downloads/ipblocklist_recommended.txt",
        "https://rules.emergingthreats.net/fwrules/emerging-Block-IPs.txt",
        "https://feodotracker.abuse.ch/downloads/ipblocklist.txt",
        "https://sslbl.abuse.ch/blacklist/sslipblacklist.txt"
    ]
}
lucaderi commented 2 years ago

Fixed by https://github.com/ntop/ipt_geofence/pull/13