I built something similar to this[1] for when I'm dealing with hosts I don't have complete control of -- to block outgoing connections. Now it seems there might be a more widespread use case.
[1] https://www.badllama.com/content/portable-raspberry-pi-firew...