Skip to content

Next-Gen Firewall (NGFW) Perimeter Deployment & Hardening Baseline

SOP-NET-002 Standard Operating Procedure v1.0.0
Last Updated 2026-10-14
Author Systems Administration Team
💻 Target OS / Systems:
Fortinet FortiGate (FortiOS)pfSense / OPNsenseCisco Secure Firewall / ASA

Before you begin

  • Applies to:Approved perimeter next-generation firewall deployment or hardening.
  • Where to start:Start in the firewall management console during an approved change window. Keep independent recovery access.
  • What you need:Have the approved network design, required traffic flows, administrative access, and a configuration backup.
Guide tools
Guide tools
0/0 Steps (0%)

Scope, Threat Model & Zero-Trust Perimeter Rules

The perimeter firewall is the primary defensive barrier separating enterprise internal assets from public untrusted networks. Misconfigurations—such as exposing management ports to the internet or permissive outbound rules—lead to ransomware infiltration, command-and-control (C2) callback beacons, and data exfiltration.

Universal Hardening Principles:

  1. Management Plane Isolation: WebGUI (HTTPS), SSH, and SNMP are strictly forbidden on WAN interfaces. Management is accessible exclusively through out-of-band (OOB) VLAN 10 or dedicated IPsec/WireGuard VPNs.
  2. Default-Deny Ingress & Egress: All inbound and outbound traffic is blocked by default. Outbound internet access requires explicit port/service white-listing.
  3. Anti-Spoofing (RFC 2827 / BCP 38): Inbound traffic on WAN interfaces claiming to originate from private RFC 1918 subnets (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) or loopback ranges is dropped immediately.
  4. Automated Threat Intelligence: Botnet C2 blocklists, Tor exit node lists, and high-risk Geo-IP regions are automatically dropped at the network edge.
Next-Gen Firewall Zero-Trust Perimeter Defense Architecture Diagram

Perimeter NGFW Zero-Trust Architecture: Public internet traffic filtered via anti-spoofing and threat intelligence edge filters, passing through deep packet inspection (IPS/AV/UTM) before reaching segregated DMZ and internal corporate LAN zones, with management restricted to an out-of-band network.


Implementation Path A: Fortinet FortiGate (FortiOS)

Run on the perimeter FortiGate via CLI:

01

Secure Management Plane, Local-In Policy & UTM Profiles

FortiOS CLI

Restrict WAN interface access to ping only, enforce local-in drop rules to protect the firewall control plane, and deploy explicit outbound egress policies with UTM inspection.

# 1. Secure Management Plane & WAN Interface
config system interface
edit "wan1"
set description "PRIMARY-INTERNET-UPLINK"
# Strictly forbid management protocols on WAN
set allowaccess ping
set inbandwidth 0
set outbandwidth 0
next
edit "vlan10-mgmt"
set description "ISOLATED-OOB-MANAGEMENT"
set allowaccess https ssh ping
next
end
# 2. Enforce Strict Local-In Policies (Protect Firewall OS)
config firewall local-in-policy
edit 1
set intf "wan1"
set srcaddr "all"
set dstaddr "all"
set action drop
set service "ALL"
set schedule "always"
next
end
# 3. Enable Botnet & C2 Threat Feed Blocking on Outbound Egress
config system fortiguard
set auto-join-forticloud enable
set load-balance-servers 2
end
config firewall policy
edit 10
set name "DEFAULT-EGRESS-USERS"
set srcintf "vlan30-users"
set dstintf "wan1"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
# Explicit Allowed Services (Web, DNS, NTP only)
set service "HTTP" "HTTPS" "DNS" "NTP"
set utm-status enable
set ssl-ssh-profile "certificate-inspection"
set av-profile "default"
set ips-sensor "default"
set application-list "default"
set block-notification enable
set logtraffic all
set nat enable
next
end

Implementation Path B: pfSense / OPNsense Firewall

02

Configure Anti-Spoofing & Default-Deny Egress

pfSense WebGUI

Enable Bogon and RFC 1918 blocking on the WAN interface, relocate the WebGUI daemon away from default ports, and replace default-allow rules with least-privilege egress filtering.

1. WAN Interface Anti-Spoofing & Bogon Blocking:
- Navigate to: Interfaces -> WAN
- Check [x] "Block private networks" (Blocks incoming RFC 1918 subnets)
- Check [x] "Block bogon networks" (Blocks unallocated IP ranges)
- Save and Apply Changes.
2. Management Access Hardening:
- In System -> Advanced -> Admin Access:
- Set TCP Port to custom port (e.g. 8443)
- Enable WebGUI redirect: Disabled (stops HTTP port 80 listener)
- Set Login Protection: Max 3 failed attempts in 300 seconds.
3. Least-Privilege Outbound Egress Baseline (Firewall -> Rules -> LAN / Users):
- Rule 1: Allow DNS (UDP/TCP 53) to Internal Domain Controllers (10.10.10.10, 10.10.10.11) only.
- Rule 2: Allow Web (TCP 80, 443) to any.
- Rule 3: Allow NTP (UDP 123) to approved corporate time servers.
- Rule 4: Catch-all Block all IPv4+IPv6 with logging enabled.

Implementation Path C: Cisco Secure Firewall / ASA

03

Enforce uRPF, Ingress Filtering & Management Lockdown

Cisco ASA CLI

Configure Unicast Reverse Path Forwarding (uRPF) to stop IP address spoofing, deny RFC 1918 ingress on the outside interface, and restrict administrative access strictly to the inside management subnet.

configure terminal
# 1. Enforce Unicast RPF on WAN interface
ip verify reverse-path interface outside
# 2. Block RFC 1918 addresses on Outside Interface
access-list OUTSIDE-IN-ACL extended deny ip 10.0.0.0 255.0.0.0 any
access-list OUTSIDE-IN-ACL extended deny ip 172.16.0.0 255.240.0.0 any
access-list OUTSIDE-IN-ACL extended deny ip 192.168.0.0 255.255.0.0 any
access-list OUTSIDE-IN-ACL extended deny ip 127.0.0.0 255.0.0.0 any
access-group OUTSIDE-IN-ACL in interface outside
# 3. Management Access Lockdown
http 10.10.10.0 255.255.255.0 inside
ssh 10.10.10.0 255.255.255.0 inside
no http 0.0.0.0 0.0.0.0 outside
no ssh 0.0.0.0 0.0.0.0 outside
write memory

Operational Verification & External Penetration Audit

04

Execute External Nmap Stealth Scan

Audit

Verify that all management ports and unused services report filtered or closed when scanned from an external, untrusted network.

Terminal window
# Run external TCP SYN stealth scan against firewall WAN IP:
nmap -sS -Pn -p 1-1024,8080,8443 <WAN_PUBLIC_IP>
# Expected Result:
# All scanned ports report 'filtered' or 'closed'.
# No management services (SSH, HTTPS, Telnet, SNMP) report 'open'.

Rollback & Emergency Console Recovery

If an erroneous firewall rule blocks internal administrative access:

  1. Physical Out-of-Band (OOB) Access: Connect directly via physical RS-232 serial console cable to the firewall CONSOLE port at 9600-8-N-1 (or 115200).
  2. Emergency Access Re-enabling:
    • On FortiOS:
      config system interface
      edit "internal"
      set allowaccess https ssh
      end
    • On pfSense: From the physical console menu, choose Option 2 (Set interface IP address) or Option 8 (Shell) and restore the previous configuration:
      Terminal window
      cp /cf/conf/backup/config-xxx.xml /cf/conf/config.xml && rm /tmp/config.cache && reboot

Comments