Wildcard DNS A record not accepted

Discussion in 'Installation/Configuration' started by brainsys, Aug 25, 2021.

  1. brainsys

    brainsys Member

    Hi,

    Many of our domains have a plain * set for the host A domain record. This works great since the host and any subdomain get the target IP returned.

    At some stage the behaviour of the IPSConfig DNS parser has changed. When you enter * it is parsed to *.domain.tld and BIND9 will not resolve domain.tld. I suppose I could edit the record in phpMyAdmin and re-sync but that's not an option for users without Admin access.

    Is this intentional? Is there anyway other way to circumvent it?
    (Apologies if it has been answered but I couldn't find it)

    [ISPConfig 3.2.5, Debian 10 Perfect Server setup]
     
    Last edited: Aug 25, 2021
  2. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    '*' is valid in bind config, and will match any hostname which doesn't otherwise have any records, it will not match the domain itself, for that just leave the hostname blank (or try '@', which may or may not work).
     
    ahrasis and Th0m like this.
  3. Chris_UK

    Chris_UK Active Member HowtoForge Supporter

    Hi Jesse, is that a default configuration? The * I mean.

    Is that the reason sites that hostnames with no dns record default to the first vhost? I don't like that behaviour So I am thinking I might have to change it if it is. That or I am setting up a new 000 vhost just to handle it.
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    No. It is because of Apache, it chooses the first vhost in alphabetical order. Maybe nginx does the same?
     
    Chris_UK likes this.
  5. Chris_UK

    Chris_UK Active Member HowtoForge Supporter

    Okay, so then the better solution to prevent showing the first site for everything would be to create a default site that will be first alphabetically?

    I just don't like that one of my websites shows up whenever a host has no dns record I can just about handle the default apache page loading up, at least that's obvious what happened, it messed with me for a while until I realised what was happening.
     
  6. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    It's actually the other way, it happens when a domain does have dns setup, pointing to your server, but there is not a website configure for them (or configure incorrectly).
     
    ahrasis and Chris_UK like this.
  7. Chris_UK

    Chris_UK Active Member HowtoForge Supporter

    Okay, yes that makes sense. so I just need to make if a record is there it either has a site or is removed.
     

Share This Page