As Dnsmasq does not support Views, I have installed and configured bind9. Everything works, however I am noticing on a specific entry that my bind server is not returning the same answer/response as Dnsmasq did. How can I achieve this?
Here is the config for my Dnsmasq server:
address=/override-url.example.com/54.210.175.6
Here is the dns response from my Dnsmaq server:
$ dig @127.0.0.1 override-url.example.com
Response:
; <<>> DiG 9.9.5-3-Ubuntu <<>> @127.0.0.1 override-url.example.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53532
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;override-url.example.com. IN A
;; ANSWER SECTION:
override-url.example.com. 0 IN A 1.2.3.4
;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Wed Aug 06 21:58:44 UTC 2014
;; MSG SIZE rcvd: 58
Here is my bind config and zone file:
zone "override-url.example.com" {
type master;
file "/etc/bind/override-url.example.com";
};
And the zone file:
$TTL 3600
$ORIGIN override-url.example.com.
@ IN SOA localhost. hostmaster.localhost.com. (
20140805 ; sn = serial number
86400 ; ref = refresh = 1d
900 ; ret = update retry = 15m
1209600 ; ex = expiry = 2w
3600 ; min = minimum = 1h
)
; we need at least 1 name server
IN NS
; override public ip with this address
IN A 54.210.127.53
And of course, here is the returned data from bind that doesn't match the answer above. I'd like to match it as closely as possible.
; <<>> DiG 9.8.3-P1 <<>> override-url.example.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 12930
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;override-url.example.com. IN A
;; Query time: 36 msec
;; SERVER: 54.88.72.140#53(54.88.72.140)
;; WHEN: Wed Aug 6 18:04:23 2014
;; MSG SIZE rcvd: 42
What changes should I make to my bind zone file to make it look as close to the dnsmasq settings as possible?
; we need at least 1 name server- IN NS
- Did you forget to include your DNS server, or are you obfuscating? Are you sure there are no errors when Bind tries to load that zone?status: SERVFAIL
Reload bind, check your system logs for named.localhost. hostmaster.localhost.com.
(between "localhost." and "hostmaster" which is not helping matters. Check your log files for ISC-DNS and see whether there is a parse error on the zone file.