redesigned firewall.c