I'm setting one dedicated server for hosting. and trying to setup private dns and nameservers. trying from a day and I can't figure out the issue.
I'm using BIND9 DNS Server in windows 8.
So, I've had problems getting DNS set up properly. I have two domains, each one pointing to one of these servers. The nameservers are registered correctly with the domain registrar, and the nameserver IPs are entered correctly as well. I've spoken to tech support at the registrar and they confirm that everything is set up on their end. Not knowing much about DNS, I googled nameservers and DNS until I nearly went blind, and spent hours messing with the configuration.
named runs just fine, but nothing is resolving. When I "dig any example.com" I get a SERVFAIL message.
named.conf
options {
directory "C:\BIND\etc";
version "not currently available";
pid-file "run\named.pid";
allow-transfer { none; };
recursion no;
};
logging{
channel my_log{
file "log\named.log" versions 3 size 250k;
severity info;
};
category default{
my_log;
};
};
zone "example.com" IN {
type master;
file "zones\db.example.com.txt";
allow-transfer { any; };
};
key "rndc-key" {
algorithm hmac-md5;
secret "B5jGB5sU7e35WzXoam/EcA==";
};
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};
db.example.com
$TTL 6h
@ IN SOA ns1.example.com.
hostmaster.example.com. (
2015062801
10800
3600
604800
86400 )
@ NS ns1.example.com.
@ NS ns2.example.com.
ns1 IN A 1.2.3.4
ns2 IN A 1.2.3.4
www IN A 1.2.3.4
named.log
dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running client 1.2.3.4#51108: query (cache) './NS/IN' denied shutting down: flushing changes stopping command channel on 127.0.0.1#953 no longer listening on 127.0.0.1#53 no longer listening on 192.168.1.3#53 dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running invalid command from 127.0.0.1#50166: bad auth shutting down: flushing changes stopping command channel on 127.0.0.1#953 no longer listening on 127.0.0.1#53 no longer listening on 192.168.1.3#53 dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running shutting down: flushing changes stopping command channel on
127.0.0.1#953 no longer listening on 127.0.0.1#53 no longer listening on 192.168.1.3#53 exiting dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running shutting down: flushing changes stopping command channel on 127.0.0.1#953 no longer listening on 127.0.0.1#53 no longer listening on 192.168.1.3#53 exiting dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running shutting down: flushing changes stopping command channel on
127.0.0.1#953 no longer listening on 127.0.0.1#53 no longer listening on 192.168.1.3#53 dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running shutting down: flushing changes stopping command channel on
127.0.0.1#953 no longer listening on 127.0.0.1#53 no longer listening on 192.168.1.3#53 dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running shutting down: flushing changes stopping command channel on
127.0.0.1#953 no longer listening on 127.0.0.1#53 no longer listening on 192.168.1.3#53 dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running shutting down: flushing changes stopping command channel on
127.0.0.1#953 no longer listening on 127.0.0.1#53 no longer listening on 192.168.1.3#53 dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running shutting down: flushing changes stopping command channel on
127.0.0.1#953 dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running shutting down: flushing changes stopping command channel on
127.0.0.1#953 no longer listening on 127.0.0.1#53 no longer listening on 192.168.1.3#53 dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running shutting down: flushing changes stopping command channel on
127.0.0.1#953 no longer listening on 127.0.0.1#53 no longer listening on 192.168.1.3#53 dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running shutting down: flushing changes stopping command channel on
127.0.0.1#953 no longer listening on 127.0.0.1#53 no longer listening on 192.168.1.3#53 dns_rdata_fromtext: zones\db.example.com.txt:2: near eol: unexpected end of input zone example.com/IN: loading from master file zones\db.example.com.txt failed: unexpected end of input running client 134.147.203.115#28207: query (cache) 'psge.53dca67a.wc.syssec.rub.de/A/IN' denied
here 1.2.3.4 refers to my public static IP. I'm new here for dns. any help would be great.
So, in summary: •Nameservers, with IPs, are correctly registered with domain registrar •named is configured and running ...and must not be configured •correctly, because nothing resolves.
Any help would be great. I changed domains and IPs in the files to generics, but let me know if you need to know the domain in question.
your log shows the error:
It does not appear to like your SOA. You might try moving the hostmaster record to the same line as your ORIGIN and the last parens after the NX TTL
EDIT:
SOA record format