Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 246175 - net-dns/bind-9.4.2_p2 and ~9.5.0_p2-r1 has broken localhost and 127.0.0.1 zones
Summary: net-dns/bind-9.4.2_p2 and ~9.5.0_p2-r1 has broken localhost and 127.0.0.1 zones
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: BIND Maintainers (DISABLED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-09 15:46 UTC by Steen Eugen "Miravlix" Poulsen
Modified: 2008-12-26 22:28 UTC (History)
0 users

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 Steen Eugen "Miravlix" Poulsen 2008-11-09 15:46:20 UTC
I'm no bind expert, so I'm not sure what the correct fix is, but at the moment nslookup localhost and nslookup 127.0.0.1 fails, even while Gentoo bind defaults to loading those two zones.

Editing 127.zone and localhost.zone, based on whats in the same files on a Ubuntu system, corrects the issue and allows nslookup to work.

The changes I made is:
127.zone change from:
                        1D IN NS        localhost.
1                       1D IN PTR       localhost.

to

@                       1D IN NS        localhost.
1.0.0                   1D IN PTR       localhost.

Added @ and .0.0
@               IN      NS      ns
ns              IN      A       127.0.0.1

ns              IN      AAAA    ::1

to:

localhost.zone changes from:
@               IN      NS      localhost.
@               IN      A       127.0.0.1
@               IN      AAAA    ::1

While this works to resolve the problem, I'm sure someone who actually knows what each line means could make better sense of it and write something cleaner.


Reproducible: Always

Steps to Reproduce:
Comment 1 Tobias Scherbaum (RETIRED) gentoo-dev 2008-11-09 16:15:34 UTC
Please attach a diff of the zonefile changes you made.
Comment 2 Steen Eugen "Miravlix" Poulsen 2008-11-09 16:21:49 UTC
(In reply to comment #1)
> Please attach a diff of the zonefile changes you made.
> 

As I said I do not believe my changes is correct (even if it works for my system), so I wont be making a diff of it. Someone with better bind experience need to make the correct changes to make nslookup 127.0.0.1 localhost and nslookup localhost localhost work.
Comment 3 Steen Eugen "Miravlix" Poulsen 2008-11-09 17:28:46 UTC
Well, odd to say the least to mark it this way, I do not see how I can better describe the fact that both 127.zone and localhost.zone is incorrect and does not provide the data needed for the bind server to lookup localhost and 127.0.0.1.

Anyone can do an emerge bind bind-tools;/etc/init.d/named start;nslookup localhost localhost;nslookup 127.0.0.1 localhost to see that the files is broken and thus verify the error.

Maybe someone more competent should maintain bind if the bind team is unable to make correct .zone files, since you seem to suggest you need me to provide the correct zone file, something I'm not comfortable doing, because I do not believe I have the experience to make zone files.
Comment 4 Tobias Scherbaum (RETIRED) gentoo-dev 2008-11-09 17:38:39 UTC
(In reply to comment #3)
> Well, odd to say the least to mark it this way, I do not see how I can better
> describe the fact that both 127.zone and localhost.zone is incorrect and does
> not provide the data needed for the bind server to lookup localhost and
> 127.0.0.1.

Well, you said you made some changes to get something working which wasn't working before. You pasted some stuff to that bug (which i suspect is part of the changes you made) and i asked for a diff to make those changes you did a tad more easily visible. 

> Maybe someone more competent should maintain bind if the bind team is unable to
> make correct .zone files, since you seem to suggest you need me to provide the
> correct zone file, something I'm not comfortable doing, because I do not
> believe I have the experience to make zone files.

I'm not suggesting you to provide some "correct" zone file, just a diff between the (broken?) current zones and the ones which were working for you. *sigh*
Comment 5 Steen Eugen "Miravlix" Poulsen 2008-11-09 17:56:02 UTC
;                                                                                                                                   
; BIND reverse data file for local loopback interface
;                                                                                                                                   
$TTL    604800
@       IN      SOA     localhost. root.localhost. (                                                                                
                              1         ; Serial
                         604800         ; Refresh                                                                                   
                          86400         ; Retry
                        2419200         ; Expire                                                                                    
                         604800 )       ; Negative Cache TTL
;                                                                                                                                   
@       IN      NS      localhost.
1.0.0   IN      PTR     localhost.  
Comment 6 Steen Eugen "Miravlix" Poulsen 2008-11-09 17:56:55 UTC
;                                                                                                                                   
; BIND data file for local loopback interface
;                                                                                                                                   
$TTL    604800
@       IN      SOA     localhost. root.localhost. (
                              2         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      localhost.
@       IN      A       127.0.0.1
@       IN      AAAA    ::1
Comment 7 Steen Eugen "Miravlix" Poulsen 2008-11-09 17:58:47 UTC
Cut and paste of stock ubuntu db.127 and db.local files.

Thats what I used instead of the broken Gentoo ones.
Comment 8 Tobias Scherbaum (RETIRED) gentoo-dev 2008-12-26 22:28:03 UTC
reopen
Comment 9 Tobias Scherbaum (RETIRED) gentoo-dev 2008-12-26 22:28:11 UTC
Fixed in 9.5.1