LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 01-12-2007, 11:46 AM   #1
Splenden
Member
 
Registered: Jan 2007
Posts: 32

Rep: Reputation: 15
BIND - can't get answer for domain but can for other domain


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
 
Old 01-12-2007, 07:37 PM   #2
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 48
Looks like you have some error in the zone file of your domain.

Did you install Bind from source, or did you use a package manager to install it (apt-get, yum, yast)?

If you installed from source, you should get tools like named-checkzone, which can tell you problems with the zone file in question.

From the DNS server itself, not your mac, please enter these commands, and post the output here -

Code:
dig google.com @localhost
dig yourdomain.com @localhost
Also if possible, restart bind and post the full restart info. It does look from your initial posting that there is something wrong with the zonefile.

Peace,
JimBass
 
Old 01-12-2007, 11:19 PM   #3
Splenden
Member
 
Registered: Jan 2007
Posts: 32

Original Poster
Rep: Reputation: 15
Actually, I ended up reinstalling BIND and it works now. I forgot to update this. So I guess it was an issue with the installation.

Thank you.

Splenden
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCPD is updating BIND with <host>.<domain>.<domain>. diabelek Linux - Networking 15 10-11-2007 05:58 AM
Setup BIND for Local Domain and hosting domain ALInux Linux - Networking 4 12-19-2006 02:26 AM
Cant get entry in bind to work with domain.com instead of www.domain.com pxes351 Linux - Networking 12 05-09-2005 06:20 AM
Configuring BIND to work with a domain name Immolo Linux - Networking 4 04-20-2005 06:32 AM
ftp answer domain not bound gggbogota Linux - Networking 0 03-29-2004 03:07 PM


All times are GMT -5. The time now is 03:49 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration