Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, I hope I have the correct forum for this question.
My question is about zone files in Bind9, or any DNS program I guess... with regard to the zone file syntax. Is it possible to have a zone file for a particular domain that does not contain any A records?
Here's an example:
Code:
$TTL 259200
example.com. IN SOA ns1.nameservers.com. postmaster.example.com. (
2008061000 ; Serial
259200 ; Refresh 3 days
3600 ; Retry 1 hour
1209600 ; Expire 2 weeks
1800 ) ; Negative Cache TTL 30 minutes
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Name Servers
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
IN NS ns1.nameservers.com.
IN NS ns2.nameservers.com.
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Aliases
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
www IN CNAME www.someotherdomain.com.
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; End of File
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
I assume in the above situation, a query to www.example.com would resolve to the same IP address as given to www.someotherdomain.com. Is this valid syntax for the domain zone file for example.com? It does not define any A records for the domain, and only lists one available domain (www.example.com) which is an alias to a totally different domain name. I'm wondering if this is allowed or if there are other "best practices" recommended.
If you are setting up a zone example.com, then the name servers you list for the example.com would be on the system running the DNS server. Otherwise, you'd be setting up a zone, but indicating that some other DNS server is authoritative for the very zone you are configuring.
Your SOA record says that this DNS server is authoritative for example.com. Therefore, you need a name server in the example.com zone to handle authoritative queries. Thus, you will have at least one NS record, and it will require one A record.
There is another zone file on the same machine for nameservers.com, which has the host ns1.nameservers.com pointing to it's IP. Both the example.com and nameservers.com zone files would be on the same primary DNS server.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.