Port Forwarding in pfSense

2 Mins read

Port forwarding is used to allow external access to specific services running inside a private network. Since most home and lab networks use NAT (Network Address Translation), external devices cannot directly communicate with internal services unless port forwarding is configured.

Where is this port forward should go. It should point to the reverse proxy server Traefik

Port Fowarding

Navigate to Firewall -> NAT -> Port Forward

Port HTTP(80)

Fill in the following details:

  • Interface: WAN
  • Protocol: TCP/UDP # Depends on the service, e.g., HTTP = TCP, DNS = UDP
  • Destination: WAN Address
  • Destination Port: HTTP # Example for a web server
  • Redirect Target IP: traeficproxyip
  • Redirect Target Port: HTTP
  • Description: “Web Server Port Forward”
  • Filter rule association select Add associated filter rule

The last line will create associated firewall rules in the WAN. Navigate to Firewall -> Rules -> WAN to see the new rule created.

Port forward HTTPS(443)

Add one more rule to port foward the port 443.

  • Interface: WAN
  • Protocol: TCP/UDP # Depends on the service, e.g., HTTP = TCP, DNS = UDP
  • Destination: WAN Address
  • Destination Port: HTTPS
  • Redirect Target IP: traeficproxyip
  • Redirect Target Port: HTTPS
  • Description: “Secure Web Server Port Forward”
  • Filter rule association select Add associated filter rule

Save and apply changes