Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resolving wildcard hosts *.hello.world.com to CNAME OR IP - not workin

Status
Not open for further replies.

kmaster

Technical User
Nov 6, 2008
2
CA
Hi everyone,

I'm no DNS pro but I'm having trouble creating a SOA record that will accept a wildcard e.g. *.hello.world.com IN IP address or CNAME new.domain.com

When a resolver picks this up, I want it so that it will accept any hosts after the * and take the domain as well.

(1) *.hello.world.com
(2) hello.world.com

The hosts are dynamic thus the need for the wildcard. This works right now, but does not work for case 2.

db.hello.world.com
;NS Records
IN A new.domain.com
;Hosts
*.hello.world.com IN A new.domain.com


I've tried *.world.com, but this screws up lookups to world.com e.g. when someone types I don't want to redirect this traffic.

HELP! Thanks!
Kmaster
 
The A should be the IP address of new.domain.com. Anything else, it will barf.

The syntax of the second seems wrong (True bind you have to have the periods).

IN A 1.2.3.4
* IN A new.domain.com.

Omitting the periods tacks on the $DOMAIN value.

 
Sorry how about this syntax... see comments. This apparently works, but I don't know why. I want to use CNAME instead of an A record.


# more db.hello.world.com

@ IN SOA blah.blah.

; I want to resolve *.hello.world.com and hello.world.com
; to an alias/CNAME

; hello.world.com only works with I put in a A record
; can't use CNAME to support the domain.

IN A 11.22.33.44

* IN CNAME new.domain.com.
 

A CNAME for the domain is not possible because the left hand side MUST NOT have a reference to work. In this case, you already have '@' (the domain itself) as an entry, and a subsequest CNAME is invalid.

Just like in the case

myhost IN A 1.2.3.4
myhost IN CNAME new.domain.com.

The CNAME is ignored because there is a lhs entry, it does not make sense that the entry has a value AND you say everything is CNAMED to another name.

I believe what you have is the best you can do.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top