The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Wildcard DNS?

Discussion in 'Bind / DNS / Nameserver Issues' started by Omar, Oct 7, 2002.

  1. Omar

    Omar Well-Known Member

    Joined:
    Jul 30, 2002
    Messages:
    82
    Likes Received:
    0
    Trophy Points:
    6
    Could someone please explain to me what wildcard DNS does?

    Also, is it possible to use wildcard dns with cpanel/whm ?

    Thanks

    - Omar
     
  2. itf

    itf Well-Known Member

    Joined:
    May 9, 2002
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    [quote:116bc9b5e6][i:116bc9b5e6]Originally posted by Omar[/i:116bc9b5e6]

    Could someone please explain to me what wildcard DNS does?

    Also, is it possible to use wildcard dns with cpanel/whm ?

    Thanks

    - Omar[/quote:116bc9b5e6]
    Wildcard A, CNAME and MX records are possible

    You have to add like this record in your zone file.

    [b:116bc9b5e6]*.domain.com. IN A 10.20.30.40[/b:116bc9b5e6]

    But if you have i.e this record too
    www IN A 10.20.30.41

    Then any attempt to lookup hosts for that domain will resolve this way:

    corporate.domain.com
    staff.domain.com
    support.domain.com

    All of them will resolve to -& 10.20.30.40

    Except for www which you have another A record for it:

    www.domain.com -& 10.20.30.41


    [b:116bc9b5e6]Wildcard A and CNAME records are confusing to users, and a potential nightmare if used without thinking first.[/b:116bc9b5e6] It could result (due again to domain searching) in any telnet/ftp attempts from within the domain to unknown hosts to be directed to one address. One such wildcard CNAME (in *.edu.com) caused Internet-wide loss of services and potential security nightmares due to unexpected interactions with domain searching. It resulted in swift fixes, and even an RFC ([RFC 1535]) documenting the problem.


    Wildcard MXs are useful mostly for non IP-connected sites. A common mistake is thinking that a wildcard MX for a zone will apply to all hosts in the zone. A wildcard MX will apply only to names in the zone, which aren't listed in the DNS at all. e.g.

    domain.com. IN NS ns1
    domain.com. IN NS ns2
    alpha IN A 10.20.30.41
    *.domain.com. IN MX 5 sue

    Mail for alpha.domain.com will be sent to itself for delivery. Only mail for delta.domain.com or any hosts you don't see above will be sent to the MX. [b:116bc9b5e6]For most Internet sites, wildcard MX records are not useful.[/b:116bc9b5e6] You need to put explicit MX records on every host.

    Wildcard MXs can be bad, because they make some operations succeed when they should fail instead. Consider the case where someone in the domain &domain.com& tries to send mail to &mike@tetra&. If the host &tetra& doesn't actually exist, the mail should in fact bounce immediately. But because of domain searching the address gets resolved to &tetra.domain.com&, and because of the wildcard MX this is a valid address according to DNS. Or perhaps someone simply made a typo in the hostname portion of the address. The mail message then is routed to the mail host, which then rejects the mail with strange error messages like &I refuse to talk to myself& or &Local configuration error&.

    Wildcard MX records are good for when you have a large number of hosts which are not directly Internet-connected (for example, behind a firewall) and for administrative or political reasons it is too difficult to have individual MX records for every host, or to force all e-mail addresses to be &hidden& behind one or more domain names. In that case, you must divide your DNS into two parts, an internal DNS, and an external DNS. The external DNS will have only a few hosts and explicit MX records, and one or more wildcard MXs for each internal domain. Internally the DNS will be complete, with all explicit MX records and no wildcards.
     
  3. net4me

    net4me Active Member

    Joined:
    Apr 21, 2002
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    But is it possible to use wildards without own IP? How to setup the dns?
     
  4. itf

    itf Well-Known Member

    Joined:
    May 9, 2002
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    [quote:f29073249b][i:f29073249b]Originally posted by net4me[/i:f29073249b]

    But is it possible to use wildards without own IP? How to setup the dns?[/quote:f29073249b]
    Wildcard A, CNAME and MX records are possible

    You have to add like this record in your zone file.

    [b:f29073249b]*.domain.com. IN A 10.20.30.40[/b:f29073249b]

    But if you have i.e this record too
    www IN A 10.20.30.41

    Then any attempt to lookup hosts for that domain will resolve this way:

    corporate.domain.com
    staff.domain.com
    support.domain.com

    All of them will resolve to -& 10.20.30.40

    Except for www which you have another A record for it:

    www.domain.com -& 10.20.30.41

    However it is not recommended to set up wildcard DNS (please read my last post in this thread)
     
  5. Fathom

    Fathom Registered

    Joined:
    Apr 24, 2003
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Where is the zone file?
     
  6. myusername

    myusername Well-Known Member
    PartnerNOC

    Joined:
    Mar 6, 2003
    Messages:
    691
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    chown -R us.*yourbase*
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    In WHM under DNS functions. Edit zones
     
  7. Nodnarb

    Nodnarb Member

    Joined:
    Jul 5, 2003
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Wildcard TLD's?

    Is it possible to take this one step further, and have a wildcard TLD? So, www.*.com, *.com, www.*.net and *.net domain names would resolve to a configured site on my box, instead of coming up lame?

    That would solve a lot of problems I have with getting sites online quickly!

    Not interested in wildcard MX records. I just want new, unconfigured/lame sites to resolve to a specific site. I have a spare IP to use for this also, if necessary.
     
    #7 Nodnarb, Dec 29, 2003
    Last edited: Dec 29, 2003
Loading...

Share This Page