Welcome to the advanced guide for pfSense configuration. This comprehensive resource will explore advanced features and configurations of pfSense, helping you create a robust and secure network environment.
Floating rules in pfSense allow you to create firewall rules that apply to multiple interfaces:
Firewall -> Rules -> Floating
Add a new rule:
Action: Pass
Interface: Multiple (WAN, LAN)
Protocol: TCP
Source: Any
Destination: LAN net
Destination Port Range: HTTPS
Description: Allow HTTPS from WAN to LAN
Create aliases to manage groups of IPs or ports efficiently:
Firewall -> Aliases -> IP Aliases
Add a new alias:
Name: malicious_ips
Type: URL Table (IPs)
URL: https://lists.blocklist.de/lists/all.txt
Update Frequency: 1 day
Configure a secure site-to-site VPN using IPsec:
VPN -> IPsec -> Tunnels
Add P1:
Remote Gateway: [Remote pfSense IP]
Authentication Method: Mutual PSK
My identifier: My WAN IP
Peer identifier: Peer WAN IP
Pre-Shared Key: [Your secure key]
Add P2:
Local Network: LAN subnet
Remote Network: Remote LAN subnet
Enhance OpenVPN security with 2FA:
System -> User Manager
Edit user, enable Google Authenticator
VPN -> OpenVPN -> Servers
Edit server, under "Advanced Options":
Auth Mode: Local Database + Google Authenticator
Set up policy-based routing for specific traffic:
System -> Routing
Enable "Gateway Groups"
Create a gateway group:
Name: LoadBalanced
Tier 1: WAN_DHCP, WAN2_DHCP
Firewall -> Rules
Add a new rule on LAN interface:
Protocol: TCP/UDP
Source: LAN net
Destination: Any
Advanced Features:
Gateway: LoadBalanced
Configure OSPF for larger networks:
System -> Package Manager
Install package: FRR
Services -> FRR OSPF
Enable OSPF
Add networks to be advertised
Configure OSPF interfaces
Set up advanced QoS using HFSC:
Firewall -> Traffic Shaper
Interface: WAN
Scheduler: HFSC
Queues:
- VoIP (Priority: 1, Bandwidth: 20%)
- Web Browsing (Priority: 2, Bandwidth: 40%)
- Default (Priority: 3, Bandwidth: 40%)
Create rules to limit bandwidth for specific applications:
Firewall -> Rules
Add new rule:
Protocol: TCP
Destination port: 1935 (for example, Flash video)
Advanced Options:
In/Out pipe: Select appropriate limiter
Set up Netflow for detailed traffic analysis:
Diagnostics -> Netflow
Enable Netflow
Destination IP: [Your Netflow collector IP]
Destination Port: 2055
Configure SNMP for integration with monitoring systems:
Services -> SNMP
Enable SNMP
Community String: [Your secure string]
SNMP Trap Server: [Your SNMP server IP]
Always test configurations in a controlled environment before deploying to production.
Incorrect configurations can lead to network instability or security vulnerabilities.
Regularly backup your pfSense configuration before making significant changes.
| Command | Description |
|---|---|
pfSsh.php |
Access pfSense PHP shell |
pfctl -s state |
Display firewall state table |
tcpdump -i igb0 -n |
Capture traffic on igb0 interface |
ping -c 4 8.8.8.8 |
Test connectivity to Google DNS |
netstat -r |
Display routing table |
Explore our other advanced networking guides: