LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-18-2007, 09:21 AM   #1
ericcarlson
Member
 
Registered: Jan 2002
Posts: 162

Rep: Reputation: 30
Define a domains DNS entry entirely in terms of another


Say I have example.com set up like this:

example.com. IN NS ns.example.com.
example.com. IN NS ns0.example.com.
ns.example.com. IN A 1.2.3.4
example.com. IN A 1.2.3.4
webmail.example.com. IN CNAME example.com.
mail.example.com. IN CNAME example.com.
ftp.example.com. IN CNAME example.com.
www.example.com. IN CNAME example.com.
example.com. IN MX 10 mail.example.com.

I also have example.net and example.org, but as they always redirect to example.com
I don't want to refer to any IP addresses in their nameserver recs, just example.com.

I tried this which just gave host not found

example.net. IN NS ns.example.net.
example.net. IN NS ns0.example.net.
ns.example.net. IN CNAME example.com.
example.net. IN CNAME example.com.
webmail.example.net. IN CNAME example.net.
mail.example.net. IN CNAME example.net.
ftp.example.net. IN CNAME example.net.
www.example.net. IN CNAME example.net.
example.net. IN MX 10 mail.example.net.

I can fix it by explicitly repeating the IP's (ie, just use the 2 A recs from the first block)
but it struck me there must be a smarter way. Thanks.
 
Old 04-18-2007, 09:33 AM   #2
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
Use the @ symbol then 'CNAME @' instead.
 
Old 04-18-2007, 10:18 AM   #3
ericcarlson
Member
 
Registered: Jan 2002
Posts: 162

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by ramram29
Use the @ symbol then 'CNAME @' instead.
ns.example.net. IN CNAME example.com.
example.net. IN CNAME example.com.

becomes

ns.example.net. @ CNAME @ example.com.
example.net. @ CNAME @ example.com.

? Thanks, but it didn't work, I must have misunderstood you
 
Old 04-19-2007, 02:09 PM   #4
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
@ IN A 10.0.0.1

ns IN CNAME @
mail IN CNAME @
webmail IN CNAME @
ftp IN CNAME @

In this way if you ping example.com or ns.example.com it will reply with the same address.
 
Old 04-20-2007, 04:45 AM   #5
ericcarlson
Member
 
Registered: Jan 2002
Posts: 162

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by ramram29
@ IN A 10.0.0.1

ns IN CNAME @
mail IN CNAME @
webmail IN CNAME @
ftp IN CNAME @

In this way if you ping example.com or ns.example.com it will reply with the same address.
I must be dumb.
We are setting up the record for example.org & example.net, but don't refer to example.com in it?
Did you mean 10.0.0.1 is example.com's IP? If so, thats the problem I'm trying to solve.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to define the DNS server (NOoOB) wizkidnono *BSD 3 07-29-2004 08:38 AM
Explaination Of DNS Terms Joe_Astor Linux - Networking 7 04-11-2004 03:56 AM
BIND/DNS - Two Different Domains jhewitt Linux - Networking 1 02-20-2004 08:54 PM
Confused about some DNS terms tusher Linux - Networking 3 12-09-2003 09:32 AM
hosts entry for a lan unit with no dns entry linxtc Linux - Networking 1 10-03-2003 09:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration