Ordering firewall rules
As mentioned earlier, firewall rules are evaluated on a top-down basis. The first rule that matches a packet is executed, and the rest are skipped. It is important to consider the order of firewall rules. Often specific rules will proceed more general rules. For example, consider the LAN interface. When pfSense is initially installed, it generates two default Allow LAN to any rules – one for IPv4 traffic and the other for IPv6 traffic. The purpose of these rules is to allow internet traffic on the LAN interface, thus allowing LAN nodes to communicate with other local networks and with the internet. If we had placed our newly created rule to block appleinsider.com after these rules, it would always be ignored, since ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access