|
-
Aug 26th, 2014, 10:43 AM
#1
Thread Starter
Fanatic Member
Bind9 DNS Question
I'm trying to configure my Bind9 Server to resolve hostnames, lets say *.example.com (I'm using another domain with name servers setup, it's hosted at hostgator).
example.com has public DNS entries like as server1.example.com, server2.example.com, server3.example.com, etc configured on that domain.
From inside my network, I want to be able to resolve server1.example.com to an IP that I specify, I also want to be able to add in my own domains, like voip.example.com to an IP (which isn't set on the public website) on my network. If an entry doesn't exist, like say server2.example.com on my DNS server, then it will resolve the IP address normally (Using what ever DNS server my DNS server uses).
So far, I have it working, but I must specify every domain. It is only resolving hostnames that I've specified for this domain. It doesn't resolve server2.example.com for example, unless I tell it how. I can't even ping example.com unless I specify the IP.
Basically: If Bind9 has entry for domain then give IP or else, use the name server specified (or the server's DNS server) to resolve the IP.
Code:
$ORIGIN example.com. ; designates the start of this zone file in the namespace
$TTL 1h ; default expiration time of all resource records without their own TTL value
;
; BIND data file for example.com
;
@ IN SOA ns.nsforexample.com. example.com. (
2012112726 ; Serial
7200 ; Refresh
120 ; Retry
2419200 ; Expire
604800) ; Default TTL
;
@ IN NS ns.nsforexample.com.
@ IN NS ns2.nsforexample.com.
server1 IN A 192.168.1.10
voip IN A 192.168.1.20
-
Apr 22nd, 2015, 01:42 PM
#2
Registered User
Re: Bind9 DNS Question
You can edit named.conf and write a rule that if the IP is local, do not use this zone.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|