write a firewall in java