LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-19-2012, 01:52 PM   #1
Takeshi_F
LQ Newbie
 
Registered: Oct 2012
Posts: 5

Rep: Reputation: Disabled
Ubuntu bind9 dns problem


Hi, I'm trying to setup a DNS on my linux ubuntu 11.10

So here are the things that i've done:

First I changed the /etc/network/interfaces file:
Code:
auto eth0
iface eth0 inet static
address 192.168.56.20
netmask 255.255.255.0
network	192.168.56.0
broadcast 192.168.56.255
gateway 192.168.56.1
auto lo
iface lo inet loopback
Then I changed the /etc/resolvconf/resolv.conf.d/base file with

Code:
nameserver 192.168.56.20
nameserver 192.168.56.10
I installed bind9 and edited the /etc/bind/named.conf.local file

Code:
//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

zone "lintest.be"{
        type master;
        file "/etc/bind/zones/lintest.be.db";
}
Then I changed /etc/bind/named.conf.options because I got a DNS server on Windows Server 2008 aswell (both Linux & Windows server are running in VirtualBox on a host-only network)

Code:
options {
        directory "/var/cache/bind";

        // If there is a firewall between you and nameservers you want
        // to talk to, you may need to fix the firewall to allow multiple
        // ports to talk.  See http://www.kb.cert.org/vuls/id/800113

        // If your ISP provided one or more IP addresses for stable
        // nameservers, you probably want to use them as forwarders.
        // Uncomment the following block, and insert the addresses replacing
        // the all-0's placeholder.

recursion yes;

        forwarders {
                192.168.56.10;
        };

        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };
};
In the /etc/bind/zones/lintest.be.db file:


Code:
$TTL 3D
@ IN SOA ns.mydomain.be. admin.mydomain.be. (
   2007062001
   28800
   3600
   604800
   38400
);
lintest.be.  IN      NS         ns.lintest.be.
mail     IN    CNAME  www
www             IN      A          192.168.56.10
When I want to lookup the dns server with nslookup mail.lintest.be I get this:

Code:
;; Got SERVFAIL reply from 192.168.56.20, trying next server
;; Got SERVFAIL reply from 127.0.0.1, trying next server
Does somebody know the problem?
 
Old 10-19-2012, 03:12 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
;; Got SERVFAIL reply from 192.168.56.20, trying next server
;; Got SERVFAIL reply from 127.0.0.1, trying next server
You don't have an A RR for ns.lintest.be. Add
Code:
ns.lintest.be. IN A 192.168.56.20
in the zone file, increase the serial and restart bind.

BTW if you get the above output from nslookup, it means that you have 127.0.0.1 as 2nd nameserver in resolv.conf

Cheers
 
1 members found this post helpful.
Old 10-20-2012, 07:17 AM   #3
Takeshi_F
LQ Newbie
 
Registered: Oct 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
You don't have an A RR for ns.lintest.be. Add
Code:
ns.lintest.be. IN A 192.168.56.20
in the zone file, increase the serial and restart bind.

BTW if you get the above output from nslookup, it means that you have 127.0.0.1 as 2nd nameserver in resolv.conf

Cheers
Thanks, that solved my problem. nslookup works now, but if I want to surf to mail.lintest.be on my Windows Server 2008 browser then it can't connect ( if I surf to mail.wintest.be on linux it works )... Any idea?
 
Old 10-20-2012, 12:06 PM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
if I want to surf to mail.lintest.be on my Windows Server 2008 browser then it can't connect ( if I surf to mail.wintest.be on linux it works )... Any idea?
You must tell windows to use the same nameserver (192.168.56.20) as your linux box.
 
1 members found this post helpful.
Old 10-20-2012, 01:25 PM   #5
Takeshi_F
LQ Newbie
 
Registered: Oct 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
You must tell windows to use the same nameserver (192.168.56.20) as your linux box.
Ah, thats what I've forgotten, thanks!
 
  


Reply



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
Linux Ubuntu bind9 dns Takeshi_F Linux - Wireless Networking 0 10-19-2012 08:49 AM
how to setup dns server on ubuntu by bind9 renuaseri Linux - Newbie 1 11-18-2009 02:15 AM
windows client can't use ubuntu bind9 DNS service and12345 Linux - Networking 1 12-07-2008 12:39 PM
DNS (bind9) on Ubuntu not working right Avatar Linux - Networking 9 01-07-2008 04:01 PM
dns configuration using Bind9 and ubuntu aljohn123 Ubuntu 0 11-13-2006 10:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration