pfSense VLAN Isolation
Use this guide to configure VLAN isolation in pfSense.
One of the most valuable uses of VLANs is isolating devices so that systems on separate segments cannot communicate directly with one another. This isolation helps contain potential threats by preventing attackers from moving laterally across the network, limiting their access to only the devices within a compromised VLAN.
Alias Creation
First, create an alias for internal networks. This allows firewall rules to easily allow or block communication between VLANs.
Click on the Firewall dropdown, then select Aliases.
Ensure you are on the IP tab.
Click the +Add button.
Enter a unique name.
Use the Description field to explain what the alias is used for.
For Type, select Network(s).
Under Network or FQDN, enter the private IP range.
The example below uses 10.0.0.0/8.
Click Save.
Click Apply Changes.
Firewall Rules
Four firewall rules will be created.
A brief overview from top to bottom is listed below.
Rule 1: Block access to the pfSense webConfigurator (this can be skipped if already completed during VLAN creation)
Rule 2: Allow DNS Access
Rule 3: Block Access to Other VLANs
Rule 4: Allow Internet and Outbound Network Access
To create firewall rules, click on the Firewall dropdown.
Select Rules.
Select the VLAN interface the rules will apply to.
Rule 1 - Block webConfigurator Access
This rule blocks access to the pfSense webConfigurator from the VLAN. This helps prevent unauthorized users from attempting to modify router settings.
Click Add.
Set the following options.
Action: Block
Interface: VLAN Interface Name
Address Family: IPv4
Protocol: TCP
Source: Any
Destination: This Firewall
Destination Port Range:
From: Other
Custom: pfSense webConfigurator Port Number
To: Other
Custom: pfSense webConfigurator Port Number
Log: ☑ Log packets handled by this rule
Description: Block webConfigurator Access
Click Save.
Click Apply Changes.
Rule 2 - Allow DNS Access
Devices require DNS access in order to resolve domain names. This rule allows VLAN devices to communicate with the pfSense DNS resolver.
Click Add.
Set the following options.
Action: Pass
Interface: VLAN Interface Name
Address Family: IPv4
Protocol: TCP/UDP
Source: VLAN Interface Subnet
Destination: This Firewall
Destination Port Range:
From: DNS (53)
To: DNS (53)
Log: Disable Logging
Description: VLAN Allow DNS Access
Click Save.
Click Apply Changes.
Rule 3 - Block Access to Other VLANs
This rule blocks communication between the VLAN and other internal private networks.
Click Add.
Set the following options.
Action: Block
Interface: VLAN Interface Name
Address Family: IPv4
Protocol: Any
Source: VLAN Interface Subnet
Destination: Address or Alias
Alias: Name of the alias created in the previous steps
Log: ☑ Log packets handled by this rule
Description: VLAN Block Access to Other VLANs
Click Save.
Click Apply Changes.
Rule 4 - Allow Outbound Access
This rule allows devices on the VLAN to access external networks, including the internet.
If internet access should be blocked for this VLAN, the Action can instead be changed from Pass to Block.
Click Add.
Set the following options.
Action: Pass
Interface: VLAN Interface Name
Address Family: IPv4
Protocol: Any
Source: VLAN Interface Subnet
Destination: Any
Log: Disable Logging
Description: VLAN Allow Outbound Access
Click Save.
Click Apply Changes.
Finishing Up
Once completed, double-check that the firewall rules are in the correct order from top to bottom.
1. Block webConfigurator Access
2. VLAN Allow DNS Access
3. VLAN Block Access to Other VLANs
4. VLAN Allow Outbound Access