OPNsense Forum

Archive => 23.7 Legacy Series => Topic started by: guliver235 on January 12, 2024, 09:41:35 PM

Title: Cannot find my aliases port in destinations rules
Post by: guliver235 on January 12, 2024, 09:41:35 PM
Like the title says I create an alias for my reverse proxy to make a rule in order to be visible for my client but I cannot find the alias in destination?
Title: Re: Cannot find my aliases port in destinations rules
Post by: cookiemonster on January 12, 2024, 10:51:37 PM
Did you click on "Apply" at the very bottom of the page used to create the alias? It's IMHO easy to miss.
Title: Re: Cannot find my aliases port in destinations rules
Post by: guliver235 on January 13, 2024, 01:12:57 AM
Yes, I did even several times!
Actually, I noticed the column Loaded# stay empty for this alias
Title: Re: Cannot find my aliases port in destinations rules
Post by: Seimus on January 13, 2024, 01:48:52 AM
Can you try for test create another port based Alias, put there any single port, save and apply. Afterwards check if that new Port Alias is seen by the FW rule?

Also how did you put in the ports into the Alias? Did you do manually or copy paste? Did you do Ranges? Are you sure that after a port/ports you didn't have any spaces?

Regards,
S.
Title: Re: Cannot find my aliases port in destinations rules
Post by: guliver235 on January 13, 2024, 02:26:40 AM
Same thing with one port, but I should admit opnSense is very new to me so I am sure I am doing something wrong but What.... :( :-\
Title: Re: Cannot find my aliases port in destinations rules
Post by: Monviech (Cedrik) on January 13, 2024, 07:18:32 AM
Download a backup of your configuration, open the configuration.xml data in a text editor (like notepad++), search for "ProxyPorts" and post the xml structure of it. Maybe theres an error in it?
Title: Re: Cannot find my aliases port in destinations rules
Post by: guliver235 on January 13, 2024, 05:02:44 PM
Here we go
<alias uuid="902a2b6f-ab98-4f13-aa24-54b0b15bb8e6">
<enabled>1</enabled>
<name>ProxyPorts</name>
<type>port</type>
<proto/>
<interface/>
<counters>0</counters>
<updatefreq/>
<content>80 90 443 450</content>
<categories/>
<description>ReverseProxy</description>
</alias>
<alias uuid="ec7e59b1-eafe-448c-8299-ddee036f15a1">
<enabled>1</enabled>
<name>alias_test</name>
<type>port</type>
<proto/>
<interface/>
<counters>0</counters>
<updatefreq/>
<content>80</content>
<categories/>
<description/>
</alias>
</aliases>
Title: Re: Cannot find my aliases port in destinations rules
Post by: cookiemonster on January 13, 2024, 10:42:30 PM
I think it's the validation on the protocol. It will appear in the selection list of ports if the protocol is TCP in this case. If protocol set to "any", it won't appear. Could that be it?
p.s. whether this setup will work as you want, no idea.
Title: Re: Cannot find my aliases port in destinations rules
Post by: guliver235 on January 14, 2024, 05:54:45 PM
I did try it previously not working :'(
by the way I am following this tutorial https://homenetworkguy.com/how-to/deploy-nginx-proxy-manager-in-dmz-with-opnsense/
Title: Re: Cannot find my aliases port in destinations rules
Post by: guliver235 on January 14, 2024, 06:15:58 PM
Just noticed I pick host instead of port I can pick it in destination but I dont think this is the way according to https://homenetworkguy.com/how-to/write-better-firewall-rules-opnsense-using-aliases/#types-of-aliases
Title: Re: Cannot find my aliases port in destinations rules
Post by: Patrick M. Hausen on January 14, 2024, 07:22:14 PM
Your port aliases are not the destination. The destination is an IP address, a host alias or a network (or GeoIP or whatever has host/network properties).

Your port aliases go into "Destination port range" - see screenshot.
Title: Re: Cannot find my aliases port in destinations rules
Post by: guliver235 on January 14, 2024, 08:51:25 PM
Thank you so much :) :)
I canntot believe I was not able to read the instructions from the link https://homenetworkguy.com/how-to/deploy-nginx-proxy-manager-in-dmz-with-opnsense/ Ineed better glasses!
It is working even my proxy is!