I want to write a firewall in java as i know the concept behind Firewall.Firewall will simple block the selected ports without opening any listeners on it.please someone explain abt how to block a port using java program? plz dont say that use Listener and open a Server socket coz opening so many sockets on a system will crash CPU.