A system designed to prevent unauthorized access to or from a private network. Firewalls can be implemented as hardware, software, or a combination of both. All messages entering or leaving pass through the firewall, which examines each message and blocks those that do not meet the security criteria specified on the firewall.
A firewall’s main security purpose is blocking unsolicited incoming network traffic, but because a firewall is sitting between these two networks, it can analyze all traffic reaching or leaving the network and decide what to do with it; a firewall could have a variety of rules that allow and deny certain types of traffic. For example, it could only allow connections to a server from a specific IP address, dropping all connection requests from elsewhere for security.