To install the dependencies, run the script
install_deps.sh as root.
To set up the filter, run
setup_iptables.sh as root. You may need to change the
queue-num parameter if you already have some NFQUEUE-based iptables rules.
To run the filter, run
python3 main.py as root. If you used a queue number other than
0, you'll need to pass it as the first parameter to main.py.
You can remove all iptables rules by running
iptables --flush as root. However, note
that this will remove all iptables rules.
If you're SSH-ed into a machine, make sure you don't require any intervention inbetween setting up the filter and actually running it, or you'll lose connection. After you do set it up, you need to wait until your SSH socket times out and your client opens a new one.
WARNING: This software is provided "as is", without warranty of any kind. See the top of main.py for details.