[Xymon] Hostname validation (was Re: Xymon 4.3.29 Released - Important Security Update)

John Thurston john.thurston at alaska.gov
Mon Aug 5 23:38:06 CEST 2019


Hang on. I don't think there is any prohibition on hostnames with 
underscores. There is a prohibition for *A Records* with underscores, 
but the character remains valid for use in other record types.

A *hostname* of foo_1.bar.com is legal. It just can't be defined in a 
zone file as:
   foo_1.bar.com.  A  10.11.12.13

but it could be defined as:
   foo_1.bar.com.  CNAME  baz.bar.com.
   baz.bar.com.    A  10.11.12.13

To a resolving client, the end result is the same (a name gets turned 
into an address).

And I sure hope xymon would correctly handle a line in hosts.cfg
0.0.0.0  foo_1.bar.com  #


--
    Do things because you should, not just because you can.

John Thurston    907-465-8591
John.Thurston at alaska.gov
Department of Administration
State of Alaska

On 8/5/2019 1:21 PM, Richard L. Hamilton wrote:
> Seems to me that underscore is mainly a problem with address 0.0.0.0 in hosts.cfg (name to IP address resolution via host naming services, esp. if that ends up being DNS). If an IP address in hosts.cfg is used, and the hostname there isn't used in some other way, I don't guess it would matter.
> 
> Either a reminder in documentation (including in the hosts.cfg.5.html file) or a check and warning in case a name with underscore was used with non hosts.cfg resolution would probably keep people out of trouble; although underscores are wrong, they're widely tolerated in non-DNS hostnames, so I can see allowing them when they wouldn't cause further problems.


More information about the Xymon mailing list