Getting an error on a very simple DNS configuration

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting an error on a very simple DNS configuration

Samad Agha
Hey Gurus,
 
I'm a newbie and am trying to set up the simplest DNS server, just a working version, nothing fancy yet. Below is the steps I've taken already:
1- Set up my /etc/named.conf as follows:
[root@new-dns1 named]# cd /etc
[root@new-dns1 etc]# cat named.conf
zone "0.0.127.in-addr.arpa" {
        type master;
        file "db.127.0.0";
};
[root@new-dns1 etc]#
 
2- Set up my first zone in /var/named/db.127.0.0 as follows:
 
[root@new-dns1 named]# cat db.127.0.0
$TTL 3D
@               IN      SOA     new-dns1.ci.glendale.ca.us mchavoshi.glendaleca.gov. (
                                1       ; Serial
                                8H      ; Refresh
                                2H      ; Retry
                                4W      ; Expire
                                1D)     ; Minimum TTL
                        NS      new-dns1.ci.glendale.ca.us.
1                       PTR     localhost.
[root@new-dns1 named]#
When I restarted named I got the following error:
 
[root@new-dns1 named]# service named restart
Stopping named:                                            [  OK  ]
Starting named:
Error in named configuration:
zone 0.0.127.in-addr.arpa/IN: loading from master file db.127.0.0 failed: file not found
zone 0.0.127.in-addr.arpa/IN: not loaded due to errors.
_default/0.0.127.in-addr.arpa/IN: file not found
                                                           [FAILED]
 
What's wrong? Please don't assume anything as I'm a newbie.
 
Many thanks in advance for your excellent work.
 
Hiroshi

_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Getting an error on a very simple DNS configuration

Steven Carr
> [root@new-dns1 etc]# cat named.conf
> zone "0.0.127.in-addr.arpa" {
>         type master;
>         file "db.127.0.0";
> };

You're missing the "directory" directive, BIND doesn't know where your
files are.

Above the zone statement add:
    directory "/var/named";
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Getting an error on a very simple DNS configuration

Mark Andrews
In reply to this post by Samad Agha

You have a "file not found" error.  Specify the working directory
and where file names are relative to or use absolute file names.

options {
        directory "/var/named";
};

Mark


In message <CAOqzdMruo=N33U5r5jh-93CRpqfek83uUy5182QCm_XfOm=[hidden email]>
, Samad Agha writes:

>
> Hey Gurus,
>
> I'm a newbie and am trying to set up the simplest DNS server, just a
> working version, nothing fancy yet. Below is the steps I've taken already:
> 1- Set up my /etc/named.conf as follows:
> [root@new-dns1 named]# cd /etc
> [root@new-dns1 etc]# cat named.conf
> zone "0.0.127.in-addr.arpa" {
>         type master;
>         file "db.127.0.0";
> };
> [root@new-dns1 etc]#
>
> 2- Set up my first zone in /var/named/db.127.0.0 as follows:
>
> [root@new-dns1 named]# cat db.127.0.0
> $TTL 3D
> @               IN      SOA     new-dns1.ci.glendale.ca.us
> mchavoshi.glendaleca.gov. (
>                                 1       ; Serial
>                                 8H      ; Refresh
>                                 2H      ; Retry
>                                 4W      ; Expire
>                                 1D)     ; Minimum TTL
>                         NS      new-dns1.ci.glendale.ca.us.
> 1                       PTR     localhost.
> [root@new-dns1 named]#
> When I restarted named I got the following error:
>
> [root@new-dns1 named]# service named restart
> Stopping named:                                            [  OK  ]
> Starting named:
> Error in named configuration:
> zone 0.0.127.in-addr.arpa/IN: loading from master file db.127.0.0 failed:
> file not found
> zone 0.0.127.in-addr.arpa/IN: not loaded due to errors.
> _default/0.0.127.in-addr.arpa/IN: file not found
>                                                            [FAILED]
>
> What's wrong? Please don't assume anything as I'm a newbie.
>
> Many thanks in advance for your excellent work.
>
> Hiroshi
>
--
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: [hidden email]
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Getting an error on a very simple DNS configuration

Samad Agha
Ok, I corrected that and was able to restart named w/o any errors:
 
[root@new-dns1 etc]# service named restart
Stopping named:                                            [  OK  ]
Starting named:                                            [  OK  ]
[root@new-dns1 etc]#
 
Now, I should have a working DNS server, right? Now when I go to another machine and query this newly set up DNS server I get the following error. Why?
 
[mchavoshi@oraapps01 ~]$ nslookup google.com 206.117.115.92
;; connection timed out; trying next origin
;; connection timed out; no servers could be reached
[mchavoshi@oraapps01 ~]$

On Wed, Apr 8, 2015 at 2:43 PM, Mark Andrews <[hidden email]> wrote:

You have a "file not found" error.  Specify the working directory
and where file names are relative to or use absolute file names.

options {
        directory "/var/named";
};

Mark


In message <CAOqzdMruo=N33U5r5jh-93CRpqfek83uUy5182QCm_XfOm=[hidden email]>
, Samad Agha writes:
>
> Hey Gurus,
>
> I'm a newbie and am trying to set up the simplest DNS server, just a
> working version, nothing fancy yet. Below is the steps I've taken already:
> 1- Set up my /etc/named.conf as follows:
> [root@new-dns1 named]# cd /etc
> [root@new-dns1 etc]# cat named.conf
> zone "0.0.127.in-addr.arpa" {
>         type master;
>         file "db.127.0.0";
> };
> [root@new-dns1 etc]#
>
> 2- Set up my first zone in /var/named/db.127.0.0 as follows:
>
> [root@new-dns1 named]# cat db.127.0.0
> $TTL 3D
> @               IN      SOA     new-dns1.ci.glendale.ca.us
> mchavoshi.glendaleca.gov. (
>                                 1       ; Serial
>                                 8H      ; Refresh
>                                 2H      ; Retry
>                                 4W      ; Expire
>                                 1D)     ; Minimum TTL
>                         NS      new-dns1.ci.glendale.ca.us.
> 1                       PTR     localhost.
> [root@new-dns1 named]#
> When I restarted named I got the following error:
>
> [root@new-dns1 named]# service named restart
> Stopping named:                                            [  OK  ]
> Starting named:
> Error in named configuration:
> zone 0.0.127.in-addr.arpa/IN: loading from master file db.127.0.0 failed:
> file not found
> zone 0.0.127.in-addr.arpa/IN: not loaded due to errors.
> _default/0.0.127.in-addr.arpa/IN: file not found
>                                                            [FAILED]
>
> What's wrong? Please don't assume anything as I'm a newbie.
>
> Many thanks in advance for your excellent work.
>
> Hiroshi
>
--
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: <a href="tel:%2B61%202%209871%204742" value="+61298714742">+61 2 9871 4742                 INTERNET: [hidden email]


_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Getting an error on a very simple DNS configuration

Reindl Harald


Am 08.04.2015 um 23:52 schrieb Samad Agha:

> Ok, I corrected that and was able to restart named w/o any errors:
> [root@new-dns1 etc]# service named restart
> Stopping named:                                            [  OK  ]
> Starting named:                                            [  OK  ]
> [root@new-dns1 etc]#
> Now, I should have a working DNS server, right? Now when I go to another
> machine and query this newly set up DNS server I get the following
> error. Why?
> [mchavoshi@oraapps01 ~]$ nslookup google.com <http://google.com>
> 206.117.115.92
> ;; connection timed out; trying next origin
> ;; connection timed out; no servers could be reached
> [mchavoshi@oraapps01 ~]$
looks like you did not open port 53 on the servers firewall




_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Getting an error on a very simple DNS configuration

Steven Carr
On 8 April 2015 at 22:56, Reindl Harald <[hidden email]> wrote:
> looks like you did not open port 53 on the servers firewall

You're missing a whole swaythe of required declarations for BIND to be
able to handle recursion.

There are numerous examples via google, first one that is returned
is... https://www.digitalocean.com/community/tutorials/how-to-configure-bind-as-a-caching-or-forwarding-dns-server-on-ubuntu-14-04
skip over the OS bits and focus on the BIND configuration.
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Getting an error on a very simple DNS configuration

Mark Andrews

In message <[hidden email]>
, Steven Carr writes:
> On 8 April 2015 at 22:56, Reindl Harald <[hidden email]> wrote:
> > looks like you did not open port 53 on the servers firewall
>
> You're missing a whole swaythe of required declarations for BIND to be
> able to handle recursion.
 
"named -c /dev/null" is all that is required for named to be a
recursive server to the host running named and directly connected
networks assuming that the root servers for the network the host
is connected to are those of the Internet.  Yes, you can do additional
configuration but named will operate as a recursive server without
any configuration at all beyond giving it a empty configuration file.

> There are numerous examples via google, first one that is returned
> is... https://www.digitalocean.com/community/tutorials/how-to-configure-bind-
> as-a-caching-or-forwarding-dns-server-on-ubuntu-14-04
> skip over the OS bits and focus on the BIND configuration.
> _______________________________________________
> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe
>  from this list
>
> bind-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/bind-users
--
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: [hidden email]
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Getting an error on a very simple DNS configuration

/dev/rob0
In reply to this post by Steven Carr
On Wed, Apr 08, 2015 at 11:01:30PM +0100, Steven Carr wrote:
> You're missing a whole swaythe of required declarations for BIND
> to be able to handle recursion.

Not so.  In fact named with an empty named.conf has built-in hints,
plus default settings, which makes it work fine.

The allow-recursion default is "localhost; localnets;" so it should
answer queries from the same host and from any locally-connected
networks.

> There are numerous examples via google, first one that is returned

There's also the ISC KB,
        https://kb.isc.org/
and even an article which covers compiling from source and running a
simple named for recursion:
        https://kb.isc.org/article/AA-00768/
--
  http://rob0.nodns4.us/
  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Getting an error on a very simple DNS configuration

Samad Agha
In reply to this post by Mark Andrews
Hi All,
 
Problem is solved for now. Reindl Harald pointed out that my port 53 is not open. Sure enough I went on the new dns server and issued the command $service iptables stop, and all was working like a charm after that.
 
Thank you guys, seriously the service you have set up is so valuable for newbies and experienced users alike. Thank you so much everyone and have a terrific rest of the day.
 
I'm sure I'll call on you again as I add zones and try to put this DNS server in production. Thanks again, you are terrific bunch of guys.
 
Hiroshi

On Wed, Apr 8, 2015 at 3:10 PM, Mark Andrews <[hidden email]> wrote:

In message <[hidden email]>
, Steven Carr writes:
> On 8 April 2015 at 22:56, Reindl Harald <[hidden email]> wrote:
> > looks like you did not open port 53 on the servers firewall
>
> You're missing a whole swaythe of required declarations for BIND to be
> able to handle recursion.

"named -c /dev/null" is all that is required for named to be a
recursive server to the host running named and directly connected
networks assuming that the root servers for the network the host
is connected to are those of the Internet.  Yes, you can do additional
configuration but named will operate as a recursive server without
any configuration at all beyond giving it a empty configuration file.

> There are numerous examples via google, first one that is returned
> is... https://www.digitalocean.com/community/tutorials/how-to-configure-bind-
> as-a-caching-or-forwarding-dns-server-on-ubuntu-14-04
> skip over the OS bits and focus on the BIND configuration.
> _______________________________________________
> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe
>  from this list
>
> bind-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/bind-users
--
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: <a href="tel:%2B61%202%209871%204742" value="+61298714742">+61 2 9871 4742                 INTERNET: [hidden email]
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users


_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users