Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 23rd December 2008, 20:02
rachel rachel is offline
Junior Member
 
Join Date: Sep 2007
Location: Bristol, UK
Posts: 25
Thanks: 2
Thanked 2 Times in 2 Posts
Default [bug] bind, manual entries broken by changes

In a primary DNS zone file I've made a manual entry below the line saying ";;;; MAKE MANUAL ENTRIES BELOW THIS LINE! ;;;; and it gets modified when the file is rewritten after making a change to the zone in the web interface.

The change is that it strips leading whitespace from lines in the manual entries section.

The problem is that the line I have in that section is a third NS record (because ISPConfig only allows entry of two), and if that leading whitespace is stripped out, the whole zone then fails to load when bind is restarted - and I find out about it about a week later when all my hosts suddenly stop resolving as the backup nameservers time out.

Fix required: Make sure the manual entries section is preserved utterly verbatim, do not even strip leading whitespace from lines. :-)
Reply With Quote
Sponsored Links
  #2  
Old 24th December 2008, 10:32
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,504
Thanks: 813
Thanked 5,265 Times in 4,129 Posts
Default

You have to add a newline after the last record and not a whitespace.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 24th December 2008, 11:14
rachel rachel is offline
Junior Member
 
Join Date: Sep 2007
Location: Bristol, UK
Posts: 25
Thanks: 2
Thanked 2 Times in 2 Posts
Default

No, the whitespace that gets stripped is at the *start* of the record.

This is what I put in, which works fine:

Code:
administrator@hinzelmann:~$ cat /etc/bind/pri.strangenoises.org
$TTL        86400
@       IN      SOA     ns0.strangenoises.org. admin.strangenoises.org. (

... etc, etc ...

;;;; MAKE MANUAL ENTRIES BELOW THIS LINE! ;;;;




        NS	ns2.strangenoises.org.	; because ispconfig only lets us enter two


administrator@hinzelmann:~$
(Note also newlines *after* the record.)

The bug is that the spaces on the NS line *before* the NS get stripped out when ISPConfig regenerates the file, and then the zone file is invalid.

So every time I change this zone in ISPConfig I then have to manually edit the file and re-insert those spaces and restart bind before the zone will work again.

You're presumably spooling the contents of the file below the MAKE MANUAL ENTRIES line from the old version of the file to the end of the new one, line by line, and - this is the mistake - you're trimming the not-so-superfluous spaces from the start of each line in the process. You're probably trimming from the end too, but there they really would be superfluous.

NS at the very start of a line in a zone file means the whole zone fails to load when bind is reloaded. But ISPConfig doesn't report the error, it sits silently until any and all backup nameservers have expired and then the domain stops resolving for the world.
Reply With Quote
  #4  
Old 24th December 2008, 12:16
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,504
Thanks: 813
Thanked 5,265 Times in 4,129 Posts
 
Default

Please enter your lines in the full notation like this:

strangenoises.org. NS ns2.strangenoises.org. ;

I will post the issue to the bugtracker.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Permission Denied Bind Slave Server Problems wxman Server Operation 17 22nd March 2014 12:30
BIND: Manual entries in reverse DNS zones Crobler Installation/Configuration 4 2nd July 2008 17:54
Problem on restart bind9 satimis Server Operation 6 30th October 2007 02:01
ISPConfig and BIND on Debian sarge (rfc1912 : failed on zonecheck) arnaud Installation/Configuration 13 6th March 2007 12:40
Bind-Chroot-Howto (Debian) spaz HOWTO-Related Questions 5 9th March 2006 14:50


All times are GMT +2. The time now is 22:49.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.