[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A5DDF20A8NNR0167KK4D65":3,"skill-same:01M7A5DDF20A8NNR0167KK4D65":83},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":46,"commitSha":47,"skillDirectory":48,"forksCount":14,"repositoryHtmlUrl":49,"repositoryHomepageUrl":6,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M7A5DDF20A8NNR0167KK4D65","configuring-pfsense-firewall-rules",null,"Configures pfSense firewall rules, NAT policies, IPsec\u002FOpenVPN tunnels, and traffic shaping to enforce network segmentation and control traffic between zones such as DMZ, internal, guest, and IoT. Use when deploying a pfSense perimeter or internal firewall, setting up port-forwarding NAT, configuring site-to-site or remote-access VPNs, or applying QoS\u002Fbandwidth policies.","NeelakshSaxena\u002FVayu","NeelakshSaxena","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F87892838?v=4","01M7A3B9YFS6F6N9DD1787DT86","Neelaksh Saxena","01M7A3B9ZKBT09MNMPX2XN69BY",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fconfiguring-pfsense-firewall-rules\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fconfiguring-pfsense-firewall-rules\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: configuring-pfsense-firewall-rules\ndescription: 'Configures pfSense firewall rules, NAT policies, IPsec\u002FOpenVPN tunnels,\n  and traffic shaping to enforce network segmentation and control traffic between\n  zones such as DMZ, internal, guest, and IoT. Use when deploying a pfSense perimeter\n  or internal firewall, setting up port-forwarding NAT, configuring site-to-site\n  or remote-access VPNs, or applying QoS\u002Fbandwidth policies.\n\n  '\ndomain: cybersecurity\nsubdomain: network-security\ntags:\n- network-security\n- pfsense\n- firewall\n- nat\n- network-segmentation\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- PR.IR-01\n- DE.CM-01\n- ID.AM-03\n- PR.DS-02\nmitre_attack:\n- T1071.001\n- T1095\n- T1572\n- T1571\n- T1041\n---\n# Configuring pfSense Firewall Rules\n\n## When to Use\n\n- Deploying a perimeter or internal firewall to segment and protect network zones (DMZ, internal, guest, IoT)\n- Creating granular access control rules to restrict traffic between VLANs and network segments\n- Configuring NAT rules for port forwarding to internal services exposed to the internet\n- Setting up site-to-site or remote access VPN tunnels using IPsec or OpenVPN\n- Implementing traffic shaping and bandwidth management for quality-of-service requirements\n\n**Do not use** as a substitute for host-based firewalls on individual systems, for SSL\u002FTLS deep packet inspection without dedicated hardware acceleration, or as the sole security control without complementary IDS\u002FIPS.\n\n## Prerequisites\n\n- pfSense 2.7+ installed on dedicated hardware or virtual machine with at least two network interfaces\n- Access to the pfSense WebConfigurator (default: https:\u002F\u002F192.168.1.1)\n- Network topology diagram showing all interfaces, VLANs, and desired traffic flow\n- DNS and DHCP configuration planned for each network zone\n- Understanding of TCP\u002FIP, NAT, and stateful firewall concepts\n\n## Workflow\n\n### Step 1: Configure Network Interfaces and VLANs\n\nAccess the pfSense WebConfigurator and define interfaces:\n\n```\nNavigate: Interfaces > Assignments\n\nWAN Interface (igb0):\n  - Type: DHCP or Static IP from ISP\n  - Block private networks: Enabled\n  - Block bogon networks: Enabled\n\nLAN Interface (igb1):\n  - IPv4: 10.10.1.1\u002F24\n  - Description: CORPORATE_LAN\n\nCreate VLANs:\n  Navigate: Interfaces > VLANs > Add\n  - VLAN 10 on igb1: DMZ (10.10.10.1\u002F24)\n  - VLAN 20 on igb1: SERVERS (10.10.20.1\u002F24)\n  - VLAN 30 on igb1: GUEST (10.10.30.1\u002F24)\n  - VLAN 40 on igb1: IOT (10.10.40.1\u002F24)\n\nAssign VLANs:\n  Navigate: Interfaces > Assignments > Add each VLAN\n  Enable each interface and assign the gateway IP\n```\n\n### Step 2: Configure DHCP and DNS for Each Zone\n\n```\nNavigate: Services > DHCP Server\n\nCORPORATE_LAN (10.10.1.0\u002F24):\n  Range: 10.10.1.100 - 10.10.1.200\n  DNS: 10.10.20.10 (internal DNS server)\n  Gateway: 10.10.1.1\n\nDMZ (10.10.10.0\u002F24):\n  Range: 10.10.10.100 - 10.10.10.200\n  DNS: 10.10.20.10\n  Gateway: 10.10.10.1\n\nGUEST (10.10.30.0\u002F24):\n  Range: 10.10.30.100 - 10.10.30.200\n  DNS: 1.1.1.1, 8.8.8.8 (public DNS only)\n  Gateway: 10.10.30.1\n\nNavigate: Services > DNS Resolver\n  Enable DNS Resolver on all interfaces except GUEST\n  Enable DNSSEC\n  Configure forwarding to upstream DNS servers\n```\n\n### Step 3: Create Firewall Rule Aliases\n\n```\nNavigate: Firewall > Aliases\n\nRFC1918_Networks:\n  Type: Network\n  Values: 10.0.0.0\u002F8, 172.16.0.0\u002F12, 192.168.0.0\u002F16\n\nWebPorts:\n  Type: Port\n  Values: 80, 443\n\nManagementPorts:\n  Type: Port\n  Values: 22, 3389, 5900\n\nCriticalServers:\n  Type: Host\n  Values: 10.10.20.10, 10.10.20.11, 10.10.20.12\n\nBlockedCountries:\n  Type: URL Table\n  URL: https:\u002F\u002Fwww.ipdeny.com\u002Fipblocks\u002Fdata\u002Faggregated\u002Fcn-aggregated.zone\n  Update: 24 hours\n```\n\n### Step 4: Implement Firewall Rules by Zone\n\n```\nNavigate: Firewall > Rules\n\n=== WAN Rules ===\n# Block all inbound by default (implicit deny)\n# Allow established\u002Frelated traffic (automatic in pfSense stateful mode)\n\n# Allow inbound to DMZ web server (via NAT)\nAction: Pass | Interface: WAN | Protocol: TCP\nSource: any | Destination: WAN Address | Port: 80, 443\nDescription: Allow HTTP\u002FHTTPS to DMZ web server\n\n=== LAN Rules ===\n# Allow LAN to access internal servers\nAction: Pass | Interface: LAN | Protocol: TCP\nSource: LAN net | Destination: SERVERS net | Port: WebPorts, 3306, 5432\nDescription: Allow LAN to internal web and database servers\n\n# Allow LAN to internet\nAction: Pass | Interface: LAN | Protocol: any\nSource: LAN net | Destination: ! RFC1918_Networks\nDescription: Allow LAN to internet (block inter-VLAN via RFC1918 exclusion)\n\n# Block LAN to IoT (explicit deny before implicit allow)\nAction: Block | Interface: LAN | Protocol: any\nSource: LAN net | Destination: IOT net\nDescription: Block direct LAN to IoT communication\n\n=== DMZ Rules ===\n# Allow DMZ web servers to query internal DNS\nAction: Pass | Interface: DMZ | Protocol: TCP\u002FUDP\nSource: DMZ net | Destination: 10.10.20.10 | Port: 53\nDescription: Allow DMZ DNS queries to internal resolver\n\n# Allow DMZ to internet for updates only\nAction: Pass | Interface: DMZ | Protocol: TCP\nSource: DMZ net | Destination: any | Port: 80, 443\nDescription: Allow DMZ outbound HTTP\u002FHTTPS for updates\n\n# Block all other DMZ traffic\nAction: Block | Interface: DMZ | Protocol: any\nSource: DMZ net | Destination: any\nDescription: Default deny for DMZ\n\n=== GUEST Rules ===\n# Allow guest to internet only (DNS and web)\nAction: Pass | Interface: GUEST | Protocol: TCP\u002FUDP\nSource: GUEST net | Destination: ! RFC1918_Networks | Port: 53, 80, 443\nDescription: Allow guest internet access only\n\n# Block all guest to internal\nAction: Block | Interface: GUEST | Protocol: any\nSource: GUEST net | Destination: RFC1918_Networks\nDescription: Block guest access to all internal networks\n\n=== IOT Rules ===\n# Allow IoT to specific cloud endpoints\nAction: Pass | Interface: IOT | Protocol: TCP\nSource: IOT net | Destination: ! RFC1918_Networks | Port: 443, 8883\nDescription: Allow IoT HTTPS and MQTT to cloud\n\n# Block IoT inter-device communication\nAction: Block | Interface: IOT | Protocol: any\nSource: IOT net | Destination: IOT net\nDescription: Prevent IoT lateral movement\n\n# Block IoT to all internal networks\nAction: Block | Interface: IOT | Protocol: any\nSource: IOT net | Destination: RFC1918_Networks\nDescription: Block IoT access to internal\n```\n\n### Step 5: Configure NAT Rules\n\n```\nNavigate: Firewall > NAT > Port Forward\n\n# Web server in DMZ\nInterface: WAN | Protocol: TCP\nDestination: WAN address | Port: 443\nRedirect target IP: 10.10.10.50 | Port: 443\nNAT Reflection: Enable\nDescription: HTTPS to DMZ web server\n\n# SSH jump host (non-standard port)\nInterface: WAN | Protocol: TCP\nDestination: WAN address | Port: 2222\nRedirect target IP: 10.10.20.11 | Port: 22\nDescription: SSH to internal jump host via port 2222\n\nNavigate: Firewall > NAT > Outbound\nMode: Hybrid Outbound NAT\n# Add rule for DMZ servers to use a dedicated public IP\nInterface: WAN | Source: 10.10.10.0\u002F24\nTranslation Address: \u003Cdedicated_public_ip>\nDescription: DMZ outbound NAT via dedicated IP\n```\n\n### Step 6: Enable Logging and Monitoring\n\n```\nNavigate: Status > System Logs > Settings\n  Remote Logging: Enable\n  Remote log servers: 10.10.20.15:514 (Syslog\u002FSIEM)\n  Log firewall default blocks: Enabled\n\nNavigate: Firewall > Rules\n  Enable logging on critical rules:\n  - All BLOCK rules\n  - WAN inbound PASS rules\n  - Inter-VLAN PASS rules\n\nNavigate: Diagnostics > pfTop\n  Monitor real-time connection states and bandwidth usage\n\nInstall pfBlockerNG package:\n  Navigate: System > Package Manager > Available Packages\n  Install pfBlockerNG-devel\n  Configure IP blocklists (Spamhaus DROP, Emerging Threats)\n  Configure DNSBL for malware domain blocking\n```\n\n### Step 7: Backup and Test Configuration\n\n```bash\n# Export configuration backup\nNavigate: Diagnostics > Backup & Restore\nDownload XML configuration file\n\n# Test rules from each zone\n# From LAN:\ncurl -I https:\u002F\u002F10.10.20.10  # Should succeed (LAN to SERVERS)\ncurl -I https:\u002F\u002F10.10.40.5   # Should fail (LAN to IOT blocked)\n\n# From GUEST:\ncurl -I https:\u002F\u002Fwww.google.com  # Should succeed (internet)\ncurl -I https:\u002F\u002F10.10.20.10     # Should fail (guest to internal blocked)\n\n# From DMZ:\nnslookup google.com 10.10.20.10  # Should succeed (DNS allowed)\nssh 10.10.1.50                    # Should fail (DMZ to LAN blocked)\n\n# Verify logging\nNavigate: Status > System Logs > Firewall\nCheck that blocked and passed traffic is logging correctly\n\n# Schedule automated config backups\nNavigate: Diagnostics > AutoConfigBackup\nEnable automatic backups to Netgate cloud or local storage\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Stateful Firewall** | Firewall that tracks the state of network connections and automatically allows return traffic for established sessions without explicit rules |\n| **Alias** | Named group of IP addresses, networks, or ports in pfSense that simplifies rule management and improves readability |\n| **NAT (Network Address Translation)** | Translation of IP addresses between internal and external networks, including port forwarding for inbound access to internal services |\n| **Floating Rules** | pfSense rules that apply across multiple interfaces simultaneously, processed before per-interface rules |\n| **pfBlockerNG** | pfSense package that integrates IP reputation blocklists and DNS-based blocklists for automated threat blocking |\n| **Rule Processing Order** | pfSense evaluates rules top-to-bottom within each interface tab; first match wins, and unmatched traffic is blocked by default |\n\n## Tools & Systems\n\n- **pfSense 2.7+**: Open-source firewall and router platform based on FreeBSD with web-based management and extensive package ecosystem\n- **pfBlockerNG**: IP and DNS blocklist package for automated threat intelligence integration\n- **Snort\u002FSuricata packages**: IDS\u002FIPS integration available as pfSense packages for inline traffic inspection\n- **OpenVPN\u002FIPsec**: Built-in VPN implementations for site-to-site and remote access connectivity\n- **Netgate AutoConfigBackup**: Cloud-based configuration backup service for pfSense disaster recovery\n\n## Common Scenarios\n\n### Scenario: Segmenting a Small Business Network with pfSense\n\n**Context**: A medical practice needs to segment its network to meet HIPAA requirements. They have a single internet connection, an electronic health records (EHR) server, staff workstations, a guest WiFi network, and medical IoT devices (vitals monitors, imaging equipment). Budget constraints require an open-source solution.\n\n**Approach**:\n1. Deploy pfSense on a Netgate 4100 appliance with four physical interfaces (WAN, LAN, DMZ, MGMT)\n2. Create VLANs for staff (VLAN 10), EHR servers (VLAN 20), guest WiFi (VLAN 30), and medical devices (VLAN 40)\n3. Configure strict rules: staff VLAN can access EHR servers on HTTPS only; medical devices can communicate only with the EHR server on specific ports; guest WiFi gets internet-only access with no internal routing\n4. Enable pfBlockerNG with healthcare-specific threat feeds and malware domain blocking\n5. Configure outbound NAT to prevent internal IP addresses from leaking to the internet\n6. Enable comprehensive logging and forward all firewall logs to a SIEM via syslog\n7. Set up automated configuration backups and document the rule base for audit compliance\n\n**Pitfalls**:\n- Creating rules that are too permissive (\"allow any any\") instead of specific port-based rules\n- Forgetting the rule processing order -- placing a broad PASS rule above a specific BLOCK rule\n- Not enabling logging on critical rules, making incident investigation impossible\n- Allowing IoT devices unrestricted internet access, creating potential data exfiltration paths\n\n## Output Format\n\n```\n## pfSense Firewall Configuration Report\n\n**Device**: pfSense 2.7.2 on Netgate 4100\n**Interfaces**: WAN (igb0), LAN (igb1), DMZ (igb2), MGMT (igb3)\n**VLANs**: 4 configured (Staff, Servers, Guest, IoT)\n**Total Rules**: 28 active rules across all interfaces\n\n### Rule Summary by Interface\n\n| Interface | Pass Rules | Block Rules | Logging Enabled |\n|-----------|-----------|-------------|-----------------|\n| WAN | 2 | 1 (default) | Yes |\n| LAN | 4 | 2 | Yes (blocks) |\n| DMZ | 3 | 1 (default) | Yes |\n| GUEST | 1 | 2 | Yes |\n| IOT | 1 | 3 | Yes |\n\n### Security Controls\n- pfBlockerNG: 12 IP blocklists + DNSBL enabled\n- Snort IDS: Running on WAN and LAN interfaces\n- VPN: OpenVPN remote access configured with MFA\n- Logging: All traffic forwarded to SIEM (10.10.20.15)\n```\n","# Configuring pfSense Firewall Rules\n\n## When to Use\n\n- Deploying a perimeter or internal firewall to segment and protect network zones (DMZ, internal, guest, IoT)\n- Creating granular access control rules to restrict traffic between VLANs and network segments\n- Configuring NAT rules for port forwarding to internal services exposed to the internet\n- Setting up site-to-site or remote access VPN tunnels using IPsec or OpenVPN\n- Implementing traffic shaping and bandwidth management for quality-of-service requirements\n\n**Do not use** as a substitute for host-based firewalls on individual systems, for SSL\u002FTLS deep packet inspection without dedicated hardware acceleration, or as the sole security control without complementary IDS\u002FIPS.\n\n## Prerequisites\n\n- pfSense 2.7+ installed on dedicated hardware or virtual machine with at least two network interfaces\n- Access to the pfSense WebConfigurator (default: https:\u002F\u002F192.168.1.1)\n- Network topology diagram showing all interfaces, VLANs, and desired traffic flow\n- DNS and DHCP configuration planned for each network zone\n- Understanding of TCP\u002FIP, NAT, and stateful firewall concepts\n\n## Workflow\n\n### Step 1: Configure Network Interfaces and VLANs\n\nAccess the pfSense WebConfigurator and define interfaces:\n\n```\nNavigate: Interfaces > Assignments\n\nWAN Interface (igb0):\n  - Type: DHCP or Static IP from ISP\n  - Block private networks: Enabled\n  - Block bogon networks: Enabled\n\nLAN Interface (igb1):\n  - IPv4: 10.10.1.1\u002F24\n  - Description: CORPORATE_LAN\n\nCreate VLANs:\n  Navigate: Interfaces > VLANs > Add\n  - VLAN 10 on igb1: DMZ (10.10.10.1\u002F24)\n  - VLAN 20 on igb1: SERVERS (10.10.20.1\u002F24)\n  - VLAN 30 on igb1: GUEST (10.10.30.1\u002F24)\n  - VLAN 40 on igb1: IOT (10.10.40.1\u002F24)\n\nAssign VLANs:\n  Navigate: Interfaces > Assignments > Add each VLAN\n  Enable each interface and assign the gateway IP\n```\n\n### Step 2: Configure DHCP and DNS for Each Zone\n\n```\nNavigate: Services > DHCP Server\n\nCORPORATE_LAN (10.10.1.0\u002F24):\n  Range: 10.10.1.100 - 10.10.1.200\n  DNS: 10.10.20.10 (internal DNS server)\n  Gateway: 10.10.1.1\n\nDMZ (10.10.10.0\u002F24):\n  Range: 10.10.10.100 - 10.10.10.200\n  DNS: 10.10.20.10\n  Gateway: 10.10.10.1\n\nGUEST (10.10.30.0\u002F24):\n  Range: 10.10.30.100 - 10.10.30.200\n  DNS: 1.1.1.1, 8.8.8.8 (public DNS only)\n  Gateway: 10.10.30.1\n\nNavigate: Services > DNS Resolver\n  Enable DNS Resolver on all interfaces except GUEST\n  Enable DNSSEC\n  Configure forwarding to upstream DNS servers\n```\n\n### Step 3: Create Firewall Rule Aliases\n\n```\nNavigate: Firewall > Aliases\n\nRFC1918_Networks:\n  Type: Network\n  Values: 10.0.0.0\u002F8, 172.16.0.0\u002F12, 192.168.0.0\u002F16\n\nWebPorts:\n  Type: Port\n  Values: 80, 443\n\nManagementPorts:\n  Type: Port\n  Values: 22, 3389, 5900\n\nCriticalServers:\n  Type: Host\n  Values: 10.10.20.10, 10.10.20.11, 10.10.20.12\n\nBlockedCountries:\n  Type: URL Table\n  URL: https:\u002F\u002Fwww.ipdeny.com\u002Fipblocks\u002Fdata\u002Faggregated\u002Fcn-aggregated.zone\n  Update: 24 hours\n```\n\n### Step 4: Implement Firewall Rules by Zone\n\n```\nNavigate: Firewall > Rules\n\n=== WAN Rules ===\n# Block all inbound by default (implicit deny)\n# Allow established\u002Frelated traffic (automatic in pfSense stateful mode)\n\n# Allow inbound to DMZ web server (via NAT)\nAction: Pass | Interface: WAN | Protocol: TCP\nSource: any | Destination: WAN Address | Port: 80, 443\nDescription: Allow HTTP\u002FHTTPS to DMZ web server\n\n=== LAN Rules ===\n# Allow LAN to access internal servers\nAction: Pass | Interface: LAN | Protocol: TCP\nSource: LAN net | Destination: SERVERS net | Port: WebPorts, 3306, 5432\nDescription: Allow LAN to internal web and database servers\n\n# Allow LAN to internet\nAction: Pass | Interface: LAN | Protocol: any\nSource: LAN net | Destination: ! RFC1918_Networks\nDescription: Allow LAN to internet (block inter-VLAN via RFC1918 exclusion)\n\n# Block LAN to IoT (explicit deny before implicit allow)\nAction: Block | Interface: LAN | Protocol: any\nSource: LAN net | Destination: IOT net\nDescription: Block direct LAN to IoT communication\n\n=== DMZ Rules ===\n# Allow DMZ web servers to query internal DNS\nAction: Pass | Interface: DMZ | Protocol: TCP\u002FUDP\nSource: DMZ net | Destination: 10.10.20.10 | Port: 53\nDescription: Allow DMZ DNS queries to internal resolver\n\n# Allow DMZ to internet for updates only\nAction: Pass | Interface: DMZ | Protocol: TCP\nSource: DMZ net | Destination: any | Port: 80, 443\nDescription: Allow DMZ outbound HTTP\u002FHTTPS for updates\n\n# Block all other DMZ traffic\nAction: Block | Interface: DMZ | Protocol: any\nSource: DMZ net | Destination: any\nDescription: Default deny for DMZ\n\n=== GUEST Rules ===\n# Allow guest to internet only (DNS and web)\nAction: Pass | Interface: GUEST | Protocol: TCP\u002FUDP\nSource: GUEST net | Destination: ! RFC1918_Networks | Port: 53, 80, 443\nDescription: Allow guest internet access only\n\n# Block all guest to internal\nAction: Block | Interface: GUEST | Protocol: any\nSource: GUEST net | Destination: RFC1918_Networks\nDescription: Block guest access to all internal networks\n\n=== IOT Rules ===\n# Allow IoT to specific cloud endpoints\nAction: Pass | Interface: IOT | Protocol: TCP\nSource: IOT net | Destination: ! RFC1918_Networks | Port: 443, 8883\nDescription: Allow IoT HTTPS and MQTT to cloud\n\n# Block IoT inter-device communication\nAction: Block | Interface: IOT | Protocol: any\nSource: IOT net | Destination: IOT net\nDescription: Prevent IoT lateral movement\n\n# Block IoT to all internal networks\nAction: Block | Interface: IOT | Protocol: any\nSource: IOT net | Destination: RFC1918_Networks\nDescription: Block IoT access to internal\n```\n\n### Step 5: Configure NAT Rules\n\n```\nNavigate: Firewall > NAT > Port Forward\n\n# Web server in DMZ\nInterface: WAN | Protocol: TCP\nDestination: WAN address | Port: 443\nRedirect target IP: 10.10.10.50 | Port: 443\nNAT Reflection: Enable\nDescription: HTTPS to DMZ web server\n\n# SSH jump host (non-standard port)\nInterface: WAN | Protocol: TCP\nDestination: WAN address | Port: 2222\nRedirect target IP: 10.10.20.11 | Port: 22\nDescription: SSH to internal jump host via port 2222\n\nNavigate: Firewall > NAT > Outbound\nMode: Hybrid Outbound NAT\n# Add rule for DMZ servers to use a dedicated public IP\nInterface: WAN | Source: 10.10.10.0\u002F24\nTranslation Address: \u003Cdedicated_public_ip>\nDescription: DMZ outbound NAT via dedicated IP\n```\n\n### Step 6: Enable Logging and Monitoring\n\n```\nNavigate: Status > System Logs > Settings\n  Remote Logging: Enable\n  Remote log servers: 10.10.20.15:514 (Syslog\u002FSIEM)\n  Log firewall default blocks: Enabled\n\nNavigate: Firewall > Rules\n  Enable logging on critical rules:\n  - All BLOCK rules\n  - WAN inbound PASS rules\n  - Inter-VLAN PASS rules\n\nNavigate: Diagnostics > pfTop\n  Monitor real-time connection states and bandwidth usage\n\nInstall pfBlockerNG package:\n  Navigate: System > Package Manager > Available Packages\n  Install pfBlockerNG-devel\n  Configure IP blocklists (Spamhaus DROP, Emerging Threats)\n  Configure DNSBL for malware domain blocking\n```\n\n### Step 7: Backup and Test Configuration\n\n```bash\n# Export configuration backup\nNavigate: Diagnostics > Backup & Restore\nDownload XML configuration file\n\n# Test rules from each zone\n# From LAN:\ncurl -I https:\u002F\u002F10.10.20.10  # Should succeed (LAN to SERVERS)\ncurl -I https:\u002F\u002F10.10.40.5   # Should fail (LAN to IOT blocked)\n\n# From GUEST:\ncurl -I https:\u002F\u002Fwww.google.com  # Should succeed (internet)\ncurl -I https:\u002F\u002F10.10.20.10     # Should fail (guest to internal blocked)\n\n# From DMZ:\nnslookup google.com 10.10.20.10  # Should succeed (DNS allowed)\nssh 10.10.1.50                    # Should fail (DMZ to LAN blocked)\n\n# Verify logging\nNavigate: Status > System Logs > Firewall\nCheck that blocked and passed traffic is logging correctly\n\n# Schedule automated config backups\nNavigate: Diagnostics > AutoConfigBackup\nEnable automatic backups to Netgate cloud or local storage\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Stateful Firewall** | Firewall that tracks the state of network connections and automatically allows return traffic for established sessions without explicit rules |\n| **Alias** | Named group of IP addresses, networks, or ports in pfSense that simplifies rule management and improves readability |\n| **NAT (Network Address Translation)** | Translation of IP addresses between internal and external networks, including port forwarding for inbound access to internal services |\n| **Floating Rules** | pfSense rules that apply across multiple interfaces simultaneously, processed before per-interface rules |\n| **pfBlockerNG** | pfSense package that integrates IP reputation blocklists and DNS-based blocklists for automated threat blocking |\n| **Rule Processing Order** | pfSense evaluates rules top-to-bottom within each interface tab; first match wins, and unmatched traffic is blocked by default |\n\n## Tools & Systems\n\n- **pfSense 2.7+**: Open-source firewall and router platform based on FreeBSD with web-based management and extensive package ecosystem\n- **pfBlockerNG**: IP and DNS blocklist package for automated threat intelligence integration\n- **Snort\u002FSuricata packages**: IDS\u002FIPS integration available as pfSense packages for inline traffic inspection\n- **OpenVPN\u002FIPsec**: Built-in VPN implementations for site-to-site and remote access connectivity\n- **Netgate AutoConfigBackup**: Cloud-based configuration backup service for pfSense disaster recovery\n\n## Common Scenarios\n\n### Scenario: Segmenting a Small Business Network with pfSense\n\n**Context**: A medical practice needs to segment its network to meet HIPAA requirements. They have a single internet connection, an electronic health records (EHR) server, staff workstations, a guest WiFi network, and medical IoT devices (vitals monitors, imaging equipment). Budget constraints require an open-source solution.\n\n**Approach**:\n1. Deploy pfSense on a Netgate 4100 appliance with four physical interfaces (WAN, LAN, DMZ, MGMT)\n2. Create VLANs for staff (VLAN 10), EHR servers (VLAN 20), guest WiFi (VLAN 30), and medical devices (VLAN 40)\n3. Configure strict rules: staff VLAN can access EHR servers on HTTPS only; medical devices can communicate only with the EHR server on specific ports; guest WiFi gets internet-only access with no internal routing\n4. Enable pfBlockerNG with healthcare-specific threat feeds and malware domain blocking\n5. Configure outbound NAT to prevent internal IP addresses from leaking to the internet\n6. Enable comprehensive logging and forward all firewall logs to a SIEM via syslog\n7. Set up automated configuration backups and document the rule base for audit compliance\n\n**Pitfalls**:\n- Creating rules that are too permissive (\"allow any any\") instead of specific port-based rules\n- Forgetting the rule processing order -- placing a broad PASS rule above a specific BLOCK rule\n- Not enabling logging on critical rules, making incident investigation impossible\n- Allowing IoT devices unrestricted internet access, creating potential data exfiltration paths\n\n## Output Format\n\n```\n## pfSense Firewall Configuration Report\n\n**Device**: pfSense 2.7.2 on Netgate 4100\n**Interfaces**: WAN (igb0), LAN (igb1), DMZ (igb2), MGMT (igb3)\n**VLANs**: 4 configured (Staff, Servers, Guest, IoT)\n**Total Rules**: 28 active rules across all interfaces\n\n### Rule Summary by Interface\n\n| Interface | Pass Rules | Block Rules | Logging Enabled |\n|-----------|-----------|-------------|-----------------|\n| WAN | 2 | 1 (default) | Yes |\n| LAN | 4 | 2 | Yes (blocks) |\n| DMZ | 3 | 1 (default) | Yes |\n| GUEST | 1 | 2 | Yes |\n| IOT | 1 | 3 | Yes |\n\n### Security Controls\n- pfBlockerNG: 12 IP blocklists + DNSBL enabled\n- Snort IDS: Running on WAN and LAN interfaces\n- VPN: OpenVPN remote access configured with MFA\n- Logging: All traffic forwarded to SIEM (10.10.20.15)\n```\n",{"name":5,"tags":25,"author":31,"domain":32,"license":15,"version":33,"nist_csf":34,"subdomain":26,"description":39,"mitre_attack":40},[26,27,28,29,30],"network-security","pfsense","firewall","nat","network-segmentation","mahipal","cybersecurity","1.0",[35,36,37,38],"PR.IR-01","DE.CM-01","ID.AM-03","PR.DS-02","Configures pfSense firewall rules, NAT policies, IPsec\u002FOpenVPN tunnels, and traffic shaping to enforce network segmentation and control traffic between zones such as DMZ, internal, guest, and IoT. Use when deploying a pfSense perimeter or internal firewall, setting up port-forwarding NAT, configuring site-to-site or remote-access VPNs, or applying QoS\u002Fbandwidth policies.\n",[41,42,43,44,45],"T1071.001","T1095","T1572","T1571","T1041","main","7540bbccf0c1ded6156a467b02c95b61ad62413f",".agents\u002Fskills\u002Fconfiguring-pfsense-firewall-rules","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena","Currently exploring the intersection of tech","2026-09-11 03:02:31",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add NeelakshSaxena\u002FVayu --skill configuring-pfsense-firewall-rules",{"tool":59,"command":60},"bunx","bunx skills add NeelakshSaxena\u002FVayu --skill configuring-pfsense-firewall-rules",{"tool":62,"command":63},"pnpm","pnpm dlx skills add NeelakshSaxena\u002FVayu --skill configuring-pfsense-firewall-rules","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fconfiguring-pfsense-firewall-rules\u002FSKILL.md",true,[67,71,77],{"path":68,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":72,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Fapi-reference.md","REFERENCE","参考文档",2427,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fconfiguring-pfsense-firewall-rules\u002Freferences\u002Fapi-reference.md",{"path":78,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":81,"sourceHtmlUrl":82},"scripts\u002Fagent.py","SCRIPT","脚本",8569,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fconfiguring-pfsense-firewall-rules\u002Fscripts\u002Fagent.py",[84,91,98,105,112,119],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":20},"01M7ACCCVNCFKMA9X6D15X6G98","runpodctl","Runpod CLI for managing GPU\u002FCPU workloads from the terminal — pods, serverless endpoints, templates, network volumes, Hub deploys, models, SSH, and file transfer (send\u002Freceive). Use for terminal\u002FCI\u002Fscripting, Hub browse\u002Fdeploy, SSH setup, `doctor`, or when the Runpod MCP tools are not connected. For structured tool calls in an MCP-enabled session, prefer runpod-mcp.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpodctl\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":20},"01M7ACC63SRHEA5KMCHSMZK2TC","runpod","Start here for any Runpod task — running GPU\u002FCPU pods, deploying serverless endpoints, templates, network volumes, building images, or understanding how Runpod works. Routes to the right skill (runpod-mcp, runpodctl, flash, companion-clis, runpod-usage, runpod-templates, runpod-migrate) and indexes two dozen live-verified end-to-end examples (golden paths) — use it when the lane is unclear, and for any multi-step or provisioning task even when it is not.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":20},"01M7ACC0Q1C89N9BZBV91CTQTF","runpod-usage","How Runpod works and how to work it — pods vs serverless, GPU\u002FVRAM selection, storage, building a container, networking, plus the agentic pod development loop (provision → ssh-exec → set up → poll readiness) and on-pod install hygiene (uv\u002Fapt). Use to answer \"how does X work\", \"which GPU\", \"how do I build a container\", or \"how do I stand up a workload on a pod\". Guidance, not a tool — execute with runpodctl, runpod-mcp, or flash.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-usage\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":20},"01M7ACBRPE345GF5GM5B8P8RRC","runpod-templates","Runpod's official prebuilt pod templates (ComfyUI, PyTorch, and others): what each image ships, which ports and paths it uses, how to pick one, how to pin a version, and what is missing on first boot. Use when a task says \"run \u003CX> on a pod\" and an official template already covers it, instead of building an image — and when a user needs help with or wants to fix something about a Runpod template they are already running (won't boot, can't reach the UI, missing models, wrong CUDA line, broken ComfyUI workflow metadata on imported workflows): start here and route onward. Deploy with runpodctl or runpod-mcp; end-to-end walkthroughs live in the runpod router's golden paths.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-templates\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":20},"01M7ACBJATHKVX1TWES2F44GY8","runpod-migrate","Migrate a codebase from the Runpod GraphQL API or REST v1 to REST v2 — inventory which parts use which API version, rewrite the call sites, flag breaking changes, and verify. Use when someone asks to move to v2, asks what v2 would change, or asks which Runpod API their code is on. For managing infrastructure rather than migrating code, use runpod-mcp or runpodctl.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-migrate\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":20},"01M7ACBC7GHVH6T9YEAPCG2AP8","runpod-mcp","Manage Runpod infrastructure — pods, serverless endpoints, jobs, templates, network volumes, container-registry auth, GPU\u002FCPU catalog, and billing — via the Runpod MCP server's structured tool calls. Use when the Runpod MCP tools (create-pod, list-endpoints, …) are connected in this session, or to connect them (hosted OAuth or local npx). Prefer this over runpodctl for plain infra CRUD when MCP is available; use runpodctl for the terminal, file transfer, or SSH setup.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-mcp\u002FSKILL.md",[],[]]