Forwarding Ports on a pfSense Firewall for Website Access

Posted on 15 March 2023

In this guide, we will embark on the process of forwarding ports on a pfSense firewall for a website, with a focus on port 80 (HTTP) and HTTPS port (443) on pfSense. This will ensure that your local server is accessible from the external world.

Before we dive into the process, it is essential to ensure that your pfSense firewall is up and running, and your local server is appropriately configured. If you require assistance with the pfSense setup or the configuration of your local server, refer to the official documentation for guidance.

Creating an Alias for your Local Server

To commence, access the pfSense web interface by logging in with the admin account. The default IP address is generally http://192.168.1.1, but it may vary depending on your network configuration.

Now, we shall create an alias for your local server. Start by navigating to “Firewall” in the top menu and click on “Aliases”. Select the “Add” button to create a new alias. Provide a descriptive name (e.g., LocalWebServer) and a brief description. In the “Type” dropdown, select “Host(s)”. Enter the local IP address of your server in the “Host(s)” field. Save the changes and apply them.

Port Forwarding Configuration for HTTP (Port 80) and HTTPS (Port 443)

We will proceed with the port forwarding configuration for HTTP (port 80) and HTTPS (port 443). Navigate to “Firewall” in the top menu, click on “NAT”, and select the “Port Forward” tab. Click the “Add” button to create a new port forwarding rule.

For HTTP (Port 80):

  1. In the “Interface” dropdown, select “WAN”.
  2. Set the “Protocol” to “TCP”.
  3. In the “Destination” section, choose “WAN Address” from the dropdown.
  4. In the “Destination Port Range”, select “HTTP” from the dropdown (which corresponds to port 80).
  5. In the “Redirect Target IP” field, select the alias you created earlier (e.g., LocalWebServer).
  6. In the “Redirect Target Port” dropdown, select “HTTP”.
  7. Provide a brief description (e.g., “Forward HTTP to Local Server”).
  8. Ensure the “Filter Rule Association” is set to “Add associated filter rule”.
  9. Save the changes.

For HTTPS (Port 443):

Repeat steps 3 to 8 but make the following changes:

  1. In the “Destination Port Range”, select “HTTPS” from the dropdown (which corresponds to port 443).
  2. In the “Redirect Target Port” dropdown, select “HTTPS”.
  3. Provide a brief description (e.g., “Forward HTTPS to Local Server”).

After configuring both rules, implement the new settings by clicking the “Apply Changes” button.

By following this guide, you have successfully set up port forwarding for your website on pfSense, and your local server should now be accessible via HTTP (port 80) and HTTPS (port 443) from the outside world. Remember

After configuring both rules, implement the new settings by clicking the “Apply Changes” button.

By following this guide, you have successfully set up port forwarding for your website on pfSense, and your local server should now be accessible via HTTP (port 80) and HTTPS (port 443) from the outside world. Remember to test your configuration to ensure everything is working as expected.

Additional tips to ensure successful port forwarding:

  • Make sure your ISP is not blocking incoming traffic on port 80 and 443. Some ISPs block these ports to prevent their customers from hosting websites from home.
  • Ensure that your pfSense firewall is set up to allow incoming traffic on port 80 and 443. You can do this by creating a firewall rule that allows incoming traffic on these ports.
  • Double-check your local server’s firewall settings to ensure that it is not blocking incoming traffic on port 80 and 443. Some servers come with a pre-installed firewall that may need to be configured to allow incoming traffic on these ports.

By following these tips, you can ensure that your website is accessible from the outside world through the port forwarding configuration on your pfSense firewall.

Finally, it is essential to maintain the security of your website by regularly updating your pfSense firewall and local server software to patch any security vulnerabilities. Additionally, ensure that you have implemented proper security measures such as using strong passwords, enabling HTTPS encryption, and limiting access to critical parts of your website.

With proper configuration and security measures, you can successfully forward ports on your pfSense firewall to make your website accessible to the outside world while maintaining the security of your network and data.

Share this post with your friends, followers and connections!


Subscribe to our mailing list

* indicates required

View previous campaigns.