A firewall is a hardware or software based network security system that uses rules to control incoming and outgoing network traffic. It basically acts as a barrier between a trusted network and an untrusted network. A firewall controls access to the resources of a network through a positive control model. What this means is that only the traffic defined in the firewall policy is allowed onto the network, and all other traffic is denied. It filters traffic by source and destination IP, protocols, source, and destination ports for both TCP and UDP traffic. It also limits simultaneous connection on a rule basis.
Now, let's take a look at the following diagram and see how pfSense can act as a firewall:
Consider that there is an external cloud network, which represents the Internet. Next, you have an ISP connection device, such as a cable modem, an ADSL modem...