OPNsense Forum

Archive => 21.7 Legacy Series => Topic started by: Sakata_T on September 25, 2021, 12:20:12 am

Title: Alias not being processed correctly in NAT and/or Firewall rules?
Post by: Sakata_T on September 25, 2021, 12:20:12 am
I have aliases set up for several services that go to specific computers, and have been having issues with receiving notices that the services aren't connectable.  None of them are critical for day to day use, so I've been generally putting the issue aside 'for tomorrow'... for a long time now.

Yesterday I noticed that a game I decided to pick up and play was screaming that I was not connectable "Strict NAT". Which normally, I'd think that having the port forward set up, I'd not have seen the message.

I went down the rabbit hole hard, setting up static-port on outbound NAT rules, along with several other things, and finally got tired of mucking about and figured I'd create the NAT rule manually for the specific two ports the game requires -- and as soon as I did so, the "Strict NAT" message went away.

Normally I'd expect that an alias would process in order in the rules -- so something like this NAT rule would work:
(https://i.imgur.com/wNQlg20.png)

Admittedly the number of ports there aren't contiguous and probably not even in "order" if sorted.
However, it just doesn't work. As soon as I added these rules, the game immediately stopped griping:
(https://i.imgur.com/pvxoiWr.png)

Does OPNsense do something to the tables and get the ports mixed up, or am I just trying to use aliases in a way that they were not intended, requiring me to create a bunch of rules by hand for each port/range I need to forward?
Title: Re: Alias not being processed correctly in NAT and/or Firewall rules?
Post by: vijvis on September 25, 2021, 02:15:52 am
Working fine for me on Xbox. I have alias setup for Xbox live. And the Xbox reports full open NAT. I don't see any issues in the firewall logs.
Title: Re: Alias not being processed correctly in NAT and/or Firewall rules?
Post by: Greelan on September 25, 2021, 02:47:32 am
Have you applied the alias? Check under Diagnostics/Aliases to confirm the entries are there.

I have no issues using port aliases in port forwards, even where the ports are not contiguous.