Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 501290 - net-dns/bind: 127.zone is not required anymore
Summary: net-dns/bind: 127.zone is not required anymore
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Christian Ruppert (idl0r)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-14 11:42 UTC by Nikoli
Modified: 2015-04-08 17:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikoli 2014-02-14 11:42:32 UTC
Current bind ebuilds install "${FILESDIR}"/127.zone-r1 to 
/var/bind/pri/127.zone and use it in default named.conf, but this file 
is not required when using new enough bind, from bind-9.9.5/doc/arm/Bv9ARM.ch06.html#empty
"
Built-in Empty Zones
Named has some built-in empty zones (SOA and NS records only). These are for 
zones that should normally be answered locally and which queries should not be 
sent to the Internet's root servers. ...
The current list of empty zones is: 
...
127.IN-ADDR.ARPA
...
empty-zones-enable
Enable or disable all empty zones. By default, they are enabled.
"
Tried disabling 'zone "127.in-addr.arpa" IN' in named.conf, output of 'dig 
127.0.0.1' did not change.

May be it makes sense to add 'empty-zones-enable yes;' to default named.conf.
Comment 1 Nikoli 2014-05-01 19:23:07 UTC
Ping, is something blocking this?
Comment 2 Christian Ruppert (idl0r) gentoo-dev 2014-08-15 12:05:35 UTC
This has been fixed in >=9.9.5_p1. Thanks!
Comment 3 Martin Mokrejš 2015-03-21 08:47:19 UTC
I just upgraded to net-dns/bind-9.10.1_p1 from net-dns/bind-9.9.4_p2 and I see:

Mar 21 09:21:04 xx named[25506]: zone 127.in-addr.arpa/IN: loading from master file pri/127.zone failed: file not found
Mar 21 09:21:04 xx named[25506]: zone 127.in-addr.arpa/IN: not loaded due to errors.
Mar 21 09:21:04 xx named[25506]: zone localhost/IN: loaded serial 2008122601
Mar 21 09:21:04 xx named[25506]: zone iresite.org/IN: loaded serial 2014062715
Mar 21 09:21:04 xx named[25506]: all zones loaded

I have in /etc/bind/named.conf:

zone "127.in-addr.arpa" IN {
        type master;
        file "pri/127.zone";
        notify no;
};

I am not have with the change you did. Did you introduce 'empty-zones-enable yes;' as you said? You read it should be on by default. But is it really?


# nslookup
> server 127.0.0.1
Default server: 127.0.0.1
Address: 127.0.0.1#53
> 127.0.0.1                                     
Server:         127.0.0.1
Address:        127.0.0.1#53

** server can't find 1.0.0.127.in-addr.arpa: SERVFAIL
> localhost
Server:         127.0.0.1
Address:        127.0.0.1#53

Non-authoritative answer:
Name:   localhost.mydomain.com
Address: 127.0.0.1
> fold
Server:         127.0.0.1
Address:        127.0.0.1#53

Non-authoritative answer:
Name:   xx.mydomain.com
Address: xx.xx.xx.xx
> 


So, it does not work by default, did you test it?

Second, I will have to do my homework and figure out why mydomain.com is appended to my forward localhost query.

Please revert this silly change and re-introduce pri/127.zone file.
Comment 4 Martin Mokrejš 2015-03-21 08:54:05 UTC
# cp -p /usr/portage/net-dns/bind/files/127.zone-r1 /chroot/dns/etc/bind/named.conf
# /etc/init.d/named stop
...
# /etc/init.d/named start
 * Starting named ...
 * Checking named configuration ...               
# nslookup
> server 127.0.0.1
Default server: 127.0.0.1
Address: 127.0.0.1#53
> 127.0.0.1
Server:         127.0.0.1
Address:        127.0.0.1#53

1.0.0.127.in-addr.arpa  name = localhost.
> localhost
Server:         127.0.0.1
Address:        127.0.0.1#53

Non-authoritative answer:
Name:   localhost.mydomain.com
Address: 127.0.0.1
> localhost.
Server:         127.0.0.1
Address:        127.0.0.1#53

Name:   localhost
Address: 127.0.0.1
> 
#
Comment 5 Nikoli 2015-03-22 03:26:16 UTC
Martin, it does work fine by default and we did test.
It was broken for you because you did not update your configs and tried to use not existing file:

diff -Naur net-dns/bind/files/named.conf-r{7,8}
...
@@ -131,12 +131,6 @@
        notify no;
 };
 
-zone "127.in-addr.arpa" IN {
-       type master;
-       file "pri/127.zone";
-       notify no;
-};
-
Comment 6 Martin Mokrejš 2015-04-08 17:50:10 UTC
(In reply to Nikoli from comment #5)
> Martin, it does work fine by default and we did test.
> It was broken for you because you did not update your configs and tried to
> use not existing file:

OK, sorry then, it seemed silly to me so I denied the change through etc-update.