Implement a Linux firewall with iptables and ip6tables.

This helper method is gigantic. It could use breaking down further, IMO.