OPNsense port forwarding

ISP device

Add rule => Name: http; Protocol: TCP; Internal port: 80:80; External port: 80:80; Local IP: [ opnsense_wan_ip ] => Create => Save

OPNsense

Port forward

  • Firewall => NAT => Port Forward => Add
    • Interface: WAN
    • TCP/IP version: IPv4
    • Protocol: TCP
    • Source => Advanced
      • Source port range: HTTP
    • Destination: WAN address
    • Destination port range: HTTP
    • Redirect target IP: Single host or Network - [ internal_web_host_ip ]
    • Redirect target port: HTTP
    • Description: Redirect port 80 to internal web server
    • NAT reflection: Use system default
    • Filter rule association: Add associated filter rule
  • Save => Apply changes

WAN pass rule

  • Firewall => Rules => WAN => Add
    • Action: Pass
    • Interface: WAN
    • Direction: in
    • TCP/IP version: IPv4
    • Protocol: TCP
    • Source: any (or specify a single IP if testing)
    • Source => Advanced
      • Source port range: HTTP
    • Destination: WAN address or This firewall
    • Destination port range: HTTP
    • Description: Redirect port 80 to internal web server pass rule
    • Gateway: default
  • Save => Apply changes