Aspegic
Verified User
- Joined
- Aug 4, 2005
- Messages
- 282
Bug in DirectAdmin DNS/nameserver setup
I found a small bug in DirectAdmin while researching a problem a user had posted in this forum.
How to reproduce the problem:
Only a single IP address is assigned to the server (e.g. the IP Manager only shows 1 IP address).
Go to the reseller level, click 'Nameservers', select the IP address and click the "Create" button. (The control panel allows this even though only one IP address is selected.)
This will result in a corrupted zone file, like this:
	
	
	
		
	
	
	
		
So either DirectAdmin should not allow the user to create nameservers if only 1 IP address is selected, or, preferably, create only a single nameserver with the selected IP address.
I understand that this is a user error. Afterall this feature is designed to work with 2 IP addresses. Nevertheless some users will try it with just a single IP address and that should not result in a corrupted zone file.
				
			I found a small bug in DirectAdmin while researching a problem a user had posted in this forum.
How to reproduce the problem:
Only a single IP address is assigned to the server (e.g. the IP Manager only shows 1 IP address).
Go to the reseller level, click 'Nameservers', select the IP address and click the "Create" button. (The control panel allows this even though only one IP address is selected.)
This will result in a corrupted zone file, like this:
		Code:
	
	This is how it looks in DNS Administration
ftp              A    66.51.122.131	
localhost        A    127.0.0.1	
mail             A    66.51.122.131	
ns1.domain.com.  A    66.51.122.131	
[COLOR=red]ns2.domain.com.  A    [b]pop 14400 IN A 66.51.122.131[/b][/COLOR] 
domain.com.      A    66.51.122.131	
www              A    66.51.122.131	
domain.com.      NS   ns1.domain.com.	
domain.com.      NS   ns2.domain.com.	
mail             MX   10	
domain.com.      TXT  [b]"v=spf1 a mx ip4: ?all"[/b]
		Code:
	
	This is the resulting domain.com.db file
$TTL 14400
@                     IN  SOA ns1.domain.com. root.domain.com. (
                                          2006042601
                                          7200
                                          3600
                                          1209600
                                          86400 )
domain.com.	    14400	IN  NS  ns1.domain.com.
domain.com.	    14400	IN  NS  ns2.domain.com.
ftp	            14400	IN  A   66.51.122.131
localhost	    14400	IN  A   127.0.0.1
mail	            14400	IN  A   66.51.122.131
ns1.domain.com.	    14400	IN  A   66.51.122.131
[COLOR=red]ns2.domain.com.     14400	IN  A	
pop	            14400	IN  A   66.51.122.131[/color]
domain.com.	    14400	IN  A   66.51.122.131
www	            14400	IN  A   66.51.122.131
domain.com.	    14400	IN  MX  10 mail
domain.com.	    14400	IN  TXT	"v=spf1 a mx ip4: ?all"So either DirectAdmin should not allow the user to create nameservers if only 1 IP address is selected, or, preferably, create only a single nameserver with the selected IP address.
I understand that this is a user error. Afterall this feature is designed to work with 2 IP addresses. Nevertheless some users will try it with just a single IP address and that should not result in a corrupted zone file.
			
				Last edited: 
			
		
	
								
								
									
	
								
							
							 
 
		 
 
		 
 
		