Securing networks with firewall rules