Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 15637 - Default BIND configuration wrong
Summary: Default BIND configuration wrong
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Nick Hadaway
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-13 11:15 UTC by Rich Edelman
Modified: 2003-02-15 00:43 UTC (History)
2 users (show)

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


Attachments
Diff against named.conf (named.conf.diff,406 bytes, patch)
2003-02-13 15:39 UTC, Rich Edelman
Details | Diff
127.0.0 patch (127.diff,536 bytes, patch)
2003-02-13 15:40 UTC, Rich Edelman
Details | Diff
ebuild patch (bind.ebuild.diff,816 bytes, patch)
2003-02-13 15:42 UTC, Rich Edelman
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rich Edelman 2003-02-13 11:15:49 UTC
This is pretty simple really. The default BIND configuration only responds to 127.0.0.1 
as localhost, and lets anything else go all the way to the root nameservers. In fact, 
BIND should be configured so that 127.* is localhost. 
 
To fix, change 2 files... /etc/bind/named.conf, change the line: 
zone "0.0.127.in-addr.arpa" IN { 
to 
zone "127.in-addr.arpa" IN { 
 
and in the file /var/bind/pri/127.0.0, change: 
$ORIGIN 0.0.127.in-addr.arpa. 
to 
$ORIGIN 127.in-addr.arpa. 
 
and the last line: 
1		1D IN PTR	localhost. 
to 
*		1D IN PTR localhost.
Comment 1 Rich Edelman 2003-02-13 15:39:31 UTC
Created attachment 8247 [details, diff]
Diff against named.conf

This is a diff against ${FILESDIR}/named.conf. It changes the lines I mentioned
in the original report as well as changes the file looked at for the
127.in-addr stuff to 127 instead of 127.0.0. Applies against bind-9.2.2_rc1-r1.
Comment 2 Rich Edelman 2003-02-13 15:40:49 UTC
Created attachment 8248 [details, diff]
127.0.0 patch

Here's a patch to apply against ${FILESDIR}/127.0.0. It fixes the $ORIGIN line
and the last line of the file (changes the 1 to a *).
Comment 3 Rich Edelman 2003-02-13 15:42:00 UTC
Created attachment 8249 [details, diff]
ebuild patch

This patch applies against the bind-9.2.2_rc1-r1 ebuild itself. Changes 1 line.
The ebuild will now insert a file called 127 instead of 127.0.0.
Comment 4 Rich Edelman 2003-02-13 15:43:22 UTC
As you see, I supplied 3 patches to fix this. (I prefer small seperate patches to big ones, sorry.) The 
only thing I didn't do was supply a new file called 127 itself... just apply the 127.0.0 patch and 
rename the patched file. 
Comment 5 Nick Hadaway 2003-02-15 00:43:17 UTC
bind-9.2.2-rc1-r2 is now in portage with your suggested changes.
Thanks for noticing the finer details :)