How to define outgoing firewall rules on pFSense

LAN rules are defining rights to access internet services from your local network. So, if you block port 80 and 443 nobody from your LAN will be able to access internet. WAN rules are defining access to the resources in your LAN (or DMZ) from the internet. In this short LAB we`ll be defining LAN rules. Let’s say we want to block access to the port 443 from our local network.

My blog is on port 443, so after defining this rule we should not be able to access my blog from LAB network (or any other HTTPS secured website for that matter)

Login to your pFSense configuration via web browser – mine is is still located on

Select Firewall | Rules

Select LAN tab. As you can see, by default all traffic from you LAN is allowed toward internet.

Select (up) Add

New window opens with settings:

Action: Block (since I want to block traffic to the outside) | Interface: LAN | Address Family IPv4 |Protocol TCP

Source – that should be LAN net (we want to block HTTPS for whole LAN) |Destination: any | Destination Port Range HTTPS 443

Extra Options: You can enter Description and turn on Logging for the rule | Save

After you clicked on save you`ll be back on the main LAN Rule screen

Click Apply Changes

Now, onto rule testing…

We should not be able to access my blog because it is on HTTPS protocol –

Timed out…

I also tried another site on HTTPS and result is the same

But, when we try site that is not HTTPS encrypted…


I also tested with FTP port – result is the same – so we can conclude that this works.

Smart idea would be to disable default ALLOW ALL traffic rules– you should remove default LAN firewall rules created by pFSense and define only ports you would like to use – only that way you can block unwanted traffic and better control your LAN-> WAN traffic.

Here is my default configuration for internet access

DNS rule HAS TO BE ALLOWED, and with both TCP/UDP protocol, otherwise your clients won`t be able to access internet.

By this short tutorial you can successfully define rules that will either allow of block some traffic from your network, in this example we covered blocking, but If you want to allow something, procedure is the same, except you’ll choose allow instead of block rule.



Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.