<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The cPanel Admin &#187; dns</title>
	<atom:link href="http://www.thecpaneladmin.com/tag/dns/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thecpaneladmin.com</link>
	<description>We know stuff about cPanel.</description>
	<lastBuildDate>Mon, 21 Nov 2011 19:50:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Setting Up Wildcard DNS with cPanel</title>
		<link>http://www.thecpaneladmin.com/setting-up-wildcard-dns-with-cpanel/</link>
		<comments>http://www.thecpaneladmin.com/setting-up-wildcard-dns-with-cpanel/#comments</comments>
		<pubDate>Fri, 21 May 2010 21:55:19 +0000</pubDate>
		<dc:creator>Vanessa</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://www.thecpaneladmin.com/?p=468</guid>
		<description><![CDATA[Wildcard DNS allows a server to display and combination of subdomains for a website. For example, wildcard DNS for thecpaneladmin.com will allow any subdomain to resolve to this website, even if they have not been specifically created.  Subdomains that have been created individually in cPanel will still route to their respective folders, but anything else [...]


Related posts:<ol><li><a href='http://www.thecpaneladmin.com/wildcard-ssl-installation-script/' rel='bookmark' title='Wildcard SSL Installation Script'>Wildcard SSL Installation Script</a></li>
<li><a href='http://www.thecpaneladmin.com/installing-wildcard-ssl-certificate/' rel='bookmark' title='Installing A Wildcard SSL Certificate'>Installing A Wildcard SSL Certificate</a></li>
<li><a href='http://www.thecpaneladmin.com/assign-multiple-ip-addresses-one-account/' rel='bookmark' title='Assign Multiple IP Addresses on One Account'>Assign Multiple IP Addresses on One Account</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Wildcard DNS allows a server to display and combination of subdomains for a website. For example, wildcard DNS for thecpaneladmin.com will allow any subdomain to resolve to this website, even if they have not been specifically created.  Subdomains that have been created individually in cPanel will still route to their respective folders, but anything else will go to the document root of the domain the subdomains are based on. Wildcard DNS is most used for implementation of applications like <a href="http://mu.wordpress.org/" target="_blank">WordPress MU</a>. To set up wildcard DNS:</p>
<p>In the DNS zone for the parent domain, simply create an A  or CNAME record for *. For example, either of these will work:</p>
<blockquote><p>*   IN   A   5.5.5.5</p>
<p>*   IN CNAME mywebsite.com.</p></blockquote>
<p>Now on the server, edit /var/cpanel/userdata/$user/$parentdomain, and look for the serveralias line. This is where the parked domains/aliases for a domain are listed, so you just need to append *.parentdomain to the same line. A serveraliase line for thecpaneladmin.com may look like this:</p>
<p>serveralias: www.thecpaneladmin.com thecpaneladmin.net www.thecpaneladmin.net *.thecpaneladmin.com</p>
<p>Now run:</p>
<blockquote><p>/scripts/rebuildhttpdconf</p></blockquote>
<p>And restart Apache. You can test the Wildcard subdomains by going to any subdomain of the parent domain, and it should go to the parent domain&#8217;s site. This may not be what you wanted it to do though. With wildcard DNS and virtualhosts, you need an .htaccess rewrite to redirect the subdomains. For example:</p>
<p><code>&lt;IfModule mod_rewrite.c&gt;<br />
Options +FollowSymLinks<br />
Options +Indexes<br />
RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{HTTP_HOST} !www.domain.com$ [NC]<br />
RewriteCond  %{HTTP_HOST} ^(www.)?([a-z0-9-]+).domain.com [NC]<br />
RewriteRule (.*)  %2/$1 [L]<br />
&lt;/IfModule&gt;</code></p>
<p>In the above example, if your subdomain is test.domain.com, the rewrite will send you to http://domain.com/test/page.html. You can modify the rewrite accordingly to achieve the results you want.</p>
<p>Keep in mind that the Apache configuration has to be done by someone with access to the user&#8217;s Apache config files, as you can&#8217;t add *.domain.com to cPanel as a subdomain or parked domain at this time. cPanel may change this in the future, but for now it&#8217;s something that the end user cannot do without administrator access.</p>
<p><map name='google_ad_map_468_78e79355861d63ba'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/468?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_468_78e79355861d63ba' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=468&amp;url= http%3A%2F%2Fwww.thecpaneladmin.com%2Fsetting-up-wildcard-dns-with-cpanel%2F' /></p><img src="http://www.thecpaneladmin.com/?ak_action=api_record_view&id=468&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.thecpaneladmin.com/wildcard-ssl-installation-script/' rel='bookmark' title='Wildcard SSL Installation Script'>Wildcard SSL Installation Script</a></li>
<li><a href='http://www.thecpaneladmin.com/installing-wildcard-ssl-certificate/' rel='bookmark' title='Installing A Wildcard SSL Certificate'>Installing A Wildcard SSL Certificate</a></li>
<li><a href='http://www.thecpaneladmin.com/assign-multiple-ip-addresses-one-account/' rel='bookmark' title='Assign Multiple IP Addresses on One Account'>Assign Multiple IP Addresses on One Account</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.thecpaneladmin.com/setting-up-wildcard-dns-with-cpanel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Resolving Domain Park Wrapper Errors</title>
		<link>http://www.thecpaneladmin.com/resolving-domain-park-wrapper-errors/</link>
		<comments>http://www.thecpaneladmin.com/resolving-domain-park-wrapper-errors/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 00:06:32 +0000</pubDate>
		<dc:creator>Vanessa</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[fixes]]></category>
		<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">http://www.thecpaneladmin.com/?p=189</guid>
		<description><![CDATA[If you run a more populated shared hosting server, sooner or later you'll have received complaints about the dreaded park wrapper errors in cPanel that occur when a user tries to add a parked or addon domain to their cPanel


Related posts:<ol><li><a href='http://www.thecpaneladmin.com/php-500-internal-server-errors/' rel='bookmark' title='PHP 500 Internal Server Errors'>PHP 500 Internal Server Errors</a></li>
<li><a href='http://www.thecpaneladmin.com/quota-errors-in-exims-panic-log/' rel='bookmark' title='Quota Errors in Exim&#8217;s Panic Log'>Quota Errors in Exim&#8217;s Panic Log</a></li>
<li><a href='http://www.thecpaneladmin.com/accessing-cpanel-through-firewall/' rel='bookmark' title='Accessing cPanel Through A Firewall'>Accessing cPanel Through A Firewall</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>If you run a more populated shared hosting server, sooner or later you&#8217;ll have received complaints about the dreaded park wrapper errors in cPanel that occur when a user tries to add a parked or addon domain to their cPanel. The errors may look like this:</p>
<p><code>Error from domain wrapper: domain.com is owned by another user. </code></p>
<p><code>Error from domain wrapper: Domain already exists, it was not added.</code></p>
<p>I&#8217;ve never really been able to attribute that error to a specific action, but my assumption is that it occurs as a result of the end user not completely removing the domain from their cPanel (i.e. hitting esc or closing the browser during removal), therefore not allowing cPanel to remove the domain&#8217;s entries to allow that domain to be re-added when certain security settings are enabled in WHM &gt; Tweak Settings.</p>
<p>The easy solution to the first error is to enable the option for users to add domains owned by other users via WHM &gt; Tweak Settings. But this is a <em>very bad idea</em> as it essentially allows users to repoint domains that you&#8217;re already hosting.</p>
<p>If you&#8217;re attempting to re-add a domain to a cPanel account and are getting one of the above errors, first check that the error needs to be corrected. Meaning, make sure that the domain in question isn&#8217;t already set up elsewhere. If it is, you would need to remove it from that account before being able to add it to another.</p>
<p>If the error is actually occurring due to an improperly removed domain, follow the below steps until you are able to add the domain back to the server:</p>
<ol>
<li>run <strong>/scripts/killdns &lt;domain&gt;</strong> on the server to remove the DNS records from the DNS cluster</li>
<li>do <strong>grep -r &lt;domain&gt; /var/cpanel/users</strong> to see if it exists in a user file, and if so, delete the entry and run <strong>/scripts/updateuserdomains</strong>, make sure it&#8217;s remove from /etc/userdomains</li>
<li><strong>grep -r &lt;domain&gt; /var/cpanel/userdata</strong> to see if the domain appears in a user&#8217;s template. If so, remove any files based on the domain name (including .cache files), and remove any subdomain/parked/addon domain entries for that domain from the &#8216;main&#8217; file located in that user&#8217;s folder (i.e. /var/cpanel/templates/username/main), then <strong>/scripts/rebuildhttpconf</strong> to remove it from httpd.conf .</li>
</ol>
<p>This should allow you to re-add the domain name to the user&#8217;s cPanel without getting the park wrapper error.</p>
<p><map name='google_ad_map_189_78e79355861d63ba'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/189?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_189_78e79355861d63ba' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=189&amp;url= http%3A%2F%2Fwww.thecpaneladmin.com%2Fresolving-domain-park-wrapper-errors%2F' /></p><img src="http://www.thecpaneladmin.com/?ak_action=api_record_view&id=189&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.thecpaneladmin.com/php-500-internal-server-errors/' rel='bookmark' title='PHP 500 Internal Server Errors'>PHP 500 Internal Server Errors</a></li>
<li><a href='http://www.thecpaneladmin.com/quota-errors-in-exims-panic-log/' rel='bookmark' title='Quota Errors in Exim&#8217;s Panic Log'>Quota Errors in Exim&#8217;s Panic Log</a></li>
<li><a href='http://www.thecpaneladmin.com/accessing-cpanel-through-firewall/' rel='bookmark' title='Accessing cPanel Through A Firewall'>Accessing cPanel Through A Firewall</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.thecpaneladmin.com/resolving-domain-park-wrapper-errors/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>cPanel Command Line DNS and Cluster Management</title>
		<link>http://www.thecpaneladmin.com/cpanel-command-line-dns-cluster-management/</link>
		<comments>http://www.thecpaneladmin.com/cpanel-command-line-dns-cluster-management/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 21:28:12 +0000</pubDate>
		<dc:creator>Vanessa</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[whm]]></category>

		<guid isPermaLink="false">http://www.thecpaneladmin.com/?p=181</guid>
		<description><![CDATA[DNS clustering is part of setting up a server environment. cPanel has built-in support for DNS clustering to make it easy to deploy centralized nameservers, or have multiple nameservers receive DNS zone updates from one server. This article will help you understand setting up and managing a DNS cluster from command line. Setting up a [...]


Related posts:<ol><li><a href='http://www.thecpaneladmin.com/configuring-pureftp/' rel='bookmark' title='Command Line PureFTP Configuration on cPanel'>Command Line PureFTP Configuration on cPanel</a></li>
<li><a href='http://www.thecpaneladmin.com/assign-ip-multiple-cpanel-accounts/' rel='bookmark' title='How to Assign an IP To Multiple cPanel Accounts'>How to Assign an IP To Multiple cPanel Accounts</a></li>
<li><a href='http://www.thecpaneladmin.com/changing-shared-ip-address-live-server/' rel='bookmark' title='Changing the Shared IP Address of a Live Server'>Changing the Shared IP Address of a Live Server</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>DNS clustering is part of setting up a server environment. cPanel has built-in support for DNS clustering to make it easy to deploy centralized nameservers, or have multiple nameservers receive DNS zone updates from one server. This article will help you understand setting up and managing a DNS cluster from command line.</p>
<h2>Setting up a Cluster</h2>
<p><strong><em>From the remote nameserver:</em></strong></p>
<p>You generally don&#8217;t need to do anything other than enable clustering in WHM. You want the client servers to sync TO this server, not from it. Most of the time, the remote server will be your primary nameserver running cPanel DNSONLY.<span id="more-181"></span></p>
<p><strong><em>From the client:</em></strong></p>
<p>There are a few files involved in setting up a DNS cluster. Keep in mind that novice users may prefer to use WHM  &gt; Configure Cluster, but this article is focused on the command line.</p>
<ul>
<li>/var/cpanel/cluster/root/config/xxx.xxx.xxx.xxx : The file (named after the IP of the remote nameserver) containing the user, hostname, and remote hash</li>
<li>/var/cpanel/cluster/root/config/xxx.xxx.xxx.xxx-dnsrole : The file containing the sync action to the remote nameserver (standalone or sync)</li>
<li>/etc/wwwacct.conf : File containing the delegated nameservers for new zones created</li>
<li>/var/cpanel/resellers-nameservers : list of nameservers for resellers (overrides /etc/wwwacct.conf for zones created by accounts for that reseller)</li>
<li>/var/cpanel/useclusteringdns : Blank file indicating that DNS clustering is enabled (presence of file indicates yes, absence indicates no)</li>
</ul>
<p>If the server is also going to be a nameserver itself, you will need to enable named in <strong>WHM &gt; Service Manager</strong> (/etc/chkserv.d/chkservd.conf, set named to &#8217;1&#8242;).</p>
<p>1)  Create a file in /var/cpanel/cluster/root/config as the IP of the remote server. Get the remote access hash for the remote nameserver (/root/.accesshash, located on the remote server) and add it to the file under the cluster user (assuming &#8216;root&#8217;) and its hostname. In this case, the remote server&#8217;s IP is 6.7.8.9, so I&#8217;m going to create a file called /var/cpanel/cluster/root/config/6.7.8.9 and have it contain:</p>
<pre><code>root
ns1.mynameserver.com
1429r23c1fdec38012a574be14382fd5
14f24bc86f86af9273575677c53aff83
4dc0d2d24cc8b1a7fe275acdb18e8ae8
71298146e796566a0a9fa0ea92644f11
aeceeb5f6eb489f2bb477b783a5a97c0
b24644193bb58b682c28113aa1e0e79f
59b190962fca3fcb2efb13d58d103374
3b68072ffe65a2a58cfa285fa69edeae
aff9e1922e0664acb86698c2c2884191
6cd9bd139252ec83833d07337117b898
ac071d28446cae6531e4dbeebdbe1aa2
511a689a4e2b24c7880a113694618920
a690f5b6bca11863fbc0d5b0d9a0a110
2b75426ca67984898afb71fc86c3ad75
c4a435525fc0f393ec317adbcbf4b99a
ce4b64d04c2f23766ecfb1ca4c9d09ac
36f66070c2ed55362338a1d26315c37a
91af3d1723149727d2e1756233340a57
4d1432bbfa61356b8a4b656abe817cb5
80d40d86c23cc3f4f86e74766c6d1cd6
66d2a4f89773beb02e6f856c9ae13e29
ca3e12219298e51d92f7ee9e7c645b27
dc70e2c151be6d4949d38379f6897d84
1fa9afec98cd6965300a058d77fd792b
5f47b6b791c8739ac4a18064a4420455
cc4bdf1ccf0e91d30fa7fa23b0efd168
2546f63b55f385bab0910711476ddc3e
8ec406c3e388a5639d1f71fd3f47ae8f
b2ebc449921c906602963ed802ca20e1

</code></pre>
<p>*Keep in mind that if you&#8217;re a user other than root, you&#8217;d substitute &#8216;root&#8217; in the path name for the actual user setting up the cluster.</p>
<p>All of this can also be done via WHM &gt; Configure Cluster as well.</p>
<h2>Managing DNS Zones</h2>
<p><strong>Synchronize a zone:</strong></p>
<p>You generally want to synchronize a zone if changes were made and you want to push it out to your nameserver cluster. This is essentially the same as going into WHM &gt; Synchronize DNS Records:</p>
<blockquote><p>/scripts/dnscluster</p></blockquote>
<p>Running this command by itself will give you a list of options for synchronizing, just as you get in WHM:</p>
<ul>
<li>syncall : sync all zones with all cluster servers. This will find the zone with the largest serial and copy it to all nameservers in the cluster</li>
<li>syncalllocal : Finds the zone in the cluster with the highest serial number and copies it to the local server only (instead of to all servers in the cluster) &#8211; /scripts/dnscluster syncalllocal &#8211;full</li>
<li>synczone : Syncs one zone to all servers in the cluster, using the zone with the highest serial number throughout the cluster</li>
<li>synczonelocal &#8211; Syncs one zone locally, using the zone with the highest serial number throughout the cluster</li>
</ul>
<p>So for instance, if you have a zone for mydomain.com on your hosting server and you want to synchronize it to all the nameservers in your cluster, you&#8217;d run:</p>
<blockquote><p>/scripts/dnscluster synczone domain.com</p></blockquote>
<p><strong>Edit a DNS Zone:</strong></p>
<p>To edit a zone, open /var/named/domainname.com.db in a text editor and make your changes. Remember to increment the serial number up by one, so that the correct zone it sync&#8217;ed to the nameserver cluster. The serial looks like this:</p>
<pre>; cPanel 11.24.4-STABLE_36281
; Zone file for domainnmame.com
$TTL 14400
@      86400	IN      SOA     ns.mynameserver.com. me.mynameserver.com. (
<strong>		2009082500	; serial, todays date+todays</strong>
		86400		; refresh, seconds
		7200		; retry, seconds
		3600000		; expire, seconds
		86400 )		; minimum, seconds</pre>
<p>Then use <strong>/scripts/dnscluster</strong> to copy the zone up to your nameserver cluster. (see above examples)</p>
<p><strong>Removing a DNS zone:</strong></p>
<blockquote><p>/scripts/killdns domainname.com</p></blockquote>
<p><strong>Adding a DNS zone:</strong></p>
<blockquote><p>/scripts/adddns &#8211;domain domainname.com</p></blockquote>
<p>You can also use the  <em>&#8211;ip</em> and <em>&#8211;reseller</em> flags to indicate what IP and nameservers to use. For usage, just run <strong>/scripts/adddns</strong> and the help will display.</p>
<h2>Additional resources:</h2>
<p><a href="http://docs.cpanel.net/twiki/bin/view/AllDocumentation/WHMDocs/ConfigureCluster" target="_blank">http://docs.cpanel.net/twiki/bin/view/AllDocumentation/WHMDocs/ConfigureCluster</a></p>
<p><a href="http://twiki.cpanel.net/twiki/pub/AllDocumentation/TrainingResources/TrainingSlides09/DNS_Cluster_Configuration.pdf" target="_blank">http://twiki.cpanel.net/twiki/pub/AllDocumentation/TrainingResources/TrainingSlides09/DNS_Cluster_Configuration.pdf</a></p>
<p><map name='google_ad_map_181_78e79355861d63ba'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/181?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_181_78e79355861d63ba' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=181&amp;url= http%3A%2F%2Fwww.thecpaneladmin.com%2Fcpanel-command-line-dns-cluster-management%2F' /></p><img src="http://www.thecpaneladmin.com/?ak_action=api_record_view&id=181&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.thecpaneladmin.com/configuring-pureftp/' rel='bookmark' title='Command Line PureFTP Configuration on cPanel'>Command Line PureFTP Configuration on cPanel</a></li>
<li><a href='http://www.thecpaneladmin.com/assign-ip-multiple-cpanel-accounts/' rel='bookmark' title='How to Assign an IP To Multiple cPanel Accounts'>How to Assign an IP To Multiple cPanel Accounts</a></li>
<li><a href='http://www.thecpaneladmin.com/changing-shared-ip-address-live-server/' rel='bookmark' title='Changing the Shared IP Address of a Live Server'>Changing the Shared IP Address of a Live Server</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.thecpaneladmin.com/cpanel-command-line-dns-cluster-management/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

