A firewall is a security technology (hardware, software or both) to protect networks through specific functionalities and security rules. For instance, monitoring incoming and outgoing traffic, filtering of traffic, blocking the access for unauthorized outsiders, suspicious traffic, and also malicious software.
Firewalls divide the private part of a network from the public part of the interconnection supplied by the Internet.