Port forward not working ( Solved )

Started by yeraycito, April 22, 2021, 03:45:06 AM

Previous topic - Next topic
April 22, 2021, 03:45:06 AM Last Edit: April 22, 2021, 04:21:01 AM by yeraycito
Setup opnsense 21.1 - 21.1.2 - 21.1.3 - 21.1.4:

Firewall - Settings - Advanced: default options

- Reflection for port forwards: enabled

- Reflection for 1:1: enabled

- Automatic outbound NAT for Reflection: enabled

Firewall - Nat- Port Forward:

- Inteface: wan

- Destination: ANY      Destination port range: ANY

- Redirect target IP: XXXXX          Redirect target port: xxx

- Filter rule association: Add associated filter rule      ( default opcion )

Result: All good

Clean installation of opnsense 21.1 updated to 21.1.5:

Firewall - Settings - Advanced: default options

- Reflection for port forwards: disabled ??????

- Reflection for 1:1: disabled ???????

- Automatic outbound NAT for Reflection: disabled ?????

Firewall - Nat- Port Forward:

- Inteface: wan

- Destination: ANY      Destination port range: ANY

- Redirect target IP: XXXXX          Redirect target port: xxx

- Filter rule association: None ???????

Result: not working

If we put Filter rule association: Add associated filter rule: not working

If active Reflection for port forwards - Reflection for 1:1 - Automatic outbound NAT for Reflection + Filter rule association: Add associated filter rule  : not working

?????????????????

https://forum.opnsense.org/index.php?topic=8783.0                : not working

April 22, 2021, 04:31:12 AM #1 Last Edit: April 22, 2021, 04:56:56 AM by yeraycito
Problem solved. The problem was in Firewall - Aliases

I had created a configuration in Aliases to allow a number of ips limited to access the server ( Cloudflare ips ):

In opnsense 21.1.4 they were configured under the Host(s) option. In opnsense 21.1.5 setting those ips with the Host(s) option gave an error. So I changed the configuration to URLs (IPs). That's why it didn't work. I changed the configuration from Aliases to Host(s) and this time it let me save the changes. From then on everything worked.

Final configuration:

Firewall - Settings - Advanced:

- Reflection for port forwards: enabled

- Reflection for 1:1: enabled

- Automatic outbound NAT for Reflection: enabled

Firewall - Nat- Port Forward:

- Inteface: wan

- Destination: ANY      Destination port range: ANY

- Redirect target IP: XXXXX          Redirect target port: xxx

- Filter rule association: Add associated filter rule