[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AE5R539HD08CV3AW33SC0T":3,"skill-same:01M6AE5R539HD08CV3AW33SC0T":96},{"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":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":35,"linkOnly":36,"markdownContent":37,"markdownBody":38,"frontMatter":39,"refName":55,"commitSha":56,"skillDirectory":57,"forksCount":58,"repositoryHtmlUrl":59,"repositoryHomepageUrl":60,"ownerHtmlUrl":61,"ownerBlogUrl":62,"ownerDescription":63,"updatedAt":64,"install":65,"resources":78},"01M6AE5R539HD08CV3AW33SC0T","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.","mukul975\u002FAnthropic-Cybersecurity-Skills","mukul975","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42860185?v=4","01M6ADEQR8T5M4EEG6C67BQCWF","Mahipal","01M6ADJPMYWG1E5GM1FWBE3128",35925,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fconfiguring-pfsense-firewall-rules\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34],"configuring pfsense firewall rules","security","cybersecurity","pr","iot","network","network-security","network-segmentation","pfsense","firewall","nat","2026-11-10 10:12:30",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":40,"author":41,"domain":26,"license":15,"version":42,"nist_csf":43,"subdomain":30,"description":48,"mitre_attack":49},[30,32,33,34,31],"mahipal","1.0",[44,45,46,47],"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",[50,51,52,53,54],"T1071.001","T1095","T1572","T1571","T1041","main","54a798831d2266a3ca61ce68a7acb80b81160d57","skills\u002Fconfiguring-pfsense-firewall-rules",4384,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills","https:\u002F\u002Fmahipal.engineer\u002FAnthropic-Cybersecurity-Skills\u002F","https:\u002F\u002Fgithub.com\u002Fmukul975","Mahipal.engineer","🔐 Cybersecurity | 💻 Dev | 📷 Street Photographer\r\n🎓 MSc | 📚 Research & AI Security","2026-08-31 12:32:44",{"source":8,"skillName":5,"commands":66,"prompt":76,"zipAvailable":77},[67,70,73],{"tool":68,"command":69},"npx","npx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill configuring-pfsense-firewall-rules",{"tool":71,"command":72},"bunx","bunx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill configuring-pfsense-firewall-rules",{"tool":74,"command":75},"pnpm","pnpm dlx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill configuring-pfsense-firewall-rules","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fconfiguring-pfsense-firewall-rules\u002FSKILL.md",true,[79,84,90],{"path":80,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fconfiguring-pfsense-firewall-rules\u002FLICENSE",{"path":85,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":88,"sourceHtmlUrl":89},"references\u002Fapi-reference.md","REFERENCE","参考文档",2427,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fconfiguring-pfsense-firewall-rules\u002Freferences\u002Fapi-reference.md",{"path":91,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":94,"sourceHtmlUrl":95},"scripts\u002Fagent.py","SCRIPT","脚本",8569,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fconfiguring-pfsense-firewall-rules\u002Fscripts\u002Fagent.py",[97,122,146,174,200,227],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":104,"publishedAt":35},"01M6AGDM3HJXTKXX15ZZ0ZVCJ3","verifying-build-provenance-with-slsa-sigstore","Verifies artifact signatures and SLSA provenance using Sigstore's cosign (verify, verify-attestation, verify-blob-attestation) and slsa-verifier (verify-artifact), enforcing keyless OIDC builder identity and source repo against SLSA Build levels. Use in CI\u002FCD before deploying artifacts, when consuming third-party attestations, establishing a SLSA Build L3 pipeline, or confirming provenance during incident response or admission control.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fverifying-build-provenance-with-slsa-sigstore\u002FSKILL.md",[103],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[105,106,107,108,25,26,109,110,27,111,112,113,114,115,116,117,118,119,120,121],"sigstore","provenance","slsa","verifying build provenance with slsa sigstore","incident response","identity","code","artifacts","ci","supply-chain","pipeline","supply-chain-security","t1195","attestation","code-signing","cosign","keyless",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":129,"publishedAt":35},"01M6AGDGBPWYVZ2F11GFKJ4HZ9","validating-tpm-measured-boot-attestation","Verifies TPM 2.0 measured-boot integrity and remote attestation with tpm2-tools -- reading PCRs (tpm2_pcrread), replaying the boot event log, generating and checking signed quotes (tpm2_quote\u002Ftpm2_checkquote), and sealing secrets to a PCR policy. Use to confirm a system booted trusted firmware\u002Fkernel for Zero Trust device posture, detect boot-chain tampering via PCR drift, or build a golden-value baseline for fleet attestation.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-tpm-measured-boot-attestation\u002FSKILL.md",[128],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[130,118,131,132,25,133,26,27,134,135,136,137,138,139,140,141,142,143,144,145],"boot","TPM","validating tpm measured boot attestation","policy","verification","ZeRO","firmware","Tools","measured-boot","PCR","integrity","secrets","remote-attestation","tpm2-tools","integrity-verification","trusted-computing",{"skillNo":147,"name":148,"nameZh":6,"description":149,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":150,"categories":151,"keywords":156,"publishedAt":35},"01M6AGDCW0Y4FXZ3362GT1941M","validating-backup-integrity-for-recovery","Validates backup integrity through cryptographic hash verification, automated restore testing, corruption detection, and recoverability checks to confirm backups are reliable for disaster recovery and ransomware response. Use before relying on backups for recovery, when building post-backup validation pipelines, auditing backup infrastructure for compliance, or checking immutable\u002Fair-gapped backups for silent corruption or tampering.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-backup-integrity-for-recovery\u002FSKILL.md",[152,155],{"categoryNo":153,"categoryName":154,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[140,157,158,159,160,26,161,162,134,163,164,165,166,167,168,169,170,171,172,173],"backup","recovery","validating backup integrity for recovery","testing","infrastructure","validation","compliance","hash-verification","incident-response","ransomware","cryptocurrency","detection","t1078","t1490","immutable","disaster-recovery","restore-testing",{"skillNo":175,"name":176,"nameZh":6,"description":177,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":178,"categories":179,"keywords":181,"publishedAt":35},"01M6AGD9GBG2KZ336AE763J3WH","triaging-windows-with-kape","Runs KAPE (Kroll Artifact Parser and Extractor) to collect targeted forensic artifacts (registry hives, $MFT, event logs, prefetch, browser data) via Targets and parse them with Modules wrapping Eric Zimmerman's EZ Tools (PECmd, MFTECmd, RECmd). Use during early incident containment\u002Ftriage when full disk imaging is impractical but a defensible, parseable Windows artifact set is needed quickly, including at-scale remote collection.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-windows-with-kape\u002FSKILL.md",[180],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[182,183,184,26,185,186,187,188,189,190,191,192,193,194,195,196,137,197,198,199],"windows","kape","triaging windows with kape","registry","browser","logs","windows-forensics","dfir","mft","mftecmd","data","prefetch","eric-zimmerman","digital-forensics","SET","collection","pecmd","artifact-collection",{"skillNo":201,"name":202,"nameZh":6,"description":203,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":204,"categories":205,"keywords":207,"publishedAt":35},"01M6AGD5PW5J4EVZM958WD74ZQ","triaging-vulnerabilities-with-ssvc-framework","Triages and prioritizes vulnerabilities with CISA's Stakeholder-Specific Vulnerability Categorization (SSVC) decision tree, weighing exploitation status (via the CISA KEV catalog and FIRST EPSS API), technical impact, automatability, and mission prevalence to output Track\u002FTrack*\u002FAttend\u002FAct decisions. Use when prioritizing vulnerability scan results (OpenVAS, Nessus, Qualys) for remediation planning beyond raw CVSS scores.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-vulnerabilities-with-ssvc-framework\u002FSKILL.md",[206],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[208,209,210,26,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226],"vulnerabilities","framework","triaging vulnerabilities with ssvc framework","status","planning","CISA","vulnerability-management","risk-management","nessus","qualys","openvas","cvss","remediation","risk","vulnerability","api","prioritization","ssvc","decision-tree",{"skillNo":228,"name":229,"nameZh":6,"description":230,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":231,"categories":232,"keywords":234,"publishedAt":35},"01M6AGD24TTQQM4CXG69E3B9TJ","triaging-security-incident","Performs initial triage of security incidents using the NIST SP 800-61r3 and SANS PICERL frameworks, classifying incident type, assigning priority by business impact, and routing to the appropriate response team. Use when a SIEM\u002FEDR alert needs human classification, concurrent alerts must be prioritized, or a user report or threat-intel IOC match requires initial incident categorization.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-security-incident\u002FSKILL.md",[233],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[25,235,26,236,237,238,239,240,241,242,243,169,244,170,245,246,247,248,249,250],"triaging security incident","siem","file","ioc","soc","NIST-800-61","NIST","severity","edr","execution","analysis","classification","severity-classification","incident-triage","SANS-PICERL","SOC-operations"]