RFC1918 Best Practices: Hardening WAN Egress Alias with APIPA/CGNAT on Static IP Connections?
-
Hello fellow Netgate community members,
I am currently hardening a pfSense that has a dedicated Static Public IP assigned directly to the WAN interface.
Following the official Netgate recipe for Preventing RFC 1918 Traffic from Exiting a WAN Interface, I created a dedicated RFC1918 network alias to apply to my outbound WAN block rules. (floating rule)

To make it as comprehensive as possible for catching local information leaks or misbehaving local DHCP configurations, I included the main subnets along with the standard APIPA Link-Local block:
- 10.0.0.0/8 (Class A Private)
- 172.16.0.0/12 (Class B Private)
- 192.168.0.0/16 (Class C Private)
- 169.254.0.0/16 (Link-Local / APIPA)
My Questions for the Community:
Given that I have a true static IP setup (completely bypassing Carrier-Grade NAT on my side), is there any security benefit to manually injecting the CGNAT range (100.64.0.0/10) directly into this specific alias, or should it be left out to keep the alias strictly clean?Is it preferred to handle CGNAT/APIPA entirely via the global "Block Bogon Networks" checkbox on the WAN interface settings page rather than nesting non-RFC1918 parameters inside a custom alias?
Would love to hear how other engineers structure this block for clean rule management. Thanks in advance for the advice!

Ref:
https://docs.netgate.com/pfsense/en/latest/recipes/rfc1918-egress.html -
@JonathanLee "Given that I have a true static IP setup (completely bypassing Carrier-Grade NAT on my side), is there any security benefit to manually injecting" any private LAN type address?
No. Other than if you don't want to see the attempts. The WAN is already default block all unless you build a rule to allow something.
I personally would like any such attempts on my WAN side to show up in the "firewall logs". I rarely to never see any unless someone has erroneously (or for ill intent) did/does something dumb.. (like the local fire department did one time a few years ago..
) -
FYI there's already a built-in alias for those networks. See Firewall > Aliases > All
-
@marcosm There is only onees I made in there.... must be something new right?
-
@JonathanLee said in RFC1918 Best Practices: Hardening WAN Egress Alias with APIPA/CGNAT on Static IP Connections?:
There is only onees I made in there.... must be something new right?
I think you gotta mention (in every thread) that you're on an ancient pfSense+ version with your 2100 ;).
The built-in alias' are a relatively new thing, yes. -
-
@JonathanLee I am not exactly sure when the new built in aliases started, but they do include apipa and cgnat ranges - along with a few others
_reserved4_ Network(s) IPv4 networks reserved for local use. 0.0.0.0/8, 10.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.0.0.0/24, 192.0.2.0/24, 192.88.99.0/24, 192.168.0.0/16, 198.18.0.0/15, 198.51.100.0/24, 203.0.113.0/24, 224.0.0.0/4, 240.0.0.0/4, 255.255.255.255/32 -
@JonathanLee said in RFC1918 Best Practices: Hardening WAN Egress Alias with APIPA/CGNAT on Static IP Connections?:
@patient0
<snip>
It basically works fine .... I mean just type go to alias right?
-
Pretty sure it was only somewhat recently with the
2.8.x/25.xxreleases. -
So I made a list based on this forum thanks everyone
IPv4 Special & Private Ranges
• 0.0.0.0 / 8 — Local System Broadcast Placeholder
Used by local devices as a source placeholder before they are assigned an IP address. It should never route traffic across the internet. (Safe to block since this firewall uses a Static WAN IP).
• 10.0.0.0 / 8 — Private Network (RFC 1918 Class A)
Reserved strictly for local, internal business and enterprise networks.
• 100.64.0.0 / 10 — Carrier-Grade NAT (CGNAT)
Used internally by Internet Service Providers (ISPs) to share public IP addresses among multiple subscribers. It should never cross into your local network from the public WAN.
• 127.0.0.0 / 8 — Localhost Loopback
Reserved for a device to talk to itself internally. Internet traffic claiming to originate from 127.x.x.x is 100% malicious IP spoofing.
• 169.254.0.0 / 16 — Link-Local / APIPA
Automatically assigned by devices to talk to immediate neighbors on a local switch if a DHCP server cannot be found. Unroutable over the internet.
• 172.16.0.0 / 12 — Private Network (RFC 1918 Class B)
Reserved for internal local area networks.
• 192.0.0.0 / 24 — IETF Protocol Assignments
Reserved strictly for core cryptographic and ds-lite protocol operations by the IETF.
• 192.0.2.0 / 24 — Documentation (Test-Net-1)
Reserved exclusively for textbooks, manuals, and configuration examples. No live internet infrastructure uses this space.
• 192.88.99.0 / 24 — Legacy 6to4 Anycast Relay
An old, deprecated IPv6-to-IPv4 translation mechanism. It is heavily abused by attackers today for DDoS amplification traffic.
• 192.168.0.0 / 16 — Private Network (RFC 1918 Class C)
The standard private IP block used by almost all home routers and small office networks worldwide.
• 198.18.0.0 / 15 — Benchmark Testing
Reserved under RFC 2544 for testing lab equipment performance and network device throughput.
• 198.51.100.0 / 24 — Documentation (Test-Net-2)
Reserved exclusively for technical documentation and educational examples.
• 203.0.113.0 / 24 — Documentation (Test-Net-3)
Reserved exclusively for technical documentation and educational examples.
• 224.0.0.0 / 4 — IP Multicast (Class D)
Reserved for local multicast streaming protocols and router discovery. Public internet traffic should never unicast from this block.
• 240.0.0.0 / 4 — Reserved Space (Class E)
Reserved for future use and experimental research. No legitimate public traffic routes out of this space.
• 255.255.255.255 / 32 — Limited Local Broadcast
Used for local subnet data broadcasting. It cannot pass through an internet router.🪐 IPv6 Special & Private Ranges
• ::1 / 128 — IPv6 Loopback Address
The IPv6 equivalent of 127.0.0.1. Used for internal host diagnostics.
• :: / 128 — Unspecified Address
A placeholder network header used before an interface has been assigned an IPv6 address.
• ::ffff:0:0 / 96 — IPv4-Mapped IPv6 Addresses
Used internally inside applications to format standard IPv4 addresses into an IPv6 structure for backward compatibility.
• 100:: / 64 — Discard-Only Prefix
Reserved strictly for dropping traffic during blackhole routing or configuration testing.
• 2001:db8:: / 32 — IPv6 Documentation Prefix
The IPv6 equivalent of the test networks. Used only in textbook examples and manuals.
• 3fff:: / 20 — Additional Documentation Prefix
A newer block reserved to provide additional documentation space for examples.
• fec0:: / 10 — Deprecated Site-Local Unicast
An old, obsolete private space implementation. Modern systems have replaced this entirely, making it safe to drop.Crucial Configuration Note for Hurricane Electric (HE) Tunnel Users
If you run a Hurricane Electric IPv6 Tunnel Broker, keep in mind:- Do not add fe80::/10 (Link-Local) to a global block list, as your tunnel endpoint requires Link-Local space to handle neighbor routing.
-
@johnpoz why did you add 192.18.0.0/15 isnt that oracle's address space?
-
@JonathanLee I didn't add that - that is the built in alias reserved4
Per the list you posted, that is reserved for benchmarking.
• 198.18.0.0 / 15 — Benchmark Testing
Reserved under RFC 2544 for testing lab equipment performance and network device throughput.I assume your 192 was a typo, since 198.18/15 is what is in the alias.
-
@JonathanLee said
It basically works fine .... I mean just type go to alias right?
I tried the code below but it's crashing on my router. I think I have a core i7 with 32GB, pic of my setup is below @JonathanLee any idea what could be wrong??
10 INPUT "What alias do you want to update? "; ALIAS$ 20 PRINT "Updating "; ALIAS$ 30 LET ALIAS = RFC1918 40 IF ALIAS <> RFC1918 THEN GOTO 30 50 PRINT "Alias updated!" 60 END
-
Just for reference...
https://www.rfc-editor.org/info/rfc6890/
https://www.openbsd.org/faq/pf/example1.html
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginPrivacy Policy · Cookie Policy
