Home/pfSense First-Install Hardening
Free Guide

pfSense Day-1 Hardening — 10 steps every admin must do

The defaults are permissive on purpose — so installation works out of the box. Harden these ten settings within the first hour and you'll shut down 90% of common attack paths before your first production rule is written.

1 Critical  ·  do this first

Change the default admin password

Fresh pfSense installs ship with a well-known default password (pfsense). Until you change it, anyone who can reach the WebGUI (LAN or accidentally-exposed WAN) has full root-equivalent access to your firewall.

System › User Manager › Edit admin
Risk if skipped

Automated bots scan for pfSense default credentials within minutes of any IP exposure. A compromised firewall is game over — attacker controls all traffic, can tunnel inbound, disable logging.

  • Use 16+ characters with mixed case, numbers and symbols
  • Store in a password manager (1Password, Bitwarden) — never in a browser
  • Rotate every 90 days if shared across an admin team
pfSense System ▾ pfsense.khoji.local admin
SystemUser ManagerEdit User
System / User Manager / Edit User "admin"
Edit User
Password Change Required. This account is still using the factory default password. Please change it immediately.
Confirm: ••••••••••••••••••••
System › User Manager › Edit admin — set a strong password
2 High priority

Force HTTPS on a non-default port

The default installer uses plain HTTP on port 80 — credentials fly across the wire in clear text. Switch to HTTPS and move the admin interface off well-known ports to stop casual port scans.

System › Advanced › Admin Access
Why it matters

Anyone on the LAN segment can sniff plain HTTP with Wireshark. Port 443 is probed by every bot on the internet within seconds of IP exposure — shifting to a custom port (e.g. 8443) stops 99% of drive-by scans.

  • Select HTTPS protocol
  • Set TCP port to a non-default (e.g. 8443 or 52301)
  • Generate a fresh WebGUI certificate (Cert Manager) — don't reuse factory
  • Enable HSTS to prevent downgrade attacks
pfSensepfsense.khoji.localadmin
SystemAdvancedAdmin Access
System / Advanced / Admin Access
Web Configurator
  
Leave blank for default. Changing this will kick you out — reconnect on the new port.
System › Advanced › Admin Access — force HTTPS, custom port, HSTS
3 Network policy

Restrict WebGUI to admin networks

By default the WebGUI answers on all LAN interfaces. Create an explicit firewall rule that only allows admin-source subnets (office LAN, admin VLAN, VPN pool) to reach the management port.

Firewall › Rules › LAN
Why it matters

A compromised guest-WiFi device, rogue IoT sensor or infected printer should never be able to talk to the firewall's admin interface — even if they know the password.

  • Create an alias ADMIN_NETS = your admin LAN + VPN pool
  • Allow rule: ADMIN_NETS → This Firewall : TCP/8443
  • Block rule (directly below): any → This Firewall : TCP/8443
  • Place both rules at the top of the LAN ruleset
pfSensepfsense.khoji.localadmin
FirewallRulesLAN
Firewall / Rules / LAN
Rules (Drag to change order)
#ProtoSourceDestPortActionDescription
1TCPADMIN_NETSThis Firewall8443✓ PassAdmin WebGUI from admin nets
2TCPanyThis Firewall8443✕ BlockBlock WebGUI from everywhere else
3TCPADMIN_NETSThis Firewall22✓ PassSSH from admin nets
4TCPanyThis Firewall22✕ BlockBlock SSH from everywhere else
5*LAN netany*✓ PassDefault allow LAN to any
Rule order matters. Firewall rules are evaluated top-to-bottom; first match wins. Place allow rules for admins above the broad block.
Firewall › Rules › LAN — whitelist admin nets before blocking everyone
4 Safety net

Keep the anti-lockout rule (and tighten it)

pfSense creates an automatic anti-lockout rule so a bad custom rule can never block you out of the WebGUI. Keep it — but scope it to a dedicated lockout subnet so it can't be abused.

System › Advanced › Admin Access ▸ Anti-lockout
Why it matters

The default anti-lockout rule allows the entire LAN to access WebGUI/SSH — which contradicts Step 3. Either create a dedicated admin VLAN, or disable anti-lockout after Step 3 is verified working.

  • Create a dedicated MGMT VLAN (e.g. VLAN 99)
  • Move anti-lockout to apply only on the MGMT VLAN
  • Keep a physical OOB console port connected (serial / IPMI)
  • Only disable anti-lockout once Step 3 rules are verified from at least 2 admin sources
pfSensepfsense.khoji.localadmin
SystemAdvancedAdmin Access
System / Advanced / Admin Access
Anti-lockout
Only disable after verifying admin rules (Step 3) from at least two source IPs.
Warning: Disabling anti-lockout without valid admin rules will lock you out of the firewall. You'll need console or IPMI to recover.
System › Advanced › Admin Access — disable anti-lockout only after Step 3
5 Foundation

Set correct time zone and NTP

Every log line, every certificate, every VPN handshake depends on accurate time. Set your time zone to Asia/Kolkata and pull from trusted NTP pools.

System › General Setup & Services › NTP
Why it matters

Wrong time = expired certificate errors, OTP 2FA fails, Let's Encrypt renewals fail, forensic logs become useless for incident response.

  • Time zone: Asia/Kolkata (IST)
  • Primary NTP: time.nist.gov
  • Secondary: in.pool.ntp.org
  • Enable NTP server on LAN so internal devices sync from pfSense
pfSensepfsense.khoji.localadmin
SystemGeneral Setup
System / General Setup
Localisation
Space-separated list — up to 5 servers.
Clock is now in sync — system time: 19-Apr-2026 18:04:22 IST · offset from NIST: +0.0024s
System › General Setup — IST timezone, 3 NTP sources
6 Privacy + integrity

Enable DNS-over-TLS resolver

Don't let your ISP log or hijack your DNS lookups. pfSense's built-in Unbound resolver supports DNS-over-TLS to public resolvers like Cloudflare 1.1.1.1 and Quad9.

Services › DNS Resolver (Unbound)
Why it matters

ISPs in India routinely log DNS queries. Unencrypted DNS allows anyone on path to see every site your users visit, and can be man-in-the-middle'd to redirect users to phishing sites.

  • Enable DNS-over-TLS forwarding in Unbound
  • Forwarders: 1.1.1.1@853, 9.9.9.9@853
  • Enable DNSSEC validation
  • Block DNS-over-HTTPS to force clients through Unbound
pfSensepfsense.khoji.localadmin
ServicesDNS Resolver
Services / DNS Resolver / General Settings
Unbound Resolver
 
Services › DNS Resolver — encrypted queries via Cloudflare + Quad9
7 CLI access

SSH with public-key auth only

SSH is off by default — if you enable it for troubleshooting, never allow password login. Use ed25519 keys from each admin workstation.

System › Advanced › Admin Access ▸ Secure Shell
Why it matters

SSH with password auth is the #1 brute-force target on the internet. Key-only SSH is mathematically unguessable — attackers give up within seconds.

  • Enable SSH (only if you need it)
  • Set SSH Key Only authentication
  • Paste ed25519 public keys into System › User Manager › admin ▸ Keys
  • Keep SSH on a non-default port (e.g. 52022)
pfSensepfsense.khoji.localadmin
SystemAdvancedAdmin Access
System / Advanced / Admin Access
Secure Shell (SSH)
⚠ Configure authorised keys under System › User Manager › (user) ▸ Keys before enabling key-only auth, or you'll lock yourself out of SSH.
System › Advanced › Admin Access — SSH key-only, custom port
8 Second factor

Two-factor authentication (TOTP)

Even if your admin password leaks, 2FA stops the attacker. pfSense Plus supports TOTP (Google Authenticator, Authy, 1Password) natively.

System › User Manager › Edit user ▸ OTP seed
Why it matters

Password reuse from breached SaaS sites is the #1 credential-stuffing vector. 2FA neutralises it — attacker with your password still needs a rolling code from your phone.

  • Generate a TOTP seed per admin user
  • Scan the QR code with an authenticator app
  • Log in: password + rolling 6-digit code
  • Save recovery codes in your password manager vault
pfSensepfsense.khoji.localadmin
SystemUser ManagerEdit User
System / User Manager / Edit User "admin" / OTP
One-Time Password (TOTP)
Base32-encoded. Keep secret.
ℹ Scan the QR with Google Authenticator, Authy or 1Password. Test the code before clicking Save — if Save is hit with a wrong seed you'll need console access to recover.
System › User Manager › admin ▸ OTP — scan QR to phone
9 Active defence

Install and enable Suricata IDS/IPS

Suricata is pfSense's inline intrusion-detection and prevention engine. Install from the package manager, assign it to WAN, enable blocking mode, and pick the Emerging Threats Open ruleset.

System › Package Manager → Services › Suricata
Why it matters

Firewall rules stop traffic at the packet-header level (IP + port). Suricata inspects content — it catches CVE exploits, malware C2 beacons, reconnaissance scans that pass ordinary firewall rules.

  • Install Suricata package
  • Enable on WAN interface with blocking mode
  • Enable ET Open + Snort VRT rulesets
  • Auto-update rules daily at 03:00
  • Whitelist known-good servers (CDN, partners) to avoid false-positive blocks
pfSensepfsense.khoji.localadmin
ServicesSuricataWAN
Services / Suricata / Interface: WAN / Categories
Rule Categories
CategoryRulesLast Updated
ET Open / botcc.rules6,24119-Apr 03:00 IST
ET Open / emerging-exploit.rules4,18819-Apr 03:00 IST
ET Open / emerging-trojan.rules18,90419-Apr 03:00 IST
ET Open / emerging-malware.rules22,77119-Apr 03:00 IST
ET Open / emerging-scan.rules1,40219-Apr 03:00 IST
Snort VRT / browser-chrome.rules388
✓ Total enabled: 53,506 rules · Block mode: active · Alerts (24h): 1,284 · Blocks (24h): 1,284
 
Services › Suricata › WAN › Categories — enable ET Open
10 Disaster recovery

Automatic configuration backups (ACB)

pfSense Plus includes AutoConfigBackup — every config change is encrypted and uploaded to Netgate's cloud. Restore to a new appliance in minutes if hardware fails.

Services › AutoConfigBackup
Why it matters

Hardware fails. Lightning strikes. New admins push a bad rule. ACB gives you 60 days of snapshots — restore a working config in under 3 minutes without losing sleep.

  • Enable ACB with your Netgate portal credentials
  • Set encryption passphrase (store in password manager!)
  • Verify: each config change triggers an upload
  • Also export encrypted local backups weekly to off-site storage
pfSensepfsense.khoji.localadmin
ServicesAutoConfigBackup
Services / AutoConfigBackup / Settings
AutoConfigBackup
Last backup: 19-Apr-2026 18:04:23 IST · Status: uploaded · Size: 28.4 KB · Encryption: AES-256
DateDescriptionUserSize
19-Apr 18:04Suricata ruleset enabledadmin28.4 KB
19-Apr 17:32SSH key-only authadmin27.9 KB
19-Apr 17:10Admin rules addedadmin27.1 KB
Services › AutoConfigBackup — every change encrypted & uploaded
Want us to do this for you?

Professionally hardened pfSense, done right

We do all 10 of these hardening steps (plus 40 more) during every Khoji installation. Handover includes full documentation, backup passphrase, and admin training.