A firewall is a hardware or software component that works as a security device between networks, allowing or denying transmissions from one network to the other. It acts as a filter that controls all connections, allowing or denying traffic according to the security policies defined by the administrator.
Generally, it is located between a local network and the Internet to prevent intruders from accessing private resources in a LAN.
To be able to configure a firewall correctly, certain knowledge about network protocols and security is required. Incorrect configuration can cause a firewall to be invalid as a security tool.
In order to allow or deny a connection, the firewall inspects the type of service to which it corresponds. Depending on the service, the firewall determines whether to allow the connection or not. A firewall also checks whether the connection is inbound or outbound and can reject it or not, depending on the direction of the connection.
By doing this, a firewall can allow access to web services, mail and FTP from a local network to the Internet, but deny peer-to-peer connections, which could be unnecessary for the user’s job. Access from the Internet to the local network can also be configured and all connections can be denied or some can be permitted, such as access to web service that it could offer in the Internet.