To access a local server from the Internet, you can use NAT port forwarding to be able to access certain ports (such as port 80 for a web server via HTTP, port 21 for a file server via FTP, ...).
But you can also completely expose a local server to the Internet by mapping an external IP address (WAN) to a local IP address (LAN).
This is called 1:1 NAT on pfSense.
As you can see, the WAN IP address of pfSense in our case is: 192.168.1.10.
It is therefore at this address that we can access our local server from a computer connected to the WAN network (or to the Internet if applicable).
Our local web server has the IP address "10.10.0.10" which is part of the distributed IP address range on our DMZ network.
But, the operation is the same if your server is on the pfSense LAN network.
To create a "1:1 NAT" rule on pfSense, go to: Firewall -> NAT.
Next, go to the "1:1" tab and click "Add".
On the "Edit NAT 1:1 Entry" page that appears, you can configure these settings:
To expose your local web server to the Internet, configure these settings:
Then, click Save.
Click "Apply Changes" to apply the changes.
The "1:1 NAT" rule has been applied.
First of all, if you have defined a private IP address (eg: 192.168.1.x, 10.0.0.x, ...) on the pfSense WAN interface, it is important to disable the "Block private" setting networks and loopback addresses" in the configuration of its WAN interface.
To do this, go to "Interfaces -> WAN" and go to the bottom of the page.
Once this setting is disabled, click "Save", then "Apply Changes" (at the top of the page).
If you try to access your web server from the pfSense WAN IP address, you will see that it does not work.
This is because network traffic is blocked by default by pfSense on the WAN interface.
To understand it, go to "Firewall -> Rules".
As you can see, by default, on the pfSense WAN interface, there are no rules allowing network traffic.
Which means all incoming connections are blocked.
To see the history of packets blocked by the firewall, click on the 2nd red icon at the top right.
On the "Status / System Logs / Firewall / Normal View" page that appears, sort the list by date/time by clicking on the "Time" column.
As you can see, in our case, access from our PC "192.168.1.34" (WAN network PC) to our local server "10.10.0.10" on port 80 (HTTP) was blocked on the interface WAN by the rule "Default deny rule IPv4 (1000000103)". This rule is not visible under pfSense, but pfSense makes it clear to you with the warning visible above (on a yellow background).
Note: when you forward a port via port forwarding, an appropriate rule is automatically created in the firewall to allow the corresponding network traffic.
But this is not the case when using "1:1 NAT", as this would mean that all open ports on your local server would be accessible without restriction from the Internet (the WAN).
As explained previously, in the case of "1:1 NAT", no rules are created in the firewall to allow network traffic to the desired local server.
You must therefore create your rules yourself in the pfSense firewall.
To do this, go to "Firewall -> Rules -> WAN" and click on: Add.
In our case, we want to be able to access our local web server using HTTP.
To do this, configure these settings:
Then, click "Save".
The configured rule appears.
Click "Apply Changes" to apply it.
The new rule has been applied to your firewall.
Now, try to access your web server from the Internet (or from a computer connected to the pfSense WAN network) by typing the pfSense WAN IP address.
As expected, the IIS page (in our case appears) given that our web server is installed on Windows Server.
Firewall 6/6/2025
Firewall 5/9/2025
Firewall 5/30/2025
Firewall 6/13/2025
Pinned content
Contact
® InformatiWeb-Pro.net - InformatiWeb.net 2008-2022 - © Lionel Eppe - All rights reserved.
Total or partial reproduction of this site is prohibited and constitutes an infringement punishable by articles L.335-2 and following of the intellectual property Code.
You must be logged in to post a comment