Users hosting websites on pfSense often fail to obtain a public IP because their ISP assigns private addresses via CGNAT, the WAN interface is misconfigured with static settings instead of DHCP or PPPoE, or firewall rules block inbound HTTP traffic. Verifying the actual WAN IP against an external service and checking ISP documentation for CGNAT status are the first critical steps to resolve this networking bottleneck.
Verifying Your Actual Public IP Address
The most common reason for failure in website hosting scenarios is a misunderstanding of what constitutes a "public" IP address. Many modern Internet Service Providers (ISPs) utilize Carrier-Grade NAT (CGNAT), which assigns you a private RFC 1918 address on your WAN interface rather than a routable public IPv4 address. If your pfSense WAN interface displays an IP starting with 100.64.x.x, 10.x.x.x, 172.16.x.x, or 192.168.x.x, you do not have a true public IP. To confirm whether you possess a public IP, do not rely solely on the information displayed within the pfSense dashboard. Instead, open a web browser on a machine connected to your LAN and visit a service likewhatismyipaddress.com. Compare the IP address shown on that website with the IP address configured on your pfSense WAN interface. If they match, you have a public IP. If the website shows a different address, your ISP is likely using CGNAT. In such cases, no amount of port forwarding or pfSense configuration will expose your server to the internet directly. You must contact your ISP to request a dedicated public IP address, which may involve a monthly fee or a change in service tier. This issue is distinct from general subnetting preferences, as discussed in our guide on Why do we prefer subnet 192.168.1.0/24 to get more networks?, which focuses on internal network design rather than WAN connectivity.
Configuring the WAN Interface Correctly
If you have confirmed that your ISP provides a public IP, the next step is to ensure pfSense is obtaining it correctly. Navigate to Diagnostics > Routes or check the Status > Interfaces page. Look at the WAN interface details. For most residential connections, the WAN should be set to acquire an IP via DHCP. If your connection requires authentication, such as DSL, it may need to be configured as PPPoE. Incorrect configuration here is a frequent cause of failure. Ensure that the "Use Gateway" setting is enabled for the WAN interface. If you are using a static IP provided by your ISP, verify that the Subnet Mask, Default Gateway, and DNS servers are entered exactly as specified in your ISP's documentation. A mismatched subnet mask can prevent the router from recognizing the gateway, leading to a loss of connectivity. Additionally, check the MTU settings. Standard Ethernet MTU is 1500, but some ISPs require lower values, such as 1492 for PPPoE or 1480 for certain fiber connections. An incorrect MTU can cause packet fragmentation that breaks DNS resolution or web hosting services.Setting Up Port Forwarding Rules
Once you have a valid public IP and correct WAN configuration, you must allow inbound traffic to reach your web server. This is achieved through port forwarding. Go to Firewall > NAT > Port Forward and click Add. Create a rule with the following parameters:- Interface: Select WAN.
- Protocol: TCP.
- Destination: Set to WAN address.
- Destination Port: Enter
80for HTTP or443for HTTPS. - Redirect Target IP: Enter the local IP address of your web server (e.g.,
192.168.1.50). - Redirect Target Port: Enter
80or443.
Testing External Connectivity
Do not test your website setup from inside your local network. Due to a phenomenon known as NAT Hairpinning or NAT Loopback, internal clients might behave unpredictably when accessing their own public IP. Instead, use a device outside your network, such as a smartphone using cellular data (with Wi-Fi turned off), to access your domain or public IP. Use tools liketelnet your_public_ip 80 from an external command line to verify that the port is open and responding. If the connection times out, check your ISP for blocking of port 80, which is common for residential plans to prevent amateur server hosting. Some ISPs only allow port 80 on business-grade lines. If you encounter DNS issues during testing, remember that Understanding Router DNS Caching: Shared Among Users on a LAN affects how quickly your domain propagates, but it does not affect the underlying TCP connectivity required for hosting.