- Add backup-pfsense-config.sh script for automated config backups via SSH - Auto-commits backups to git with timestamped filenames - Includes validation, error handling, and troubleshooting guides - Add scripts/README.md with detailed usage and crontab examples - Add BACKUP-QUICKSTART.md for quick reference commands - Update README.md to reference automated backup workflow - Create backups/ directory structure The script tests SSH connectivity successfully to pfSense.
9.2 KiB
VLAN Implementation Quickstart
Step-by-step checklist for configuring VLANs on pfSense. Use this guide to implement your 3-VLAN network.
Pre-Implementation
Before you start, gather this information:
- pfSense WebUI URL (usually
https://192.168.1.1or similar) - Admin credentials for pfSense
- Your WAN/LAN interface names (check: Interfaces → Assignments)
- Backup your current pfSense config (download before making changes)
- Physical switch info (if you have one) — check if it supports VLAN tagging
Phase 1: Create VLANs (5 minutes)
-
Log into pfSense WebUI
- Open
https://[pfSense-IP] - Enter admin credentials
- Open
-
Navigate to VLAN Creation
- Go: Interfaces → VLANs
- Click Display Advanced
-
Create VLAN_AIWORKLOAD
- Click + Add
- Parent Interface:
em0(or your LAN NIC name) - VLAN Tag:
2 - VLAN Priority:
0 - Description:
VLAN_AIWORKLOAD - Click Save
-
Create VLAN_IOT
- Click + Add
- Parent Interface:
em0 - VLAN Tag:
3 - VLAN Priority:
0 - Description:
VLAN_IOT - Click Save
-
Apply Changes
- Click Apply Changes button
- Wait for reboot/apply to complete
Phase 2: Assign Virtual Interfaces (5 minutes)
-
Navigate to Assignments
- Go: Interfaces → Assignments
-
Note down the OPT interfaces created
- You should see two new entries: e.g.,
em0.2andem0.3 - These will be assigned as
OPT1andOPT2(or similar)
- You should see two new entries: e.g.,
-
Click the OPT1 link (VLAN_AIWORKLOAD)
- Description:
VLAN_AIWORKLOAD - IPv4 Configuration Type:
Static IPv4 - IPv4 Address:
172.27.2.1 - IPv4 Subnet Mask:
255.255.255.0 - IPv6 Configuration Type:
None - Enable Interface: ✓ Check this box
- Scroll down and click Save
- Description:
-
Repeat for OPT2 (VLAN_IOT)
- Description:
VLAN_IOT - IPv4 Configuration Type:
Static IPv4 - IPv4 Address:
172.27.3.1 - IPv4 Subnet Mask:
255.255.255.0 - Enable Interface: ✓ Check this box
- Scroll down and click Save
- Description:
-
Apply Changes
- Click Apply Changes button
Phase 3: Configure DHCP (10 minutes)
-
Navigate to DHCP Server
- Go: Services → DHCP Server
-
Configure VLAN_AIWORKLOAD DHCP
- Click VLAN_AIWORKLOAD tab
- Enable DHCP server on VLAN_AIWORKLOAD interface: ✓ Check
- Range Start:
172.27.2.100 - Range End:
172.27.2.200 - Scroll down to Servers section
- DNS 1:
172.27.0.1(pfSense) - DNS 2:
8.8.8.8(optional backup) - Gateway: Should auto-populate as
172.27.2.1 - Scroll down and click Save
-
Configure VLAN_IOT DHCP
- Click VLAN_IOT tab
- Enable DHCP server on VLAN_IOT interface: ✓ Check
- Range Start:
172.27.3.100 - Range End:
172.27.3.200 - Scroll down to Servers section
- DNS 1:
172.27.0.1 - DNS 2:
8.8.8.8 - Gateway: Should auto-populate as
172.27.3.1 - Scroll down and click Save
-
Verify LAN DHCP
- Click LAN tab
- Confirm Enable DHCP server on LAN interface is ✓ checked
- Verify gateway is
172.27.0.1 - Click Save
-
Apply Changes
- Click Apply Changes button
Phase 4: Configure Firewall Rules (15 minutes)
LAN → VLAN Rules
-
Go to LAN rules
- Firewall → Rules → LAN
-
Add rule: Block LAN → VLAN_AIWORKLOAD
- Click + Add (at bottom)
- Action:
Block - Interface:
LAN - Direction:
in - Address Family:
IPv4 - Protocol:
any - Source:
LAN subnet(or specify172.27.0.0/24) - Destination:
VLAN_AIWORKLOAD subnet(specify172.27.2.0/24) - Description:
Block LAN → VLAN_AIWORKLOAD - Click Save
-
Add rule: Block LAN → VLAN_IOT
- Click + Add
- Action:
Block - Interface:
LAN - Source:
172.27.0.0/24 - Destination:
172.27.3.0/24 - Description:
Block LAN → VLAN_IOT - Click Save
VLAN_AIWORKLOAD Rules
-
Go to VLAN_AIWORKLOAD rules
- Firewall → Rules → VLAN_AIWORKLOAD (or OPT1)
-
Add rule: Block VLAN_AIWORKLOAD → LAN
- Click + Add
- Action:
Block - Interface:
VLAN_AIWORKLOAD - Source:
VLAN_AIWORKLOAD subnet(specify172.27.2.0/24) - Destination:
LAN subnet(specify172.27.0.0/24) - Description:
Block VLAN_AIWORKLOAD → LAN - Click Save
-
Add rule: Allow VLAN_AIWORKLOAD → WAN
- Click + Add
- Action:
Pass - Interface:
VLAN_AIWORKLOAD - Source:
VLAN_AIWORKLOAD subnet(specify172.27.2.0/24) - Destination:
any - Protocol:
any - Description:
Allow VLAN_AIWORKLOAD → Internet - Click Save
VLAN_IOT Rules
-
Go to VLAN_IOT rules
- Firewall → Rules → VLAN_IOT (or OPT2)
-
Add rule: Block VLAN_IOT → LAN
- Click + Add
- Action:
Block - Interface:
VLAN_IOT - Source:
VLAN_IOT subnet(specify172.27.3.0/24) - Destination:
LAN subnet(specify172.27.0.0/24) - Description:
Block VLAN_IOT → LAN - Click Save
-
Add rule: Block VLAN_IOT → VLAN_AIWORKLOAD
- Click + Add
- Action:
Block - Source:
172.27.3.0/24 - Destination:
172.27.2.0/24 - Description:
Block VLAN_IOT → VLAN_AIWORKLOAD - Click Save
-
Add rule: Allow VLAN_IOT → WAN
- Click + Add
- Action:
Pass - Source:
VLAN_IOT subnet(specify172.27.3.0/24) - Destination:
any - Protocol:
any - Description:
Allow VLAN_IOT → Internet - Click Save
Apply Firewall Changes
- Click Apply Changes button (usually at top of rules)
Phase 5: Testing (10 minutes)
Test DHCP
-
Connect a test device to VLAN_AIWORKLOAD
- Assign a device to this VLAN (via switch port or manually)
- Check if device gets IP in range 172.27.2.100-200
- Verify gateway shows 172.27.2.1
- Test ping to gateway:
ping 172.27.2.1✓
-
Connect a test device to VLAN_IOT
- Assign a device to this VLAN
- Check if device gets IP in range 172.27.3.100-200
- Verify gateway shows 172.27.3.1
- Test ping to gateway:
ping 172.27.3.1✓
Test Inter-VLAN Isolation
-
Test VLAN_AIWORKLOAD cannot reach LAN
- From device on VLAN_AIWORKLOAD (172.27.2.x)
- Try ping to LAN device (172.27.0.x)
- Should timeout/fail ✗ (expected)
-
Test VLAN_IOT cannot reach LAN
- From device on VLAN_IOT (172.27.3.x)
- Try ping to LAN device (172.27.0.x)
- Should timeout/fail ✗ (expected)
-
Test LAN cannot reach VLANs
- From LAN device (172.27.0.x)
- Try ping to VLAN_AIWORKLOAD device (172.27.2.x)
- Should timeout/fail ✗ (expected)
Test Internet Access
-
Test VLAN_AIWORKLOAD → Internet
- From device on VLAN_AIWORKLOAD
- Test DNS:
nslookup google.com✓ - Test internet:
ping 8.8.8.8✓
-
Test VLAN_IOT → Internet
- From device on VLAN_IOT
- Test DNS:
nslookup google.com✓ - Test internet:
ping 8.8.8.8✓
Phase 6: Backup & Documentation (5 minutes)
-
Backup pfSense Configuration
- Go: Diagnostics → Backup & Restore
- Click Download configuration as XML
- Save as:
pfsense-config-vlan-setup-2026-04-22.xml
-
Commit to Git
cd /Users/kenjim/workspace/src/personal/appa-net git add pfsense.home.arpa/ git commit -m "pfSense: Initial VLAN configuration (VLAN_AIWORKLOAD, VLAN_IOT)" git push- Commit completed
-
Document Completion
- Update this file with completion date
- Note any deviations from plan
- Record interface names if different from expected
Troubleshooting
| Issue | Solution |
|---|---|
| Device not getting DHCP | Check DHCP is enabled for that VLAN in Services → DHCP Server |
| Can't ping gateway | Verify virtual interface is enabled (Interfaces → Assignments) |
| Can't reach internet | Check WAN allow rules in firewall |
| Still can reach between VLANs | Check firewall rules order (first match wins); rules may be in wrong order |
| Switch not forwarding VLAN traffic | Verify trunk port on switch is tagged for all VLANs |
Post-Implementation
Once everything is working:
-
Assign your devices to VLANs via DHCP static mappings
- See VLAN-CONFIG.md for device list
-
Monitor firewall logs for unexpected traffic
- Go: Status → System Logs → Firewall
-
Update your documentation as you add more devices
-
Schedule regular backups
- Monthly: Export pfSense config to
backups/pfsense-config-YYYY-MM-DD.xml
- Monthly: Export pfSense config to
Estimated Total Time: 45 minutes
Last Updated: 2026-04-22