tinysnitch

tinysnitch

an interactive firewall for inbound and outbound connections

github.com/nathants/tinysnitch

why

it should be easy to monitor and control inbound and outbound connections.

what

an interactive firewall for inbound and outbound connections.

the rules are global, but the prompt always shows the pid/path/args of the program requesting a new rule.

based on the excellent opensnitch.

demo

a split screen monitoring setup for a second monitor using ptop, color, pys, and a oneliner to tail tinysnitch logs into a small and colorful format.

dependencies

  • everything in tinysnitch/bin is a separate component, with separate dependencies. you can run them independently to make sure dependencies are correctly installed.

  • tinysnitchd:

  • tinysnitch-prompt

install

put tinysnitch/bin on your $PATH.

usage

add the iptable rules with: tinysnitch-iptables-add

you probably want to save those rules and have them loaded on system startup.

tinysnitchd must be launched with sudo as a user process, so the subprocess pyqt5 prompts can actually show up on your screen.

either run it in a background terminal: sudo -E tinysnitchd

or automatically run it with cron: * * * * * sudo -E auto-restart tinysnitchd 2>&1 | rotate-logs /tmp/tinynitchd.log

auto-restart and rotate-logs are not convenient, not required.

rules

permanent rules are stored in /etc/tinysnitch.rules, and tinysnitchd will reload the rules when edited.