PFSense: How to add firewall rule at the command line?

There is a command line available in PFSense firewall to allow you to add firewall rules. In the event of  locked out from firewall due to miss configuration of firewall rules, you may use command line “easyrule” to add firewall rules to let you get in to firewall again.

Below are the syntax and example of easyrule command:-

Syntax EasyRule function

easyrule pass/block <interface> <protocol> <source IP> <destination ip> [destination port]


easyrule pass wan tcp 80
easyrule pass wan icmp
easyrule block wan