How do firewalls work?
A firewall connects two networks, usually the public Internet and a private business network. The firewall examines all communications attempting to travel from one of those networks to the other and decides whether to allow it to pass or not. The firewall security policy determines what is allowed to pass.