OPNsense Forum

Archive => 17.1 Legacy Series => Topic started by: marijn on February 24, 2017, 09:54:19 am

Title: Use minus (-) character in alias name
Post by: marijn on February 24, 2017, 09:54:19 am
Hi All,

Maybe question that can simply be answered with "no", but still I like to see if there is a possibility.

So basically I'm testing OpnSense and how it will act in our enterprise environments, I like to make a lot of aliases (basically for every server we have) to create the thousands of access rules we have for every server and or server farms.

In most cases, an alias will include the server name as "name" and 2 IP addresses (1 IPv4 and 1 IPv6).

Now the "issue" all our server names are using a minus in the name, so for example "TST-WEB-101", I see OpnSense isn't supporting minuses in the alias names, but an underscore is working fine.

Is there a technical limitation or is it just a weird question from my side?  :P

Thanks
Title: Re: Use minus (-) character in alias name
Post by: AdSchellevis on February 24, 2017, 04:57:30 pm
Hi Marijn,

It's not a weird question at all, this constraint has been in there for quite some time, I was under the impression that this was a constraint from the underlaying filter (pf), but I can't find a reference to that.
(in fact we already generate some internal aliases which use a minus, so technically we should be good there)

Since it has been in there for quite some time and the minus sign is also used as range selector I don't think we should drop this constraint without thorough testing.

You could add an issue on github and request for the removal (https://github.com/opnsense/core/issues), we can discuss it there and maybe offer you something to test.

Best regards,

Ad
 
Title: Re: Use minus (-) character in alias name
Post by: 0xDEADC0DE on February 26, 2017, 02:55:30 pm
I wanted to ask the same as our server names are very similar and I used
the server name as an alias on our ZyWALLs for a long time.
It's nothing important but nice to have.
Title: Re: Use minus (-) character in alias name
Post by: 0xDEADC0DE on February 27, 2017, 01:09:04 pm
New issue created:

https://github.com/opnsense/core/issues/1434
Title: Re: Use minus (-) character in alias name
Post by: marijn on February 28, 2017, 12:20:47 pm
Sorry for my delayed reaction, but it was and is "Carnaval" in some area's of my country, so I was not able to type let say give a "proper reaction"  :P

But thanks for your reply, and thanks for creation a the creation of the GitHub request @Tragen!