firewall icon indicating copy to clipboard operation
firewall copied to clipboard

Simple iptables based firewall

firewall is a simple go app that adds and removes iptables rules blocking external access to ports unless it matches a specific ip.

Apply the rules within the config

firewall config.json

Remove the rules within the config

firewall -rm config.json

Sample config

[
    {
        "interface": "eth0",
        "proto": "tcp",
        "port": 8080,
        "allow": [
            "107.170.333.222"
        ]
    }
]