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:
Please attach a diff of the zonefile changes you made.
(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.
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.
(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*
; ; 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.
; ; 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
Cut and paste of stock ubuntu db.127 and db.local files. Thats what I used instead of the broken Gentoo ones.
reopen
Fixed in 9.5.1