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 0.0.0.0/0 192.168.0.1 80easyrule pass wan icmp 18.104.22.168 192.168.0.1easyrule block wan 22.214.171.124