OPNsense port forwarting (not working)

How to add a forwartingrule:

Firewall settings

Firewall -> Settings -> Advanced:

- Reflection for port forwards: Enabled
- Reflection for 1:1: Disabled
- Automatic outbound NAT for Reflection: Enabled

then save and go to Firewall -> NAT -> Port Forward -> Add

I use the example from the source here. recap:
– You have a host with IP 192.168.1.200, with port 3100 open TCP.
– You want to port forward from the outside 9999 to 3100.

- Interface: WAN
- TCP/IP Version: IPv4
- Protocol: TCP

Under Source > Advanced:

- Source / Invert: Unchecked
- Source: Any
- Source Port Range: any to any

- Destination / Invert: Unchecked
- Destination: WAN address
- Destination Port range: (other) 9999 to (other) 9999

- Redirect target IP: 192.168.1.200
- Redirect target Port: (other) 3100

- Pool Options: Default
- NAT reflection: Enable
- Filter rule association: Rule NAT

Now it should work! But if it doesn’t (in my case) try the following:

from external: telnet <your external IP> 9999
from internal: telnet <your external IP> 9999

Does the call from external not work, but from internal it does? Then look in the livelog if the query even get to your firewall: Firewall -> Log Files -> Live View

If the query doesn’t show up maybe the error is before the firewall. In my case it was a NAT in the Fritzbox (even I have a external IP). I had to set the “exposed host” rule in the router. This is nessesary by newer Fritzbox models (in my case 6591 Cable).

source: [theogravity] [me]

Leave a Reply

Your email address will not be published. Required fields are marked *