<?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>Tech Help Blog &#187; Hosting Tech (Cpanel/Linux)</title>
	<atom:link href="http://www.techhelpblog.com/category/hosting-technical/hosting-tech-cpanel-centos-linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.techhelpblog.com</link>
	<description>A Technical Support Blog</description>
	<lastBuildDate>Mon, 23 Jan 2012 23:00:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>WordPress Fatal error: Allowed memory size of issue and how to fix it</title>
		<link>http://www.techhelpblog.com/2011/10/02/wordpress-fatal-error-allowed-memory-size-issue-fix/</link>
		<comments>http://www.techhelpblog.com/2011/10/02/wordpress-fatal-error-allowed-memory-size-issue-fix/#comments</comments>
		<pubDate>Sat, 01 Oct 2011 14:28:34 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Hosting Tech (Cpanel/Linux)]]></category>
		<category><![CDATA[Web Developer Tech Help]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[fatal error]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[php.ini]]></category>
		<category><![CDATA[SetEnv PHPRC]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.techhelpblog.com/?p=308</guid>
		<description><![CDATA[So I have run into this issue with some wordpress sites more often of late, I guess shared hosting servers or similar are tightening their reign on memory allocation? In any case, funnily enough, as I went to post this very post I received the same Fatel error on TechHelp Blog!! So I had to perform my [...]]]></description>
			<content:encoded><![CDATA[<p>So I have run into this issue with some wordpress sites more often of late, I guess shared hosting servers or similar are tightening their reign on memory allocation? In any case, funnily enough, as I went to post this very post I received the same Fatel error on TechHelp Blog!! So I had to perform my fix to gain access to tell you all how I did it! So this is really only going to work on a LAMP server and even then only on a hosting platform that allows environment variables for php.ini to at least some degree. Basically we are placing a php.ini file in our root directory and referencing it in our .htaccess file. And here&#8217;s how.</p>
<h3>Edit your .htaccess file in the public_html folder on your website having the issue.</h3>
<blockquote>
<h3><span style="font-size: 13px; font-weight: normal;">At the very top of the file put in the following<br />
</span><span style="font-size: 13px; font-weight: normal;"><strong>SetEnv PHPRC /home/username/public_html/ </strong>&lt;- replace the address with the base address of where you are intending to put the php.ini file we are creating next. Save the file.</span></h3>
</blockquote>
<h3><strong><span style="font-size: 13px;">Create a new file in the location you assigned in the last step called php.ini ensure it has secure permissions. Please the following text in the php.ini file and save it.</span></strong></h3>
<blockquote><p><strong>memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)</strong></p></blockquote>
<p>And that should have your issue resolved!</p>
<p>Questions in the comments, Cheers! <img src='http://www.techhelpblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><span style="font-size: 13px; font-weight: normal;"><br />
</span></p>
<p><span style="font-size: 13px; font-weight: normal;"><br />
</span></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techhelpblog.com/2011/10/02/wordpress-fatal-error-allowed-memory-size-issue-fix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install ImageMagick on CPanel plus How to install Imagick on CPanel as a PECL Package from WHM</title>
		<link>http://www.techhelpblog.com/2011/01/05/install-imagemagick-on-cpanel-install-imagick-pecl-whm/</link>
		<comments>http://www.techhelpblog.com/2011/01/05/install-imagemagick-on-cpanel-install-imagick-pecl-whm/#comments</comments>
		<pubDate>Wed, 05 Jan 2011 09:09:26 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Hosting Tech (Cpanel/Linux)]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[imagemagick]]></category>
		<category><![CDATA[imagick]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[pecl]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[techhelp]]></category>
		<category><![CDATA[whm]]></category>

		<guid isPermaLink="false">http://www.techhelpblog.com/?p=191</guid>
		<description><![CDATA[Learn how to install ImageMagick on CPanel using Shell/Console and the CPanel Script. Also how to install Imagick on CPanel using WHM module installer]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.imagemagick.org/"><img class="alignleft" title="ImageMagick" src="http://www.imagemagick.org/image/wizard.jpg" alt="" width="114" height="118" /></a>This is a quick howto on installing ImageMagick on a CPanel Server using the CPanel provided script. I&#8217;ll get right to it.</p>
<p>On the console/shell of the server enter the following command to check it ImageMagick is installed<br />
<span style="color: #008080;">#  /scripts/checkimagemagick</span></p>
<p>The output if installed will be &#8220;ok&#8221;</p>
<p>If it is not installed, type in the following<br />
<span style="color: #008080;"># /scripts/installimagemagick</span></p>
<p>This will take a little while to install depending on server speed and internet speed. Once completed it will say &#8220;<strong>ImageMagick installed ok</strong>&#8221; Then we can check the version to ensure it is installed correctly using the following command<br />
<span style="color: #008080;"># /usr/bin/convert &#8211;version</span></p>
<p>The output should have the ImageMagick Version details and Copyright details.</p>
<p>Now How to install<a title="Imagick PECL Package" href="http://pecl.php.net/package/imagick" target="_blank"> Imagick</a> on <a title="CPanel" href="http://www.cpanel.com/" target="_blank">CPanel</a> using WHM PECL Module install.</p>
<p><strong>Go to WHM -&gt; Software -&gt; Module Installers -&gt;PHP PECL Manage</strong></p>
<p><img class="size-full wp-image-192 alignnone" title="cpanel-software-whm" src="http://www.techhelpblog.com/wp-content/uploads/2011/01/cpanel-software-whm.jpg" alt="" width="217" height="161" /><a href="http://www.techhelpblog.com/wp-content/uploads/2011/01/cpanel-software-pecl-whm.jpg"><img class="size-full wp-image-193 alignnone" title="cpanel-software-pecl-whm" src="http://www.techhelpblog.com/wp-content/uploads/2011/01/cpanel-software-pecl-whm.jpg" alt="" width="367" height="123" /></a></p>
<p><a href="http://www.techhelpblog.com/wp-content/uploads/2011/01/cpanel-software-pecl-imagick.jpg"><img class="size-full wp-image-194 alignleft" title="cpanel-software-pecl-imagick" src="http://www.techhelpblog.com/wp-content/uploads/2011/01/cpanel-software-pecl-imagick.jpg" alt="" width="313" height="175" /></a> <strong>Type in <span style="color: #008080;">imagick</span> in the Install a PHP Pecl and click Install.</strong></p>
<p>Job Done!</p>
<p>Hope That helps. Any questions please put them in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techhelpblog.com/2011/01/05/install-imagemagick-on-cpanel-install-imagick-pecl-whm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to limit processes or memory usage per user based on time and memory in CPanel using CSF</title>
		<link>http://www.techhelpblog.com/2010/11/12/limit-processes-memory-usage-user-based-time-memory-cpanel-csf/</link>
		<comments>http://www.techhelpblog.com/2010/11/12/limit-processes-memory-usage-user-based-time-memory-cpanel-csf/#comments</comments>
		<pubDate>Fri, 12 Nov 2010 08:02:42 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Hosting Tech (Cpanel/Linux)]]></category>
		<category><![CDATA[config server]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[csf]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[kill process]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[memory overrun]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[techhelp]]></category>

		<guid isPermaLink="false">http://www.techhelpblog.com/?p=169</guid>
		<description><![CDATA[So here it is, how to limit processes or memory usage on a CPanel server based on time or total memory consumption per user account using Config Server Firewall (CSF)]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.configserver.com/cp/csf.html"><img class="alignleft size-full wp-image-172" title="Config Server Logo" src="http://www.techhelpblog.com/wp-content/uploads/2010/11/csf_large.png" alt="" width="254" height="102" /></a>I recently ran into a memory overrun issue on one of my &#8220;dedicated&#8221; CPanel servers, given they are deployed to host only a handful of company sites specific to one user I usually don&#8217;t deploy memory/process limiting as you would in a shared CPanel environment. With the server non responsive and multiple memory overrun and process not responding emails from the box I had to do something to prevent this one user/website taking down the entire box. So here it is, how to limit processes or memory usage on a CPanel server based on time or total memory consumption per user account</p>
<p>This is based on<a title="Config Server Firewall for CPanel" href="http://www.configserver.com/cp/csf.html" target="_blank"> CSF (Config Server Firewall)</a> which comes highly recommended by myself and will be included in my CPanel install How-to doco&#8217;s that I&#8217;ll be releasing when I get time to finish them! <img src='http://www.techhelpblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<ol>
<li><strong>Head to CSF Firewall Configuration and find the options starting from <em>PT_USERPROC</em>.</strong> see images below.<br />
<img class="aligncenter size-full wp-image-170" title="Config Server Firewall Configuration" src="http://www.techhelpblog.com/wp-content/uploads/2010/11/techhelp-csf-1.png" alt="" width="549" height="165" /><br />
<img class="aligncenter size-full wp-image-171" title="Config Server Firewall Configuration menu" src="http://www.techhelpblog.com/wp-content/uploads/2010/11/techhelp-csf-2.png" alt="" width="579" height="250" /></li>
<li>Change the settings in the below fields to your desired levels, take a moment to read the descriptions as the ones I have recommended here might not be viable for your setup.</li>
<blockquote><p>PT_USERPROC = 20<br />
PT_USERMEM = 300<br />
PT_USERTIME = 900<br />
PT_USERKILL = 1<br />
PT_USERKILL_ALERT = 1</p></blockquote>
<p>Basically this is saying that any process under a specific user runnning for more than 900 seconds will trigger the user process kill and stop all processes under that user. It will also separately trigger the process kill for ALL processes under the specific user should that users TOTAL memory usage be over 300MB. The PT_USERKILL value sets where the process&#8217;s are killed or not, and the PT_USERKILL_ALERT value says whether you are emailed an informational alert stating what was done and why. This is valuable information and should always be on! Information is king!</ol>
<div>Hope this helped some of you with process/memory issues on your servers. And again, take time to understand what each function does, CSF is a powerful tool! Questions in the comments! Cheers <img src='http://www.techhelpblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </div>
]]></content:encoded>
			<wfw:commentRss>http://www.techhelpblog.com/2010/11/12/limit-processes-memory-usage-user-based-time-memory-cpanel-csf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to enable Gzip Compression with mod_deflate on CPanel Servers</title>
		<link>http://www.techhelpblog.com/2010/08/20/enable-gzip-compression-mod_deflate-cpanel-servers/</link>
		<comments>http://www.techhelpblog.com/2010/08/20/enable-gzip-compression-mod_deflate-cpanel-servers/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 08:02:55 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Hosting Tech (Cpanel/Linux)]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[deflate]]></category>
		<category><![CDATA[easyapache]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[gzip compression]]></category>
		<category><![CDATA[mod_deflate]]></category>
		<category><![CDATA[website performance]]></category>

		<guid isPermaLink="false">http://www.techhelpblog.com/?p=83</guid>
		<description><![CDATA[Gzip will compress the content on the server delivering a much smaller file size to the browser where it is uncompressed and served as per normal, this reduces bandwidth and in most cases drastically reduces the viewing time of your websites.]]></description>
			<content:encoded><![CDATA[<p>For a long time we have been working so hard on content and meta tags and image tags and alt tags, etc, etc that we have often left the speed and performance of our websites be pushed to the back burner! And if any of you have use Google Webmasters tools you&#8217;ll stand up and take notice of the Performance area which compares the speed of your website with, well, all others in some sort of low quality result comparison. This comparison, I&#8217;m lead to believe, is actually now a small(may be more than a small part) part of the google algorithm and is taken into consideration when page rank/page quality/content quality, etc, etc is calculated in the google brain.</p>
<p>Which brings me to this post, a helpful method of speeding up those sluggish ecommerce or heavily content driven sites is by utilizing Gzip, which is available in Apache version 2.x and up. Gzip will compress the content on the server delivering a much smaller file size to the browser where it is uncompressed and served as per normal, this reduces bandwidth and in most cases drastically reduces the viewing time of your websites. The only downside is there will be some increase in CPU load on the server side and also a slight increase in the browsers load as it decompresses the content, this is minimal and I haven&#8217;t yet seen any negative effects.</p>
<p>Basically in order for Gzip to work Apache 2.x needs to be compiled with mod_deflate so the first step, if it isn&#8217;t already enabled, is to enable mod_deflated and recompile your apache.</p>
<ol>
<li><strong>Using EasyApache in WHM we rebuild with mod_deflate enabled</strong><img class="alignright size-full wp-image-84" title="EasyApache enabling Gzip with deflate " src="http://www.techhelpblog.com/wp-content/uploads/2010/08/deflate-apache.png" alt="" width="323" height="111" /><br />
I won&#8217;t go through the initial steps in detail, once clicked into the Easy Apache area  ensure the <em>Previously Saved Config (**DEFAULT**) </em>is selected and click <em>start customizing based on profile </em>leave the next screen on its default which should be the current apache version (remember needs to be 2.x to support mod_deflated) choose <em>NEXT</em> leave the PHP Major version the same and click <em>NEXT</em>, leave PHP minor version the same and click <em>NEXT</em>, leave Short Options List the same and click <em>Exhaustive Options List</em>, Here we will check the box that says <em>Deflated. See image right. </em>Then select <em>save and build <span style="font-style: normal;">note that this can take a long time depending on the servers performance, etc. Once its done, apply it and thats it Deflate is now compiled into Apache.</span><br />
</em></li>
<li><em><span style="font-style: normal;"><strong>With mod_deflate enabled we can turn on Gzip on a per account basis.<br />
<span style="font-weight: normal;">In CPanel under the specific accounts you can enable Gzip via the Optimize Website page! See image below.<br />
<a href="http://www.techhelpblog.com/wp-content/uploads/2010/08/optimize-gzip-cpanel.png"><img class="aligncenter size-full wp-image-88" title="Software-Services in CPanel menu" src="http://www.techhelpblog.com/wp-content/uploads/2010/08/optimize-gzip-cpanel.png" alt="" width="505" height="108" /><br />
</a>Once in the Optimize Website menu you can choose from a few options as shown below. I&#8217;ll leave that up to you, its relativelt self explanitory. If you want to check your site to see if it is being gzipped you can use  this little tool <a href="http://www.gidnetwork.com/tools/gzip-test.php">http://www.gidnetwork.com/tools/gzip-test.php</a> which is pretty helpful, or google gzip test as there is a whole bunch of them out there.<br />
<a href="http://www.techhelpblog.com/wp-content/uploads/2010/08/optimize-menu-cpanel-gzip.png"><img class="aligncenter size-full wp-image-89" title="optimize-menu-cpanel-gzip" src="http://www.techhelpblog.com/wp-content/uploads/2010/08/optimize-menu-cpanel-gzip.png" alt="" width="739" height="304" /></a> </span></strong></span></em></li>
</ol>
<p>Hope this helped give you an idea of how to enable Gzip in CPanel! Questions in the comments, happy fast browsing <img src='http://www.techhelpblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.techhelpblog.com/2010/08/20/enable-gzip-compression-mod_deflate-cpanel-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to configure domain specific relay hosts in exim using remote_smtp with CPanel</title>
		<link>http://www.techhelpblog.com/2010/08/10/how-to-configure-domain-specific-relay-hosts-in-exim-using-remote_smtp/</link>
		<comments>http://www.techhelpblog.com/2010/08/10/how-to-configure-domain-specific-relay-hosts-in-exim-using-remote_smtp/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 11:21:37 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Hosting Tech (Cpanel/Linux)]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[Exim Configuration]]></category>
		<category><![CDATA[exim.conf]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[relay hosts]]></category>
		<category><![CDATA[remote_smtp]]></category>
		<category><![CDATA[routers configuration]]></category>
		<category><![CDATA[route_list]]></category>
		<category><![CDATA[techhelp]]></category>
		<category><![CDATA[whm]]></category>

		<guid isPermaLink="false">http://www.techhelpblog.com/?p=52</guid>
		<description><![CDATA[So you have, for whatever reason, a requirement to send all mail from CPanel server x addressed to *@domain.com via a specific smtp server. I recently ran into this issue and found a relatively simple fix. Unlike Microsoft Exchange and its easy UI where you can create a send connector with a bunch of prerequisites, [...]]]></description>
			<content:encoded><![CDATA[<p>So you have, for whatever reason, a requirement to send all mail from CPanel server x addressed to *@domain.com via a specific smtp server. I recently ran into this issue and found a relatively simple fix. Unlike Microsoft Exchange and its easy UI where you can create a send connector with a bunch of prerequisites, with exim you need to work on the exim.conf file. Luckily its actually not that hard, once you know how!</p>
<ol>
<li><strong>Open Exim configuration from within WHM</strong><br />
Open up a WHM connection to your CPanel server and head to <em>Service Configuration &gt;&gt; Exim Configuration Editor</em> then click on <em>Advanced Editor.</em></li>
<div style="font-size: 0.8em;">I will take this moment to make a note:- if you are running a CPanel server you MUST use the WHM editor Exim Configuration Editor, I learnt the hard way before I even knew you could edit this option in WHM by editing exim.conf on a CPanel server that it will definitely be overwritten at some stage by an update! However these changes also apply to a non CPanel server that uses Exim by applying the same changes to /etc/exim.conf. See image below.</div>
<p><a href="http://www.techhelpblog.com/wp-content/uploads/2010/08/exim-advanced-menu-cpanel.jpg"><img class="aligncenter size-full wp-image-59" title="Exim CPanel Advanced Menu option" src="http://www.techhelpblog.com/wp-content/uploads/2010/08/exim-advanced-menu-cpanel.jpg" alt="" width="467" height="97" /></a></p>
<li><strong>Find and edit the Routers Configuration</strong><br />
Find the editable section below ROUTERS CONFIGURATION it looks something like this.<br />
<a href="http://www.techhelpblog.com/wp-content/uploads/2010/08/routers-configuration-eximconf1.jpg"><img class="size-full wp-image-61 aligncenter" title="Exim Router Configuration in CPanel" src="http://www.techhelpblog.com/wp-content/uploads/2010/08/routers-configuration-eximconf1.jpg" alt="" width="529" height="188" /></a> Just below the section that says <em>demo accounts are not permitted to relay email </em>is where we are going to add our relay hosts. And below is a demo of a very basic send connector.</p>
<blockquote><p>domain1send:<br />
driver = manualroute<br />
transport = remote_smtp<br />
route_list = domain1.com smtp2.anotherserver.com</p></blockquote>
<p>This one here basically would take anything sent to a @domain1.com address and send it out via smtp2.anotherserver.com.</li>
<li><strong>Save your changes and restart Exim</strong><br />
Save the changes you have made by clicking save at the bottom of the page, then go to <em>Restart Services &gt;&gt; Mail Server (Exim) </em>then click<em> yes</em>. And test away.</li>
</ol>
<p>This is a fairly basic setup and is intended to be used in a server that &#8220;sends to the world&#8221; directly already. IE this is for those domains that become a problem or in your environment may need to be routed differently than what the DNS resolve for that address might come up with.</p>
<p>Any questions, leave them in the comments! <img src='http://www.techhelpblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.techhelpblog.com/2010/08/10/how-to-configure-domain-specific-relay-hosts-in-exim-using-remote_smtp/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Secure SSH on CPanel and restrict to specific hosts</title>
		<link>http://www.techhelpblog.com/2010/08/07/how-to-secure-ssh-on-cpanel-and-restrict-to-specific-hosts/</link>
		<comments>http://www.techhelpblog.com/2010/08/07/how-to-secure-ssh-on-cpanel-and-restrict-to-specific-hosts/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 11:21:45 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Hosting Tech (Cpanel/Linux)]]></category>
		<category><![CDATA[allow]]></category>
		<category><![CDATA[config server firewall]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[csf]]></category>
		<category><![CDATA[deny]]></category>
		<category><![CDATA[host access control]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[OpenSSH]]></category>
		<category><![CDATA[pico]]></category>
		<category><![CDATA[protocol 2]]></category>
		<category><![CDATA[secure ssh]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[SSH Server]]></category>
		<category><![CDATA[sshd_config]]></category>
		<category><![CDATA[techhelp]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[whm]]></category>

		<guid isPermaLink="false">http://www.techhelpblog.com/?p=18</guid>
		<description><![CDATA[What I tend to do is restrict ssh to protocol 2 to start with, then change the listening port for ssh and lastly utilize CPanel's built in hosts access control to restrict what sources are able to access ssh.]]></description>
			<content:encoded><![CDATA[<p>There are many ways to secure SSH on a CPanel Server, including authenticating with keys and more. However I usually go for a simpler way. Given most of my personal applications are dedicated &amp; shared servers there is only a small list of people requiring access to SSH (I don&#8217;t allow SSH for shared servers at all) often only myself. What I tend to do is restrict ssh to protocol 2 to start with, then change the listening port for ssh and lastly utilize CPanel&#8217;s built in hosts access control to restrict what sources are able to access ssh.</p>
<ol>
<li><strong>Restrict SSH to Protocol 2 &amp; Restrict the Port to a non standard port.</strong></li>
<p>to do this simply log into the console of the server as the root user and use your favourite editor to modify the sshd configuration file like so.</p>
<blockquote><p>pico /etc/ssh/sshd_config</p></blockquote>
<p>Find the line that reads Protocol 2,1 and the line that reads Port. Below is an example of a modified configuration. Port 22444 is the new ssh port and the #Protocol 2,1 is removing that line from the config and the line below it is restricting the Protocol to 2 only.</p>
<blockquote>
<div id="_mcePaste">Port 22444</div>
<div>#Protocol 2,1</div>
<div id="_mcePaste">Protocol 2</div>
</blockquote>
<li><strong>Restrict Source Hosts from within CPanel.<br />
</strong>From within your WHM head to <em>Security Center &gt;&gt; Host Access Control.<br />
<span style="font-style: normal;">Here we can add in some rules to control who can access sshd. View the image below you can see how I have added access to Office and Head Office with two rules (Access List is internal ranges in this case, would normally be a single external source, IE 123.211.123.211) &amp; the third rule is to deny ALL others, the final deny rule must be the last of the sshd rules.<br />
<em><a href="http://www.techhelpblog.com/wp-content/uploads/2010/08/hosts-sshd-access.jpg"><img class="aligncenter size-full wp-image-66" title="Hosts Access Control in CPanel" src="http://www.techhelpblog.com/wp-content/uploads/2010/08/hosts-sshd-access.jpg" alt="" width="612" height="152" /></a><br />
</em></span></em></li>
<li><em><span style="font-style: normal;"><em><strong><span style="font-style: normal;">Restart SSHD service.</span></strong><br />
<span style="font-style: normal;">From console/terminal or WHM restart the sshd service. type </span>service sshd restart<span style="font-style: normal;"> in console/terminal or go to </span>Restart Services &gt;&gt; SSH Server (OpenSSH) <span style="font-style: normal;">from within WHM and hit YES.</span></em></span></em></li>
</ol>
<p>NOTES: I am using OpenSSH in this example. If you have any third party firewall&#8217;s in place you will need to punch a hole in those with the different port as well. Also as I recommend you run a firewall on your CPanel box you will also need to configure that. I recommend <a title="Config Server CPanel pluggin" href="http://www.configserver.com/cp/csf.html" target="_blank">Config Server Firewall</a> as an addon/pluggin for CPanel and will have an install and configuration writeup on that at some stage soon! Post a Comment if you have any questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techhelpblog.com/2010/08/07/how-to-secure-ssh-on-cpanel-and-restrict-to-specific-hosts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring AXFR using ACL&#8217;s with BIND/NSD on CPanel</title>
		<link>http://www.techhelpblog.com/2010/08/07/configuring-axfr-using-acls-with-bind-on-cpanel/</link>
		<comments>http://www.techhelpblog.com/2010/08/07/configuring-axfr-using-acls-with-bind-on-cpanel/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 11:20:28 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Hosting Tech (Cpanel/Linux)]]></category>

		<guid isPermaLink="false">http://www.techhelpblog.com/?p=16</guid>
		<description><![CDATA[From time to time my configuration of CPanel Hosting servers requires the ability to allow a Windows  (or other) style DNS server to retrieve hosted dns zones from the hosting server. As default AXFR is blocked with Bind/NSD on a CPanel box, and with good cause! My configuration in an environment where Windows DNS servers [...]]]></description>
			<content:encoded><![CDATA[<p>From time to time my configuration of CPanel Hosting servers requires the ability to allow a Windows  (or other) style DNS server to retrieve hosted dns zones from the hosting server. As default AXFR is blocked with Bind/NSD on a CPanel box, and with good cause! My configuration in an environment where Windows DNS servers are God means in order to give control over things like subdomains, mx entries and the plethora of CPanel adjustable DNS related items to the individual I need a way of allowing the Windows box (or other dns server) to get its primary records from the CPanel box! This comes in the form of a <a title="Wikipedia DNS" href="http://en.wikipedia.org/wiki/DNS_zone_transfer" target="_blank">zone transfer</a> (AXFR). While the CPanel box will respond to queries it certainly will not give up the entire zone of a domain unless we tell it to! So here is how to allow zone transfers to a specific list of sources.</p>
<ol>
<li><strong>Create an ACL (Access List) within named.conf</strong></li>
<p>Get access to your CPanel servers console or SSH in with root permissions. Using your favourite editor, pico in my case, edit the following file</p>
<blockquote><p>pico /etc/named.conf</p></blockquote>
<p>Here is the section of named.conf we are going to add in our ACL. This is prior to any changes to show the default file.</p>
<blockquote><p>controls {<br />
inet 127.0.0.1 allow { localhost; } keys { &#8220;rndc-key&#8221;; };<br />
};<br />
<strong>WE WANT TO ADD HERE</strong><br />
options {</p></blockquote>
<p>here is an example of the same section with a basic ACL added. Bolded for convenience.</p>
<blockquote><p>controls {<br />
inet 127.0.0.1 allow { localhost; } keys { &#8220;rndc-key&#8221;; };<br />
};<br />
<strong> acl trusted-servers {<br />
192.168.100.0/24;   //Showing a entire range allowed<br />
123.122.123.122;     //dns0.something.com<br />
122.123.122.123;     //dns1.something.com<br />
};</strong><br />
options {</p></blockquote>
<p>Above you can see we have allowed the entire 192.168.100.0 address range (just an example of allowing a range of IPs) and we have added specific access from the two dns0 and dns1 servers. Everything behind the // is ignored and only used to comment the file so we can understand what we have done when we need to view this file some random time in the future! It saves the headache of trying to figure out what the hell we did last time <img src='http://www.techhelpblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<li><strong>Apply our new ACL to the main options in named.conf<br />
<span style="font-weight: normal;">Now all we need to do is add in the trusted-servers ACL we created!<br />
Find the below bit a little further down in named.conf </span></strong></li>
<blockquote><p>// Put files that named is allowed to write in the data/ directory:<br />
directory                &#8221;/var/named&#8221;; // the default<br />
pid-file                 &#8220;/var/run/named/named.pid&#8221;;<br />
dump-file                &#8221;data/cache_dump.db&#8221;;<br />
statistics-file          &#8221;data/named_stats.txt&#8221;;<br />
/* memstatistics-file     &#8220;data/named_mem_stats.txt&#8221;; */<br />
allow-transfer {none;};<br />
};</p></blockquote>
<p>And below example is the same area changed to add in the ACL we created. I have bolded the bit I changed.</p>
<blockquote><p>// Put files that named is allowed to write in the data/ directory:<br />
directory                &#8220;/var/named&#8221;; // the default<br />
pid-file                 &#8220;/var/run/named/named.pid&#8221;;<br />
dump-file                &#8220;data/cache_dump.db&#8221;;<br />
statistics-file          &#8220;data/named_stats.txt&#8221;;<br />
/* memstatistics-file     &#8220;data/named_mem_stats.txt&#8221;; */<br />
<strong> allow-transfer { trusted-servers; };</strong><br />
};</p></blockquote>
<p>Save your changed file and restart BIND/NSD. You can do this from command or simply from within the WHM panel!</ol>
<p>Now TEST! From an allowed source you can use nslookup from command, if its a windows box simply run <em>nslookup</em> then <em>server </em> then <em>ls -d domainname.com</em> domainname.com being a domain which is hosted on the CPanel server. You should recieve a copy of the entire zone on screen! <img src='http://www.techhelpblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Any questions, put them in the comments.</p>
<blockquote><p><em>C:\&gt;nslookup<br />
&gt;server my.cpanelhost.com<br />
&gt;ls -d domainname.com<br />
<strong>Zone information will be displayed.</strong></em></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.techhelpblog.com/2010/08/07/configuring-axfr-using-acls-with-bind-on-cpanel/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

