Hi,
Once again, my apologies for asking so many questions. If I can get BIND working, I've got an almost fully functional server (except for mail, which I have not even attempted to get working yet).
My config files are included at the bottom of this post (of course, I have blanked out my domain and IPs and made it mydomain.com, which is of course not my domain).
I've set up BIND 9 (the latest version available) on my server. For some reason, dig does not show a response for the domain I set it up to respond on, but it shows a response to any other domain such as google.com. Here are some examples from my computer, not the server (I use Mac OS X, so I have dig).
google.com
Code:
; <<>> DiG 9.2.2 <<>> google.com @dns.server.ip
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58812
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 4, ADDITIONAL: 0
;; QUESTION SECTION:
;google.com. IN A
;; ANSWER SECTION:
google.com. 249 IN A 72.14.207.99
google.com. 249 IN A 64.233.167.99
google.com. 249 IN A 64.233.187.99
;; AUTHORITY SECTION:
google.com. 345549 IN NS ns4.google.com.
google.com. 345549 IN NS ns1.google.com.
google.com. 345549 IN NS ns2.google.com.
google.com. 345549 IN NS ns3.google.com.
;; Query time: 82 msec
;; SERVER: dns.server.ip#53(dns.server.ip)
;; WHEN: Fri Jan 12 10:13:37 2007
;; MSG SIZE rcvd: 148
[b]The domain I set up on BIND (referred to as "mydomain.com")[/code]
Code:
; <<>> DiG 9.2.2 <<>> mydomain.com @dns.server.ip
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 16352
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;mydomain.com. IN A
;; Query time: 73 msec
;; SERVER: dns.server.ip#53(dns.server.ip)
;; WHEN: Fri Jan 12 10:36:08 2007
;; MSG SIZE rcvd: 37
The domain is also not working in the browsers I tried, and I am quite sure the DNS has propogated (sp?) on the domain as I set it on the registrar quite some time ago.
As I am using IP-based hosting, the domain responds whenever I type in the IP address directly, so I know it is not the HTTP server. The HTTP server is Apache 2.2.4, the latest version.
On BIND, I am also using logging. It would be too long to post every log file here, so I have included only an important one - general.log. Please let me know if you need more logs, and which ones, and I will get them for you. Of course, site details and IP addresses have been blanked out.
Code:
12-Jan-2007 20:09:59.084 named.local:1: no TTL specified; using SOA MINTTL instead
12-Jan-2007 20:09:59.084 zone 0.0.127.in-addr.arpa/IN: loaded serial 2007011101
12-Jan-2007 20:09:59.084 dns_rdata_fromtext: named.mydomain.com:1: near eol: unexpected end of input
12-Jan-2007 20:09:59.084 zone mydomain.com/IN: loading master file named.mydomain.com: unexpected end of input
12-Jan-2007 20:09:59.085 running
I tried to fix that "unexpected end of input" error on line 1, but I cannot see anything that would cause that problem. I'm not sure how I should deal with that.
Here are my configuration files, of course with site details and IP addresses blanked out (as normal). These are not very long, so I will paste them here.
/etc/named.conf
Code:
options {
directory "/var/named";
listen-on { dns.ip.address; };
listen-on { another.dns.ip; };
};
zone "mydomain.com" in {
type master;
file "named.mydomain.com";
};
zone "0.0.127.in-addr.arpa" in {
type master;
file "named.local";
};
zone "." in {
type hint;
file "named.cache";
};
include "/var/named/conf/logging.conf";
/var/named/named.mydomain.com
Code:
$TTL 604800
@ IN SOA mydomain.com. support.mydomain.com.
(
2007011105
4H
2H
1W
1D )
NS ns1.mydomain.com
NS ns2.mydomain.com
mydomain.com. A web.server.ip
ns1 A other.dns.ip
ns2 A other.dns.ip
www CNAME mydomain.com.
mail CNAME mydomain.com.
smtp CNAME mydomain.com.
/var/named/named.local
Code:
$TTL 86400
@ IN SOA anotherdomain.com support.anotherdomain.com (
2007011101
3H
1H
604800
86400)
NS ns1.anotherdomain.com.
NS ns2.anotherdomain.com.
1 PTR localhost.
/var/named/named.cache
I won't bother pasting this one, since all it is is the contents of the following.
Code:
dig @a.root-servers.net > named.cache
Thank you in advance.
Splenden