<?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>Reaper-X</title>
	<atom:link href="https://www.reaper-x.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.reaper-x.com</link>
	<description>Random Thoughts and Notes</description>
	<lastBuildDate>Wed, 25 May 2016 08:29:55 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://pubsubhubbub.superfeedr.com"/>	<item>
		<title>CentOS 7.1 and OpenVZ</title>
		<link>https://www.reaper-x.com/2015/04/07/centos-7-1-and-openvz/</link>
		<comments>https://www.reaper-x.com/2015/04/07/centos-7-1-and-openvz/#comments</comments>
		<pubDate>Tue, 07 Apr 2015 06:11:33 +0000</pubDate>
		<dc:creator><![CDATA[Reaper]]></dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://www.reaper-x.com/?p=901</guid>
		<description><![CDATA[Over the last weekend, this blog was down for a few days before it finally got back up and running last sunday. The source of the problem was because of CentOS 7 just recently been updated to 7.1 and the problem was caused by the initscripts package. While there&#8217;s nothing important here because this is [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Over the last weekend, this blog was down for a few days before it finally got back up and running last sunday. The source of the problem was because of CentOS 7 just recently been updated to 7.1 and the problem was caused by the initscripts package. While there&#8217;s nothing important here because this is just a personal blog and not a mission critical site, but seeing it was inaccessible for a few days irks me.</p>
<p>I found out the site was inaccessible on April 3. I was unable to connect at all and so i was thinking that maybe the node where i was at was down and so i sent a ticket to the provider. When they replied saying there&#8217;s nothing wrong on their side, then i started thinking was there a misconfiguration somewhere? but the day before it was working. So it began, the troubleshooting game. Unfortunately because the network is down and the provider didn&#8217;t give me access to any other console so it&#8217;s kinda hard to check on things because i have to tell them the command first by sending them tickets and then they would execute it and report back. At the same time i don&#8217;t like bothering them like this because this is an unmanaged service so asking them like this feels like i was bothering them.</p>
<p>After numerous messages and failed attempts. They offered me to create a full backup of my container and then rebuild the vps the OS and then put the backup file later on the freshly installed vps so i can do what i want with it later. I was still hesitant on doing that mainly because well let&#8217;s just say i don&#8217;t want to reconfigure the whole thing again and i&#8217;m thinking the problem wasn&#8217;t related to configurations and so i asked them to execute one more command, and that is to install packages using yum.</p>
<p>To my surprise they reported that yum failed and they couldn&#8217;t even ping the machine from the host node. So just as i thought this problem was caused by something else and so i ask them to try to re-add my ip address, move to another ip temporarily, and all of them ended up in failure and thought that this is due to broken network scripts. Then they re-offered me whether i want to proceed with the backup plan mentioned before &#8230; and because i&#8217;m left with no other choice i choose yes. After the procedure completed I&#8217;m left with a freshly installed CentOS 7 and a tar backup file placed in the root directory.</p>
<p>At this point i remember the last automated report that was sent to me. I noticed on that report there was plenty of updates being performed before i lost contact with my vps. I decided to apply updates right from the start, and then rebooted the server and voila the source of the problem was finally found. Network went down again and now i&#8217;m totally sure it was caused by updates. But which one? there are so many updates and i&#8217;m locked out of my vps again. But this time i don&#8217;t want to send so many messages to them like before so i did some research and found the source of the problem (<a href="https://bugzilla.redhat.com/show_bug.cgi?id=1207975">redhat bugzilla link</a> | <a href="https://bugzilla.openvz.org/show_bug.cgi?id=3169">openvz bugzilla link</a>). But because there&#8217;s no way for me to access my vps the only thing i can do is just send a message to the provider where i&#8217;m hosted at pointing to those two sites and wait. Due to timezone difference it feels like i was waiting forever.</p>
<p>Finally after they applied the patch, my vps is accessible again .. but i still have one more thing to do, and that is restoring the backup they provided before and making sure that everything was good again. If you think everything is going to be smooth this time, you were wrong, because unfortunately during the restoring process my container was wrongly suspended. It took about 22 minutes after i sent an explanation to them to get it unblocked again and all is well again now.</p>
	<p></p>
	<p><em>Copyright &copy; <a href="https://www.reaper-x.com" title="Reaper-X Technology">Reaper-X Technology</a> &ndash; www.reaper-x.com | <a href="https://www.reaper-x.com/2015/04/07/centos-7-1-and-openvz/" title="CentOS 7.1 and OpenVZ">Permalink</a> | <a href="https://www.reaper-x.com/2015/04/07/centos-7-1-and-openvz/#comments" title="One comment">One comment</a></em></p>
	<p><em><a href="https://www.reaper-x.com">0x87485B96</a> | Tags : <a href="https://www.reaper-x.com/category/miscellaneous/" rel="category tag">Miscellaneous</a></em></p>]]></content:encoded>
			<wfw:commentRss>https://www.reaper-x.com/2015/04/07/centos-7-1-and-openvz/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Site redesign done but it feels like i broke something</title>
		<link>https://www.reaper-x.com/2014/12/11/site-redesign-done-but-it-feels-like-i-broke-something/</link>
		<comments>https://www.reaper-x.com/2014/12/11/site-redesign-done-but-it-feels-like-i-broke-something/#comments</comments>
		<pubDate>Thu, 11 Dec 2014 15:07:22 +0000</pubDate>
		<dc:creator><![CDATA[Reaper]]></dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[random thoughts]]></category>

		<guid isPermaLink="false">http://www.reaper-x.com/?p=895</guid>
		<description><![CDATA[It was many years ago since the last time i changed the site design; and whenever i changed something i often find problems that appear only after i&#8217;ve actually uploaded it into a live site. It was no different now. Everything seems to be running fine while testing locally and when i&#8217;ve uploaded it; there&#8217;s [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>It was many years ago since the last time i changed the site design; and whenever i changed something i often find problems that appear only after i&#8217;ve actually uploaded it into a live site. It was no different now. Everything seems to be running fine while testing locally and when i&#8217;ve uploaded it; there&#8217;s something broke either due to the restrictions i placed on the live server or due to i forgetting something. Often though i found something that maybe if i do this it&#8217;ll be better and i have to re-edit and such.</p>
<p>Additionaly, people would be happy when they received 0 spam (and so do i). But after doing some modifications here and there, it feels like i did something wrong when the spam counter is still at 0 during the last 2 days after it goes live when it usually reach hundreds within a day and now there&#8217;s 0 spam in the spam area.</p>
<p>Then what makes it worse is i just noticed now (or to be precise i finally care), long time ago i made a big mistake of using automatic tags generation for all my posts tags and now i&#8217;ve paid a big price for it by deleting all the tags, and then i&#8217;ve to proceed to add them manually although the later is still in progress because i&#8217;m also doing some cleaning on the other stuff as well.</p>
	<p></p>
	<p><em>Copyright &copy; <a href="https://www.reaper-x.com" title="Reaper-X Technology">Reaper-X Technology</a> &ndash; www.reaper-x.com | <a href="https://www.reaper-x.com/2014/12/11/site-redesign-done-but-it-feels-like-i-broke-something/" title="Site redesign done but it feels like i broke something">Permalink</a> | <a href="https://www.reaper-x.com/2014/12/11/site-redesign-done-but-it-feels-like-i-broke-something/#comments" title="2 comments">2 comments</a></em></p>
	<p><em><a href="https://www.reaper-x.com">0x87485B96</a> | Tags : <a href="https://www.reaper-x.com/category/miscellaneous/" rel="category tag">Miscellaneous</a></em></p>]]></content:encoded>
			<wfw:commentRss>https://www.reaper-x.com/2014/12/11/site-redesign-done-but-it-feels-like-i-broke-something/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>I&#8217;m back and what a mess</title>
		<link>https://www.reaper-x.com/2014/10/23/im-back-and-what-a-mess/</link>
		<comments>https://www.reaper-x.com/2014/10/23/im-back-and-what-a-mess/#comments</comments>
		<pubDate>Thu, 23 Oct 2014 08:57:36 +0000</pubDate>
		<dc:creator><![CDATA[Reaper]]></dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[random thoughts]]></category>

		<guid isPermaLink="false">http://www.reaper-x.com/?p=888</guid>
		<description><![CDATA[It&#8217;s been a long time since the last time i write something, and what a mess this place is when i returned&#8230; a week ago or so. There are way too many spam that even the empty spam button couldn&#8217;t do anything about it so i have to use sql command directly just to clean [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s been a long time since the last time i write something, and what a mess this place is when i returned&#8230; a week ago or so. There are way too many spam that even the empty spam button couldn&#8217;t do anything about it so i have to use sql command directly just to clean it. Not to mention there are way too many spam that goes through Akismet too and ended up directly in the comment area.</p>
<p>According to Akismet, for last month (september) the amount of spam that got caught was at 125,966 while for this month as of writing this the number of spam is at 115,945. I&#8217;m simply stunned. If a small blog like this could get such a large amount of spam, how big would it be for larger blogs?. Must be really stressful.</p>
<p>Besides doing some cleaning, i have also made changes to many things here and there. I moved from my old hosting provider into a new budget vps that is cheaper and also enabled SSL although it is not on by default, which means you need to change the url into https by yourself first and then the rest of your visit would be in SSL (if anyone care).</p>
<p>Finally after i&#8217;ve finished setting up everything also making sure that the new server can stay up and running for several days without problem (and not getting kicked too), I then canceled my old hosting plan. And so here begins the new chapter of this blog.</p>
	<p></p>
	<p><em>Copyright &copy; <a href="https://www.reaper-x.com" title="Reaper-X Technology">Reaper-X Technology</a> &ndash; www.reaper-x.com | <a href="https://www.reaper-x.com/2014/10/23/im-back-and-what-a-mess/" title="I&#8217;m back and what a mess">Permalink</a> | <a href="https://www.reaper-x.com/2014/10/23/im-back-and-what-a-mess/#comments" title="3 comments">3 comments</a></em></p>
	<p><em><a href="https://www.reaper-x.com">0x87485B96</a> | Tags : <a href="https://www.reaper-x.com/category/miscellaneous/" rel="category tag">Miscellaneous</a></em></p>]]></content:encoded>
			<wfw:commentRss>https://www.reaper-x.com/2014/10/23/im-back-and-what-a-mess/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>I&#8217;ve been banned from Google Adsense</title>
		<link>https://www.reaper-x.com/2012/09/02/ive-been-banned-from-google-adsense/</link>
		<comments>https://www.reaper-x.com/2012/09/02/ive-been-banned-from-google-adsense/#comments</comments>
		<pubDate>Sun, 02 Sep 2012 08:19:58 +0000</pubDate>
		<dc:creator><![CDATA[Reaper]]></dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[adsense]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://www.reaper-x.com/?p=880</guid>
		<description><![CDATA[Usually i don&#8217;t want to write a post for something like this, but because this site is powered by Adsense to pay for its monthly bills since 2006 and i just got banned by Adsense, i&#8217;ve decided that perhaps it is for the best that i write about it just to let those that read [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Usually i don&#8217;t want to write a post for something like this, but because this site is powered by Adsense to pay for its monthly bills since 2006 and i just got banned by Adsense, i&#8217;ve decided that perhaps it is for the best that i write about it just to let those that read this site knows about it and perhaps can learn something from this.</p>
<p>Basically here&#8217;s what i get from email message i received from Google and unfortunately there are no warnings given (not even a single warning even after all these years).</p>
<blockquote><p>
Hello,</p>
<p>We continually review all publishers according to our program policies (https://www.google.com/support/adsense/bin/answer.py?answer=48182&#038;stc=aspe-3pp-en) and Terms and Conditions (https://www.google.com/adsense/localized-terms?&#038;stc=aspe-3tc-en ). During a recent review of your account, our specialists found that it was not in compliance with our policies.</p>
<p>WEBMASTER GUIDELINES: Our program specialists regularly review sites in the AdSense program.</p>
<p>It is important for a site displaying AdSense to offer significant value to the end user by providing unique and relevant content, and not to place ads on sites with little to no original content. Additionally, Google ads may not be placed on non-content-based pages.</p>
<p>Your site should also provide a good user experience through clear navigation and organization. Users should be able to easily click through<br />
your pages and find the information they are seeking.</p>
<p>Because your sites violate the spirit of our policies, we have disabled ad serving.
</p></blockquote>
<p>To answer the fourth paragraph on that email message, all of the content written here is made by me (some of them, and by some i mean only several posts are made by others and that is really long time ago) so obviously it&#8217;s original and i never placed Google ads on non content pages so i believe i didn&#8217;t do anything wrong on that part.</p>
<p>As for the fifth paragraph, well i believe that everything is organized here and users can navigate easily so i&#8217;m not even sure what&#8217;s wrong.</p>
<p>To be honest, i don&#8217;t even know what&#8217;s i&#8217;ve been doing wrong so they ban me straight away without any warnings given so i can correct my mistakes if i&#8217;ve made any and i believe i have mentioned earlier that i&#8217;m not a guy that has just started using Adsense a month ago or even a few months ago, i&#8217;ve been with them for 6 years (since 2006) and i always comply with their guidelines so i&#8217;m devastated plus angered by this.</p>
<p>I&#8217;ve just sent an appeal to Google asking for explanation and also asked whether it is possible for my account to get reinstated. So the only thing i can do for now is just wait for their reply and hopefully they reinstate my account back.</p>
<p>Final update: nope, i received no answer at all.</p>
	<p></p>
	<p><em>Copyright &copy; <a href="https://www.reaper-x.com" title="Reaper-X Technology">Reaper-X Technology</a> &ndash; www.reaper-x.com | <a href="https://www.reaper-x.com/2012/09/02/ive-been-banned-from-google-adsense/" title="I&#8217;ve been banned from Google Adsense">Permalink</a> | <a href="https://www.reaper-x.com/2012/09/02/ive-been-banned-from-google-adsense/#comments" title="4 comments">4 comments</a></em></p>
	<p><em><a href="https://www.reaper-x.com">0x87485B96</a> | Tags : <a href="https://www.reaper-x.com/category/miscellaneous/" rel="category tag">Miscellaneous</a></em></p>]]></content:encoded>
			<wfw:commentRss>https://www.reaper-x.com/2012/09/02/ive-been-banned-from-google-adsense/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to block TOR exit nodes from accessing your website on Apache and Nginx</title>
		<link>https://www.reaper-x.com/2012/05/15/how-to-block-tor-on-apache-and-nginx/</link>
		<comments>https://www.reaper-x.com/2012/05/15/how-to-block-tor-on-apache-and-nginx/#comments</comments>
		<pubDate>Tue, 15 May 2012 08:56:51 +0000</pubDate>
		<dc:creator><![CDATA[Reaper]]></dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[web server]]></category>

		<guid isPermaLink="false">http://www.reaper-x.com/?p=873</guid>
		<description><![CDATA[How to block TOR users from accessing your site, or specific files or directories only on Apache and Nginx]]></description>
				<content:encoded><![CDATA[<p>If you ever want to block TOR users from your accessing website completely or block them from accessing specific file(s) / location(s) only for any reasons you may have and you&#8217;re running Nginx or Apache, hopefully this post can help you with that.</p>
<p><em>First thing first, the command used here for both Apache and Nginx were designed to be use in cron because TOR ip often change. But make sure that it&#8217;s scheduled for 1 hour at minimum to respect those that gives you free service to lookup tor ip =)</em></p>
<h2>Getting a list of TOR IP Addresses</h2>
<p>Before anything else we need to get a list of TOR IP Address, and to do that we have two options (but of course feel free to use your own source if you have one):</p>
<ul>
<li>Use TOR Bulk Exit List from <a href="https://check.torproject.org/cgi-bin/TorBulkExitList.py">Torproject</a></li>
<li>Use an external sites that list TOR IP Address such as from <a href="https://www.dan.me.uk/tornodes">dan.me.uk</a></li>
</ul>
<p>Note: dan.me.uk website only allow you to fetch it every 1 hour only (even if you accidentally clicked it), i choose to not link to the ip address url directly because of that reason and so you have to copy the url directly</p>
<p>For example purpose, here i&#8217;m going to use the list from dan.me.uk website and i obviously would like to thank him first for providing tor ip list</p>
<h2>Blocking TOR on Nginx</h2>
<p>I assume that:</p>
<ul>
<li>Nginx is located at /usr/local/nginx</li>
<li>The conf directory is at /usr/local/nginx/conf</li>
</ul>
<p>If you have Nginx at different location make sure to adjust it accordingly</p>
<p>1. Edit your vhost configuration let&#8217;s say it&#8217;s called mydomain.conf</p>
<pre>
# Example configuration on blocking tor on Nginx for a specific server block
# /usr/local/nginx/conf/mydomain.conf

server {

	[...] # your access_log, error_log, etc

	# include tor ip list for a whole vhost
	include tor-ip.conf;

	location / {
		[...] # root configuration
	}

}

# And here's an example if you want to block it for specific location / file only

server {

	[...] # your access_log, error_log, etc

	location ~ "/no-tor-allowed/" {
		# include tor ip list for this location
		include tor-ip.conf;
	}

	location / {
		[...] # root other configuration
	}

}
</pre>
<p>But don&#8217;t go reloading your nginx configuration just yet</p>
<p>2. Downloading the ip list and automatically reload nginx</p>
<pre>
# run this command once before putting it in cron, but make sure to adjust the path in the command below to match your nginx location
# the output file is /usr/local/nginx/conf/tor-ip.conf

wget -q https://www.dan.me.uk/torlist/ -O - | sed "s/^/deny /g; s/$/;/g" &gt; /usr/local/nginx/conf/tor-ip.conf; /usr/local/nginx/sbin/nginx -s reload
</pre>
<p>And done for the Nginx part</p>
<h2>Blocking TOR on Apache</h2>
<p>Depending on whether you have access to your Apache configuration file or not, the configuration will be different. But i&#8217;ll cover them both just in case you don&#8217;t have access to Apache configuration file and only have access to .htaccess file. Although it&#8217;s not recommended to be used in htaccess but for completion&#8217;s sake, i might as well include it :).</p>
<h3>If you have access to Apache configuration</h3>
<p>The steps are pretty much the same like Nginx with the only difference is the location and the syntax of the block directive, anyway:</p>
<p>I assume that:</p>
<ul>
<li>Apache is at /usr/local/apache</li>
<li>The conf file is at /usr/local/apache/conf</li>
</ul>
<p>If you have Apache at different location make sure to adjust it accordingly</p>
<p>1. Open your vhost configuration file (if you put your vhost configuration file in httpd.conf then edit that file) and then locate your desired virtualhost (e.g mydomain.com)</p>
<pre>
# Example configuration on blocking tor on Apache for a specific virtualhost block
&lt;VirtualHost 1.2.3.4:80&gt;

	[...] # other stuff such as server name and so on

	# Adjust the directory if you want to block tor for specific directory only
	# The example below will block access from TOR users completely
	&lt;Directory /&gt;
		# Include tor ip
		Include conf/tor-ip.conf
	&lt;/Directory&gt;

	# Or you can also use location directive
	# in this example TOR users is not allowed to visit /no-tor-allowed url and its contents
	&lt;Location /no-tor-allowed&gt;
		# Include tor ip
		Include conf/tor-ip.conf
	&lt;/Location&gt;

	# Or use this to block specific file only
	&lt;Files my-files.html&gt;
		# Include tor ip
		Include conf/tor-ip.conf
	&lt;/Files&gt;

&lt;/VirtualHost&gt;
</pre>
<p>But don&#8217;t restart Apache just yet or else it&#8217;ll fail</p>
<p>2. Downloading the ip list and automatically restart Apache</p>
<h4>If you&#8217;re running Apache 2.2 and below</h4>
<pre>
# Run this once before putting it in cron, but make sure to adjust the path before running it
# This will save the output tor ip to /usr/local/apache/conf/tor-ip.conf

wget -q https://www.dan.me.uk/torlist/ -O - | sed 's/^/deny from /g' &gt; /usr/local/apache/conf/tor-ip.conf; /usr/local/apache/bin/apachectl graceful
</pre>
<h4>If you&#8217;re running Apache 2.4</h4>
<pre>
# Run this once before putting it in cron, but make sure to adjust the path before running it
# This will save the output tor ip to /usr/local/apache/conf/tor-ip.conf

wget -q https://www.dan.me.uk/torlist/ -O - | sed "s/^/Require not ip /g; 1i\&lt;RequireAll\&gt;\nRequire all granted" | sed '$a\&lt;\/RequireAll\&gt;' &gt; /usr/local/apache/conf/tor-ip.conf; /usr/local/apache/bin/apachectl graceful
</pre>
<p>Note: Actually as long as you have mod_access_compat compiled into Apache 2.4 (if i remember it correctly it&#8217;s included by default if you compile Apache yourself) you can still use the old <strong>allow deny</strong> directives but for future proof using <strong>Require</strong> would be better</p>
<h3>If you only have access to .htaccess file</h3>
<p>You are still able to use this but make sure to change <strong>/your/www/directory/.htaccess</strong> into the full path to your .htaccess file but please note that i&#8217;m not sure about the performance penalty for blocking many ip addresses in a .htaccess file</p>
<h4>If you&#8217;re on Apache 2.2 and below</h4>
<pre>
# Note: This will append new lines to your .htaccess file and will block all access from TOR ips to all section of your site by default
# If you need to block for specific file, you need to modify the command below
# Also make sure to backup your .htaccess file first and adjust the path to point to your .htaccess file

# Run this once before putting it in cron if you have ssh access
# otherwise put it in cron directly but make sure to set a minimum of 1 hour

sed -i '/#\ REAPER-TOR/,/#\ END-REAPER-TOR/d' /your/www/directory/.htaccess; wget -q https://www.dan.me.uk/torlist/ -O - | sed "s/^/deny from /g; 1i# REAPER-TOR" | sed '$a# END-REAPER-TOR' &gt;&gt; /your/www/directory/.htaccess
</pre>
<p>If you&#8217;re on CPanel Shared Hosting there&#8217;s a high chance that you&#8217;re on Apache 2.2</p>
<h4>If you&#8217;re on Apache 2.4</h4>
<pre>
# Note: This will append new lines to your .htaccess file and will block all access from TOR ips to all section of your site by default
# If you need to block for specific file, you need to modify the command below
# Also make sure to backup your .htaccess file first and adjust the path to point to your .htaccess file

# Run this once before putting it in cron if you have ssh access
# otherwise put it in cron directly but make sure to set a minimum of 1 hour

sed -i '/#\ REAPER-TOR/,/#\ END-REAPER-TOR/d' /your/www/directory/.htaccess; wget -q https://www.dan.me.uk/torlist/ -O - | sed "s/^/Require not ip /g; 1i#\ REAPER-TOR\n\&lt;RequireAll\&gt;\nRequire all granted" | sed '$a\&lt;\/RequireAll\&gt;\n# END-REAPER-TOR' &gt;&gt; /your/www/directory/.htaccess
</pre>
<p>And that&#8217;s it</p>
	<p></p>
	<p><em>Copyright &copy; <a href="https://www.reaper-x.com" title="Reaper-X Technology">Reaper-X Technology</a> &ndash; www.reaper-x.com | <a href="https://www.reaper-x.com/2012/05/15/how-to-block-tor-on-apache-and-nginx/" title="How to block TOR exit nodes from accessing your website on Apache and Nginx">Permalink</a> | <a href="https://www.reaper-x.com/2012/05/15/how-to-block-tor-on-apache-and-nginx/#comments" title="4 comments">4 comments</a></em></p>
	<p><em><a href="https://www.reaper-x.com">0x87485B96</a> | Tags : <a href="https://www.reaper-x.com/category/how-to/" rel="category tag">How To</a></em></p>]]></content:encoded>
			<wfw:commentRss>https://www.reaper-x.com/2012/05/15/how-to-block-tor-on-apache-and-nginx/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to remove index files from URL on Nginx</title>
		<link>https://www.reaper-x.com/2012/04/30/how-to-remove-index-files-from-url-on-nginx/</link>
		<comments>https://www.reaper-x.com/2012/04/30/how-to-remove-index-files-from-url-on-nginx/#comments</comments>
		<pubDate>Mon, 30 Apr 2012 01:15:55 +0000</pubDate>
		<dc:creator><![CDATA[Reaper]]></dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[web server]]></category>

		<guid isPermaLink="false">http://www.reaper-x.com/?p=870</guid>
		<description><![CDATA[How to remove index files such as index.php index.html from the URL on Nginx]]></description>
				<content:encoded><![CDATA[<p>So yesterday while i was idling on Freenode i saw someone asking in Nginx channel that he basically wants to remove the index.php file from the url or in other words he wants to redirect http://www.mydomain.com/index.php into http://www.mydomain.com/ &#8230; probably for canonicalization purpose (canonical url) and/or perhaps SEO purpose. He had tried this:</p>
<pre>
# And it causes redirect loop (also tested on my local box)
# Atlhough it works fine for simple php files but not on his vBulletin setup
# or other non simple php file (because i don't have access to vBulletin i tested it on other script)
# Note the | is for illustration
location =|~ /index.php {
	rewrite ^ http://www.domain.com/|/ permanent;
}
</pre>
<p>And being curious, i tried some testing to remove that index.php thing from the URL and found a way to do it and it was simple. So if you&#8217;re currently looking for a way to remove or redirect your index file from the URL and you&#8217;re using Nginx perhaps this simple tips can help you with that</p>
<p>First thing first is open your nginx configuration files that hold your virtual hosts configuration and then add this line inside the server directive:</p>
<pre>
# This will redirect index.php index.htm to /
# Feel free to add other extension you need
if ( $request_uri ~ "/index.(php|html?)" ) {
	rewrite ^ /$1 permanent;
}
</pre>
<p>And an example just in case you want to see where it should be placed</p>
<pre>
server {

	[...] # other stuff such as server_name, access_log, etc

	# Here goes the code
	if ( $request_uri ~ "/index.(php|html?)" ) {
		rewrite ^ /$1 permanent;
	}

	location / {
		[...] # your root configuration
	}

	location ~ "\.php$" {
		[...] # your fastcgi configuration
	}

}
</pre>
<p>Then reload your nginx configuration. Now every request for index.php or index.html or index.htm file will be displayed as http://www.mydomain.com/. And if there&#8217;s a query string in your URL it&#8217;ll be displayed as http://www.mydomain.com/?q=abc instead of http://www.mydomain.com/index.php?q=abc</p>
	<p></p>
	<p><em>Copyright &copy; <a href="https://www.reaper-x.com" title="Reaper-X Technology">Reaper-X Technology</a> &ndash; www.reaper-x.com | <a href="https://www.reaper-x.com/2012/04/30/how-to-remove-index-files-from-url-on-nginx/" title="How to remove index files from URL on Nginx">Permalink</a> | <a href="https://www.reaper-x.com/2012/04/30/how-to-remove-index-files-from-url-on-nginx/#comments" title="7 comments">7 comments</a></em></p>
	<p><em><a href="https://www.reaper-x.com">0x87485B96</a> | Tags : <a href="https://www.reaper-x.com/category/how-to/" rel="category tag">How To</a></em></p>]]></content:encoded>
			<wfw:commentRss>https://www.reaper-x.com/2012/04/30/how-to-remove-index-files-from-url-on-nginx/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>How to remap / retasking Realtek onboard jacks / ports</title>
		<link>https://www.reaper-x.com/2012/02/13/how-to-remap-retasking-realtek-onboard-jacks-ports/</link>
		<comments>https://www.reaper-x.com/2012/02/13/how-to-remap-retasking-realtek-onboard-jacks-ports/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 06:31:49 +0000</pubDate>
		<dc:creator><![CDATA[Reaper]]></dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[registry]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.reaper-x.com/?p=864</guid>
		<description><![CDATA[If you&#8217;re using Realtek onboard soundcard and for whatever reasons wants to remap / retask the rear jacks or front panel jacks to anything you want hopefully you&#8217;ll find this useful For example, in my case, because i&#8217;m not using a computer case (in other words, i just left my motherboard open) and i don&#8217;t [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>If you&#8217;re using Realtek onboard soundcard and for whatever reasons wants to remap / retask the rear jacks or front panel jacks to anything you want hopefully you&#8217;ll find this useful</p>
<p>For example, in my case, because i&#8217;m not using a computer case (in other words, i just left my motherboard open) and i don&#8217;t have a standalone front panel and at the same time i want to connect my headphone to the rear grey jack / side speakers jack (by default headphone can be connected only to the front panel jack) while also connecting a 5.1 analog speakers setup to the rear jacks (green, black, and orange)</p>
<p>Anyway to make thing short, here&#8217;s the steps:</p>
<p>0. Download the latest driver available because there are differences between the pin numbers used if you&#8217;re using old drivers, uninstall the old driver, restart your system, install the new driver and then restart your system once again (at the time i write this, the latest version is R267, and so this post is based and tested using their R267 driver for the 64-bit systems)</p>
<p>1. Make sure that you&#8217;ve plugged everything that you need first into your Realtek Jacks (whether front panel jacks if you have it or rear jacks). For example, in my case, i already connected the headphone to the side speakers jack (grey colored jack)</p>
<p>2. Open regedit by typing regedit at the run command (press Windows Key + R and then type regedit) and then locate the following registry key</p>
<p><code><strong>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96C-E325-11CE-BFC1-08002BE10318}\00XX\Settings\</strong>DrvYYYY_DevType_YYYY_SSYYYYYYYY</code></p>
<p>Where, XX should be the key for Realtek High Definition Audio (usually it is 0000 but if it&#8217;s not the correct key for Realtek HD Audio then you should look for the correct key. You can tell whether the registry key is for Realtek HD Audio or not by looking at the DriverDesc which is located at the right panel) and Y are random numbers</p>
<p>3. Create a new Binary registry key(s) using below Pin Numbers and Binary Values</p>
<p>The Old Pin Numbers (just in case it&#8217;s needed somehow)</p>
<pre>
"Pin00" = Front speakers (rear green)
"Pin01" = Rear speakers (rear black)
"Pin02" = Center / Sub-woofer (rear orange)
"Pin03" = Side speakers (rear gray)
"Pin04" = Mic-in (rear pink)
"Pin05" = Front Mic-In (front pink)
"Pin06" = Line-in (rear blue)
"Pin07" = Front Headphone (front green)
</pre>
<p>The New Pin Numbers</p>
<pre>
"Pin10" = Line-in (rear blue)
"Pin11" = Mic-in (rear pink)
"Pin14" = Front speakers (rear green)
"Pin15" = Rear speakers (rear black)
"Pin16" = Center / Sub-woofer (rear orange)
"Pin17" = Side speakers (rear gray)
"Pin19" = Front Mic-In (front pink)
"Pin1b" = Front Headphone (front green)
</pre>
<p>Binary Values</p>
<pre>
"00 00 00 00" = Line-in
"01 00 00 00" = Mic-in
"02 00 00 00" = Headphones
“03 00 00 00″ = Front speakers 2nd Output
"04 00 00 00" = Front speakers
"05 00 00 00" = Rear speakers
"06 00 00 00" = Center / sub-woofer
"07 00 00 00" = Side speakers
</pre>
<p>For example if you want to map the rear side speakers jack into a front headphone jack, all you have to do is just write <strong>Pin17 binary key with a binary value of 02 00 00 00</strong> as you can see below</p>
<p><a href="//img.reaper-x.com/blogs/2012/02/remap-realtek-jacks-registry.png"><img src="//img.reaper-x.com/blogs/2012/02/remap-realtek-jacks-registry-468x245.png" alt="Remapping / Retasking Realtek jacks by editing registry" title="Remapping / Retasking Realtek jacks by editing registry" width="468" height="245" class="alignnone size-large wp-image-866" srcset="//img.reaper-x.com/blogs/2012/02/remap-realtek-jacks-registry-468x245.png 468w, //img.reaper-x.com/blogs/2012/02/remap-realtek-jacks-registry-250x131.png 250w, //img.reaper-x.com/blogs/2012/02/remap-realtek-jacks-registry.png 933w" sizes="(max-width: 468px) 100vw, 468px" /></a></p>
<p>Note that i didn&#8217;t test any other Pin Numbers besides Pin17 (because what i want is remapping / retasking the side speakers jack into headphone jack and it work right away)</p>
<p>4. Restart your system when you&#8217;re done adjusting it and after logging into Windows, try testing your newly remapped jack(s).</p>
<p>As a bonus, the remapped / retasked jack(s) can also be seen directly on Realtek HD Audio Manager so you can tell if you&#8217;re doing it right. As you can see below, the default rear gray that is for Side speakers has been changed into Headphones</p>
<p><a href="//img.reaper-x.com/blogs/2012/02/realtek-hd-audio-manager-remapped.png"><img src="//img.reaper-x.com/blogs/2012/02/realtek-hd-audio-manager-remapped-468x361.png" alt="Remapped / Retasked Realtek HD Audio Manager" title="Remapped / Retasked Realtek HD Audio Manager" width="468" height="361" class="alignnone size-large wp-image-865" srcset="//img.reaper-x.com/blogs/2012/02/realtek-hd-audio-manager-remapped-468x361.png 468w, //img.reaper-x.com/blogs/2012/02/realtek-hd-audio-manager-remapped-250x192.png 250w, //img.reaper-x.com/blogs/2012/02/realtek-hd-audio-manager-remapped.png 802w" sizes="(max-width: 468px) 100vw, 468px" /></a></p>
<p>Credits goes to Ulti for finding the method and Tnitro21 and Eliah_ for finding the values (<a href="http://www.overclock.net/t/378475/realtek-hd-audio-manager-universal-jack-retasking-ip35-pro-xe">link</a>)</p>
	<p></p>
	<p><em>Copyright &copy; <a href="https://www.reaper-x.com" title="Reaper-X Technology">Reaper-X Technology</a> &ndash; www.reaper-x.com | <a href="https://www.reaper-x.com/2012/02/13/how-to-remap-retasking-realtek-onboard-jacks-ports/" title="How to remap / retasking Realtek onboard jacks / ports">Permalink</a> | <a href="https://www.reaper-x.com/2012/02/13/how-to-remap-retasking-realtek-onboard-jacks-ports/#comments" title="94 comments">94 comments</a></em></p>
	<p><em><a href="https://www.reaper-x.com">0x87485B96</a> | Tags : <a href="https://www.reaper-x.com/category/how-to/" rel="category tag">How To</a></em></p>]]></content:encoded>
			<wfw:commentRss>https://www.reaper-x.com/2012/02/13/how-to-remap-retasking-realtek-onboard-jacks-ports/feed/</wfw:commentRss>
		<slash:comments>94</slash:comments>
		</item>
		<item>
		<title>Create RSS feed from any web page using Yahoo Pipes</title>
		<link>https://www.reaper-x.com/2011/12/27/create-rss-feed-from-any-web-page-using-yahoo-pipes/</link>
		<comments>https://www.reaper-x.com/2011/12/27/create-rss-feed-from-any-web-page-using-yahoo-pipes/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 05:37:41 +0000</pubDate>
		<dc:creator><![CDATA[Reaper]]></dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[web tools]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://www.reaper-x.com/?p=855</guid>
		<description><![CDATA[A simple example on using Yahoo Pipes to create RSS Feed from any website]]></description>
				<content:encoded><![CDATA[<p>In this post, i&#8217;m going to write a simple explanation / basic example about using Yahoo Pipes to fetch a webpage (you are free to use any pages you want assuming they allow Yahoo Pipes) and then create a RSS Feed from it so you can read it on your favorite rss reader</p>
<p>As an example, in this post i&#8217;m going to give an example of creating RSS Feed from HorribleSubs website (horriblesubs.org) that i&#8217;ve been using (for myself only) so i can keep track on their Gintama release easily (i read that they&#8217;re planning on doing a total makeover of their site so i guess it&#8217;s okay to use them as an example)</p>
<p><a href="//img.reaper-x.com/blogs/2011/12/pipes-rss-output.png"><img src="//img.reaper-x.com/blogs/2011/12/pipes-rss-output.png" alt="Yahoo Pipes HorribleSubs RSS Output example using Fetch Page module" title="Yahoo Pipes HorribleSubs RSS Output example using Fetch Page module" width="440" height="168" class="alignnone size-full wp-image-860" srcset="//img.reaper-x.com/blogs/2011/12/pipes-rss-output.png 440w, //img.reaper-x.com/blogs/2011/12/pipes-rss-output-250x95.png 250w" sizes="(max-width: 440px) 100vw, 440px" /></a></p>
<p>Before anything else, please see <a href="http://pipes.yahoo.com/pipes/pipe.info?_id=f6be9368f336e63babbf0ec53738ded5">the source of the pipe used in this example</a> (you need to log in to Yahoo first) because you&#8217;ll need to be logged in to Yahoo to see or create a new pipe</p>
<p><strong>Update 1</strong>: <a href="http://pipes.yahoo.com/pipes/pipe.info?_id=aa89e803a5b91055e4f87bde7b8103fa">Here&#8217;s the updated version of the pipe which is used for their new domain</a> (horriblesubs.info) and their new site design. The old pipe is left there in case you want to compare the old pipe with the updated pipe and also because the screenshot that is used here is based from the old pipe. As you can see, the process itself is still the same but with some adjustments</p>
<p><strong>Update 2</strong>: As of June 2012 it is still working (last time i checked their website because ever since Gintama end, i don&#8217;t check it anymore), and i noticed that they now published their own RSS Feed so if you only use this simple example just to see their rss feed, i recommend to grab their official feed instead because i saw on their page that they&#8217;re planning on redesigning their website</p>
<p><strong>Update 3</strong>: As of November 2012 the above pipe (the pipe in update 1) is still working (if you need to see a working example), and i made some changes in this post by including images</p>
<p>1. First thing you need to do is obviously examine the page source you&#8217;re going to fetch to see where you should start cutting and how the items separated</p>
<p>For example, in this case the content i&#8217;m going to pick is wrapped within a div ( &lt;div id=&quot;tab3&quot; class=&quot;boxcontent&quot;&gt; ) and the items is separated by &lt;br/&gt; tag and so i just need to write that into the <strong>fetch page module</strong></p>
<p><a href="//img.reaper-x.com/blogs/2011/12/pipes-fetch-page-target-source.png"><img src="//img.reaper-x.com/blogs/2011/12/pipes-fetch-page-target-source-468x90.png" alt="Target HTML Source" title="Target HTML Source" width="468" height="90" class="alignnone size-large wp-image-861" srcset="//img.reaper-x.com/blogs/2011/12/pipes-fetch-page-target-source-468x90.png 468w, //img.reaper-x.com/blogs/2011/12/pipes-fetch-page-target-source-250x48.png 250w, //img.reaper-x.com/blogs/2011/12/pipes-fetch-page-target-source.png 474w" sizes="(max-width: 468px) 100vw, 468px" /></a></p>
<p>and here is what it looks like on the Yahoo Pipes side</p>
<p><a href="//img.reaper-x.com/blogs/2011/12/yahoo-pipes-fetch-page.png"><img src="//img.reaper-x.com/blogs/2011/12/yahoo-pipes-fetch-page.png" alt="Example of Yahoo Pipes fetch page module" title="Yahoo Pipes fetch page module" width="399" height="123" class="alignnone size-full wp-image-883" /></a></p>
<p>2. At this part, i&#8217;m filtering the content from unneded html tags and content that i deemed unnecessary by using the regex / regular expression module as you can see on the pipe source. But because there&#8217;s no single regex rule to rule them all (because it depend on your needs), you&#8217;ll need to experiment by yourself at the regex parts</p>
<p><a href="//img.reaper-x.com/blogs/2011/12/yahoo-pipes-regex-1.png"><img src="//img.reaper-x.com/blogs/2011/12/yahoo-pipes-regex-1-468x111.png" alt="Cleaning up stuff using the regex module" title="Yahoo Pipes Regex Module" width="468" height="111" class="alignnone size-large wp-image-884" srcset="//img.reaper-x.com/blogs/2011/12/yahoo-pipes-regex-1-468x111.png 468w, //img.reaper-x.com/blogs/2011/12/yahoo-pipes-regex-1.png 601w" sizes="(max-width: 468px) 100vw, 468px" /></a></p>
<p>3. And now, so i can process each item separately, i&#8217;m mapping the previously cleaned up content as title, description, and link which is going to be used for the RSS Feed title, description and link respectively by using the <strong>rename module</strong></p>
<p><a href="//img.reaper-x.com/blogs/2011/12/yahoo-pipes-mapping.png"><img src="//img.reaper-x.com/blogs/2011/12/yahoo-pipes-mapping.png" alt="Mapping items on Yahoo Pipes" title="Yahoo Pipes mapping module" width="377" height="134" class="alignnone size-full wp-image-886" /></a></p>
<p>and here&#8217;s the output</p>
<p><a href="//img.reaper-x.com/blogs/2011/12/pipes-mapping-debug.png"><img src="//img.reaper-x.com/blogs/2011/12/pipes-mapping-debug-468x149.png" alt="Yahoo Pipes items mapping" title="Yahoo Pipes items mapping" width="468" height="149" class="alignnone size-large wp-image-857" srcset="//img.reaper-x.com/blogs/2011/12/pipes-mapping-debug-468x149.png 468w, //img.reaper-x.com/blogs/2011/12/pipes-mapping-debug-250x79.png 250w, //img.reaper-x.com/blogs/2011/12/pipes-mapping-debug.png 568w" sizes="(max-width: 468px) 100vw, 468px" /></a></p>
<p>4. Once again the <strong>regex module</strong> is used and this time i&#8217;m using it to clean-up the html tags in the title (to differentiate it from the description) and the link so it gives you the target url only (in this case it is the torrent link) so when you click on the title from your RSS Reader you&#8217;ll go to the target url directly (note: see the output difference between below output image and the above image)</p>
<p><a href="//img.reaper-x.com/blogs/2011/12/yahoo-pipes-regex-2.png"><img src="//img.reaper-x.com/blogs/2011/12/yahoo-pipes-regex-2-468x93.png" alt="Another example of using regex module to clean up stuff" title="Yahoo Pipes Regex Module" width="468" height="93" class="alignnone size-large wp-image-885" srcset="//img.reaper-x.com/blogs/2011/12/yahoo-pipes-regex-2-468x93.png 468w, //img.reaper-x.com/blogs/2011/12/yahoo-pipes-regex-2.png 602w" sizes="(max-width: 468px) 100vw, 468px" /></a></p>
<p>and here&#8217;s the output</p>
<p><a href="//img.reaper-x.com/blogs/2011/12/pipes-mapping-cleaned.png"><img src="//img.reaper-x.com/blogs/2011/12/pipes-mapping-cleaned-468x87.png" alt="Yahoo Pipes mapping cleaned up" title="Yahoo Pipes mapping cleaned up" width="468" height="87" class="alignnone size-large wp-image-858" srcset="//img.reaper-x.com/blogs/2011/12/pipes-mapping-cleaned-468x87.png 468w, //img.reaper-x.com/blogs/2011/12/pipes-mapping-cleaned-250x46.png 250w, //img.reaper-x.com/blogs/2011/12/pipes-mapping-cleaned.png 567w" sizes="(max-width: 468px) 100vw, 468px" /></a></p>
<p>5. Finally connect it to the <strong>pipe output</strong> and to get it as RSS, you just need to copy the <strong>Get as RSS</strong> link from your pipe to display it as RSS Feed and done</p>
<p><a href="//img.reaper-x.com/blogs/2011/12/pipes-final.png"><img src="//img.reaper-x.com/blogs/2011/12/pipes-final-468x170.png" alt="Yahoo Pipes Fetch Page example" title="Yahoo Pipes Fetch Page example" width="468" height="170" class="alignnone size-large wp-image-856" srcset="//img.reaper-x.com/blogs/2011/12/pipes-final-468x170.png 468w, //img.reaper-x.com/blogs/2011/12/pipes-final-250x91.png 250w, //img.reaper-x.com/blogs/2011/12/pipes-final.png 531w" sizes="(max-width: 468px) 100vw, 468px" /></a></p>
<p>Also because there&#8217;s a usage limits imposed by Yahoo Pipes as quoted below</p>
<blockquote><p>
200 runs (of a given Pipe) in 10 minutes<br />
200 runs (of any Pipe) from an IP in 10 minutes<br />
If you exceed the 200 runs in a 10 minute block, your Pipe will be 999&#8217;ed for a hour.
</p></blockquote>
<p>You should make sure to cache your output before using it (unless perhaps you&#8217;re the only person that use the pipe you&#8217;ve created though it&#8217;s still better to cache it)</p>
	<p></p>
	<p><em>Copyright &copy; <a href="https://www.reaper-x.com" title="Reaper-X Technology">Reaper-X Technology</a> &ndash; www.reaper-x.com | <a href="https://www.reaper-x.com/2011/12/27/create-rss-feed-from-any-web-page-using-yahoo-pipes/" title="Create RSS feed from any web page using Yahoo Pipes">Permalink</a> | <a href="https://www.reaper-x.com/2011/12/27/create-rss-feed-from-any-web-page-using-yahoo-pipes/#comments" title="3 comments">3 comments</a></em></p>
	<p><em><a href="https://www.reaper-x.com">0x87485B96</a> | Tags : <a href="https://www.reaper-x.com/category/how-to/" rel="category tag">How To</a></em></p>]]></content:encoded>
			<wfw:commentRss>https://www.reaper-x.com/2011/12/27/create-rss-feed-from-any-web-page-using-yahoo-pipes/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to boot Clonezilla and GParted from HDD on Windows</title>
		<link>https://www.reaper-x.com/2011/10/22/how-to-boot-clonezilla-and-gparted-from-hdd-on-windows/</link>
		<comments>https://www.reaper-x.com/2011/10/22/how-to-boot-clonezilla-and-gparted-from-hdd-on-windows/#respond</comments>
		<pubDate>Sat, 22 Oct 2011 06:30:14 +0000</pubDate>
		<dc:creator><![CDATA[Reaper]]></dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.reaper-x.com/?p=849</guid>
		<description><![CDATA[How to boot Clonezilla and GParted from HDD on Windows using EasyBCD NeoGRUB / Grub4DOS]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m pretty sure most of you already know about Clonezilla and GParted, and the usefulness of those two tools. And if you&#8217;ve been wondering on how to run Clonezilla and GParted directly from your HDD (frugal install) instead booting from a CD or a USB Flashdisk on Windows, perhaps this simple guide can help you with that</p>
<p>Before we get started, i have to mention that there are two ways to run Clonezilla and GParted on Windows although they both use the same thing, the first one is by installing / adding Grub4DOS manually and the other one is by using EasyBCD a GUI to install NeoGRUB / packaged Grub4DOS. And in this post i&#8217;ll focus on the later and that is using NeoGRUB</p>
<h2>Prerequisite</h2>
<ol>
<li>EasyBCD [<a href="http://neosmart.net/dl.php?id=1">download</a>]</li>
<li>Clonezilla Live [<a href="http://clonezilla.org/downloads.php">download</a>]: You are free to choose between the ISO version or ZIP version. For me, i choose the AMD64-ISO version</li>
<li>GParted Live [<a href="http://gparted.sourceforge.net/download.php">download</a>]: Same goes here too, you are free to choose between ISO or ZIP</li>
<li>7-Zip / Winrar / etc: This is used to extract the file inside the ISO or ZIP</li>
</ol>
<h2>Boot Clonezilla and GParted with NeoGRUB / Grub4DOS</h2>
<p>1. Install EasyBCD or Grub4DOS (<a href="http://diddy.boot-land.net/grub4dos/files/install.htm">instruction here</a> if you prefer to use Grub4DOS rather than NeoGRUB), run and at the add new entry section choose NeoGRUB and install it</p>
<p><a href="//img.reaper-x.com/blogs/2011/10/easybcd-neogrub.jpg"><img src="//img.reaper-x.com/blogs/2011/10/easybcd-neogrub.jpg" alt="NeoGRUB" title="EasyBCD NeoGRUB" width="468" height="384" class="alignnone size-full wp-image-850" srcset="//img.reaper-x.com/blogs/2011/10/easybcd-neogrub.jpg 468w, //img.reaper-x.com/blogs/2011/10/easybcd-neogrub-250x205.jpg 250w" sizes="(max-width: 468px) 100vw, 468px" /></a></p>
<p>2. Extract live directory inside Clonezilla and GParted somewhere one by one and rename it before extracting the other one. For me i choose to extract it and rename it into <strong>clonezilla-live</strong> and <strong>gparted-live</strong> (if you use different name than listed here, make sure to adjust the code below to your clonezilla and gparted directory name)</p>
<p>3. Now open C:\NST\menu.lst with your favorite text editor and then add this lines</p>
<pre>
# CLONEZILLA
title Clonezilla 1.2.10-14 AMD64
find --set-root /clonezilla-live/vmlinuz
kernel /clonezilla-live/vmlinuz boot=live config noswap nolocales edd=on nomodeset noprompt ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_keymap="" ocs_live_batch="no" ocs_lang="" vga=788 live-media-path=/clonezilla-live toram=filesystem.squashfs ip=frommedia  nosplash
initrd /clonezilla-live/initrd.img

# GPARTED
title GParted 0.9.1.1
find --set-root /gparted-live/vmlinuz
kernel /gparted-live/vmlinuz boot=live config noswap noprompt live-media-path=/gparted-live toram=filesystem.squashfs ip=frommedia nosplash
initrd /gparted-live/initrd.img
</pre>
<p>4. Restart your computer and choose NeoGRUB and then choose either Clonezilla or GParted and your done :)</p>
	<p></p>
	<p><em>Copyright &copy; <a href="https://www.reaper-x.com" title="Reaper-X Technology">Reaper-X Technology</a> &ndash; www.reaper-x.com | <a href="https://www.reaper-x.com/2011/10/22/how-to-boot-clonezilla-and-gparted-from-hdd-on-windows/" title="How to boot Clonezilla and GParted from HDD on Windows">Permalink</a> | <a href="https://www.reaper-x.com/2011/10/22/how-to-boot-clonezilla-and-gparted-from-hdd-on-windows/#comments" title="Add a comment">Add a comment</a></em></p>
	<p><em><a href="https://www.reaper-x.com">0x87485B96</a> | Tags : <a href="https://www.reaper-x.com/category/how-to/" rel="category tag">How To</a></em></p>]]></content:encoded>
			<wfw:commentRss>https://www.reaper-x.com/2011/10/22/how-to-boot-clonezilla-and-gparted-from-hdd-on-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Install Squid Proxy on Windows</title>
		<link>https://www.reaper-x.com/2011/10/17/how-to-install-squid-proxy-on-windows/</link>
		<comments>https://www.reaper-x.com/2011/10/17/how-to-install-squid-proxy-on-windows/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 09:12:09 +0000</pubDate>
		<dc:creator><![CDATA[Reaper]]></dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[proxy server]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.reaper-x.com/?p=848</guid>
		<description><![CDATA[How to install Squid on Windows and optionally chaining it with Privoxy and Tor to filter and anonymize your connection]]></description>
				<content:encoded><![CDATA[<p>Back in 2006 or in the early days after i started this blog. I wrote about Installing Squid Cache on Windows. And i think i should rewrite it again because some parts in the old post is missing (back when this blog started, this blog is hosted at WordPress.com and when i moved to a self hosted solution there are some errors in the importing process and although i know about that since a long time ago i&#8217;m just too lazy to rewrite it again lol). But well &#8230; what&#8217;s done is done :)</p>
<p>Anyway, before we begin, make sure that you have downloaded <strong>Squid Windows Binary Package / Squid for Windows</strong> that can be downloaded from <a href="http://squid.acmeconsulting.it/">Acmeconsulting</a>. And you have extracted it somewhere on your hard drive. In this post, i choose to extract it to <strong>&#8220;C:\Squid&#8221;</strong> due to hardcoded path and beside most people don&#8217;t like to read long post. So if you changed Squid location, make sure to adjust it accordingly. And don&#8217;t worry the actual installation process is fast. The other steps described here are optional unless you need it</p>
<p>And as a note, i wrote this post (tested) on Windows 7 x64 with UAC Enabled using Squid 2.7 Stable 8 and i&#8217;m pretty sure as it will work with earlier version of Windows as well. And No! you don&#8217;t need to turn off UAC because turning UAC off isn&#8217;t a good solution</p>
<p>And now let&#8217;s get started</p>
<h2 id="squid-initial-setup">Initial Setup</h2>
<p>First thing you need to do is, open command prompt as Administrator (if you&#8217;re on Windows Vista or Windows 7 and have UAC enabled) and then type below command to copy the default configuration files and install squid as windows service:</p>
<pre>
cd /d c:\squid
copy etc\*.default etc\*.
sbin\squid.exe -i
</pre>
<p>For the sake of completion, if you choose to put Squid.conf (or the entire Squid files) not at Drive C, replace the last command with this one (where x is your drive letter):</p>
<pre>
sbin\squid.exe -i -f "x:/squid/etc/squid.conf"
</pre>
<p>What the above code do:</p>
<ol>
<li>Change directory to your Squid directory</li>
<li>Create the default configuration file for Squid which is a copy from the default configuration file</li>
<li>Install Squid Cache as Windows Service so it&#8217;ll start Squid Service automatically</li>
</ol>
<p>And now we&#8217;re going to edit the main configuration for Squid Proxy Cache, and that is <strong>squid.conf</strong>. But obviously not everything is going to be covered here (you should go to the squid official site for this purpose). So i&#8217;m just going to list all the recommended options you should be aware / change</p>
<h2>Restricting access to your Squid Proxy Server</h2>
<p>To limit on who are allowed to connect to your Proxy Server, you should change / add the allowed IP Address that is allowed to connect to your squid proxy at below section</p>
<pre>
acl localnet src 10.0.0.0/8	# RFC1918 possible internal network
acl localnet src 172.16.0.0/12	# RFC1918 possible internal network
acl localnet src 192.168.0.0/16	# RFC1918 possible internal network
</pre>
<p>By using the same format as the above code for example, <strong>acl localnet src 123.456.789.0</strong></p>
<p>And then right before <strong>http_access allow localnet</strong>, add <strong>http_access allow localhost</strong> so it looks like:</p>
<pre>
http_access allow localhost
http_access allow localnet
</pre>
<p>And finally if you don&#8217;t want Squid to bind to all adapters (which is the default) you might want to change Squid Listen Address and Port to your LAN IP Address or if you&#8217;re just going to use Squid for yourself only then you should use below</p>
<pre>
# Default http_port 3128
# Bind to localhost at port 3128 only
http_port 127.0.0.1:3128
</pre>
<h2 id="squid-limit">Limiting access to specific ports only</h2>
<p>If you need to limit on which ports your Squid proxy clients are allowed to connect to, then you need to adjust this</p>
<pre>
acl Safe_ports port 80		# http
acl Safe_ports port 21		# ftp
acl Safe_ports port 443		# https
acl Safe_ports port 70		# gopher
acl Safe_ports port 210		# wais
acl Safe_ports port 1025-65535	# unregistered ports
acl Safe_ports port 280		# http-mgmt
acl Safe_ports port 488		# gss-http
acl Safe_ports port 591		# filemaker
acl Safe_ports port 777		# multiling http
</pre>
<p>For example if you want to limit your clients to HTTP and HTTPS only, then you can remove / comment all the other lines beside 80 and 443</p>
<h2 id="squid-cache-directory">Changing disk cache location and size</h2>
<p>For better performance, it&#8217;s better to put the Squid cache directory into another partition (in other words, not your system partition) and even better on different hard drive. So find this line:</p>
<pre>
cache_dir ufs c:/squid/var/cache <strong>100</strong> 16 256
</pre>
<p>And then change it to any directory you want, and also adjust the disk cache size to your liking, for example to put your squid cache directory at X:\squid-data\cache with a maximum capacity of 1500 MB</p>
<pre>
cache_dir ufs x:/squid-data/cache 1500 16 256
</pre>
<p>Also it&#8217;d better to put all squid logs into different partition too</p>
<h2 id="squid-cache-data-directory">Creating Squid cache data directory</h2>
<p>Now back at the command prompt again, and this time type:</p>
<pre>c:\squid\sbin\squid.exe -z</pre>
<p>To create Squid Swap Directories which is used to store cached objects</p>
<h2 id="start-squid-service">Starting Squid Service</h2>
<p>Now we need to start Squid service for the first time (the next time it&#8217;d start automatically), and there are two ways to achieve this, you are free to choose either the command prompt method or the GUI method</p>
<p>If you choose command prompt method then you need to type (run command prompt as administrator if you&#8217;re on vista or 7):</p>
<pre>net start squid</pre>
<p>If you choose the GUI way then, press <strong>Windows Key (on your keyboard) + R</strong>, and then type <strong>services.msc</strong>, search for and right click on Squid service and choose Start to start Squid Service</p>
<p>And that&#8217;s it you&#8217;re done Installing / Configuring Squid on Windows</p>
<p>But if you still want more, then please continue reading :)</p>
<p><strong>Special Note: If you placed squid not at C:\Squid, make sure to change anything in squid.conf that point towards C:\ into where you put Squid</strong></p>
<h2 id="squid-tweak">Minimal Squid Configuration Adjustment</h2>
<p>While the default configuration included with Squid is optimal for many, but sometimes you want more from your Squid installation and so we&#8217;re going to tweak several options i think necessary but obviously this is designed for a really small network, for other purpose or larger network, please consult your nearest squid experts :)</p>
<h3 id="creating-custom-conf">Creating custom.conf file</h3>
<p>Create a new text file and save it as custom.conf file inside your squid/etc directory so it&#8217;ll looks like <strong>c:/squid/etc/custom.conf</strong> so we don&#8217;t need to modify the original squid.conf directly just to override default values</p>
<p>And the next step would be, opening squid.conf and find this line</p>
<pre>refresh_pattern .		0	20%	4320</pre>
<p>and comment it (by placing #) at the beginning of the line. Then place below line at the bottom of squid.conf</p>
<pre>include "c:/squid/etc/custom.conf"</pre>
<p>And now paste this into the custom.conf file you just created:</p>
<pre>
#######
# ACL #
#######

# to allow purging cache from localhost only
acl PURGE method PURGE
http_access allow PURGE localhost
http_access deny PURGE

# always direct all ftp request
acl FTP proto FTP
always_direct allow FTP

########
# TUNE #
########

# enable pipeline
pipeline_prefetch on

# shutdown timeout
shutdown_lifetime 5 seconds

# no half closed
half_closed_clients off

##############
# CACHE SIZE #
##############

# maximum object size
maximum_object_size 64 MB
cache_mem 96 MB
maximum_object_size_in_memory 256 KB

###################
# REFRESH_PATTERN #
###################

# ============= #
# GENERAL USAGE #
# ============= #

# Note: This is some of the refresh_pattern i'm using, and of course feel free to adjust it to your liking
# For static files i choose to ignore-reload only as for wikipedia it's an example for site specific

# static files for websites
refresh_pattern -i \.(j|cs)s$ 10080 100% 10081

# static images
refresh_pattern -i \.(jpe?g|gif|png|bmp|ico|svg)$ 10080 100% 10081 ignore-reload

# static a/v
refresh_pattern -i \.(wm(a|v)|mp[0-9]?a?|mpe?g|avi|mk(a|v)|og(g|m)|flv|swf|rmvb|m2?ts)$ 4320 100% 4321 ignore-reload

# static archive type
refresh_pattern -i \.(exe|zip|r(ar|[0-9]+)|7z|ace|gz|tar|bz2)$ 4320 100% 4321 ignore-reload

# static document type
refresh_pattern -i \.((doc|xls|ppt)x?|pdf|txt)$ 4320 100% 4321 ignore-reload

# wikipedia
refresh_pattern -i wikipedia\.org\/wiki\/.* 4320 50% 4321 override-expire ignore-private

# =============== #
# DEFAULT PATTERN #
# =============== #

# default pattern
refresh_pattern . 0	20%	4320

########
# MISC #
########

# use specific dns server in this case google and opendns
dns_nameservers 8.8.8.8 8.8.4.4 208.67.222.222 208.67.220.220

# disable htcp icp because we aren't going to use it
htcp_port 0
icp_port 0

# block displaying specific headers
header_access Via deny all
header_access X-Forwarded-For deny all

# hide version number
httpd_suppress_version_string on

# change hostname
visible_hostname Reaper-X-Cache

###########
# THE END #
###########
</pre>
<p>I believe the Squid config file already tells you on what the above directives do, but just in case:</p>
<h3 id="access-rule">ACL Section</h3>
<p>There are two items here, the first one is an access rule to allow you to purge squid cache manually from the command line while the other one is for directing all ftp requests directly</p>
<p>And to purge your Squid Cache Object manually, you can type this at the command prompt:</p>
<pre>c:\squid\bin\squidclient.exe -m PURGE full-url</pre>
<p>Where full-url replaced by the full address of the object you&#8217;re trying to purge. Here&#8217;s an example of what it&#8217;ll looks like when you purge a cached object successfully (assume it&#8217;s already cached first)</p>
<pre>
C:\squid\bin\squidclient.exe -m PURGE http://farm1.static.flickr.com/55/136797856_bb683d8f22.jpg
HTTP/1.0 200 OK
Server: squid
Date: Sun, 16 Oct 2011 06:01:48 GMT
Content-Length: 0
Expires: Sun, 16 Oct 2011 06:01:48 GMT
X-Cache: MISS from Reaper-X-Cache
X-Cache-Lookup: NONE from Reaper-X-Cache:3128
Connection: close
</pre>
<p>Note: if you want to look at what url has been cached by Squid (as long as you didn&#8217;t restart the squid process), you can type this:</p>
<pre>c:\squid\bin\squidclient.exe mgr:objects | find /i "site url"</pre>
<h3 id="squid-cache-size">Cache Size Section</h3>
<p>If you want Squid to cache larger objects then you should increase <strong>maximum_object_size</strong> from the default of 4 MB into bigger value. And if you frequently access that objects, it&#8217;d be better to increase the Memory Cache Options such as <strong>cache_mem</strong> and <strong>maximum_object_size_in_memory</strong> to serve that object directly from Memory. And depending on your hardware configuration, i&#8217;d suggest you to adjust it to your hardware setup to find the best configuration for you :)</p>
<h3 id="squid-refresh-pattern">Refresh Pattern Section</h3>
<p>The refresh_pattern is used so you can fine tune caching specific file type or page. In this guide i have included caching for common static content such as images, static content that is used for website, audio videos, documents, and archives. With most of them using <strong>ignore-reload</strong> so even if your client do a hard refresh it&#8217;ll still serve the static files from the squid cache. As for the wikipedia part, i believe you can guess what that&#8217;s used for :)</p>
<h3 id="squid-misc">Misc. Section</h3>
<p>There are 5 items here:</p>
<p><strong>dns_nameservers</strong>: This basically tells squid on what DNS server to use. So make sure to change this to your DNS Server (you can use Google public DNS, OpenDNS, Comodo Secure DNS, etc)</p>
<p><strong>Disabling htcp and icp port</strong>: Since we&#8217;re not going to use this, we&#8217;re better off disabling it but if you think you&#8217;re going to use it then feel free to change it :)</p>
<p><strong>headers_access</strong>: By default Squid will display various HTTP Headers that is indicating that you&#8217;re behind a proxy. Some people (including me) don&#8217;t like this especially if you&#8217;re just in a small network</p>
<p><strong>visible_hostname and httpd_suppress_version_string</strong>: While we&#8217;re at it, we might as well make a good name for our Squid cache and hide the squid version used :)</p>
<h3 id="reload-squid-config">Reload Squid configuration file</h3>
<p>Now since we&#8217;re done configuring Squid, we need to tell Squid to reload it&#8217;s configuration file, and to do that you need to open Command Prompt (admin mode as usual if in 7 / Vista) and then type:</p>
<pre>c:\squid\sbin\squid.exe -k reconfigure -n Squid</pre>
<p>And done &#8230; the next step would be configuring your browser to use your Proxy by pointing it to your <strong>[proxy server address]:[port]</strong></p>
<p>But what if you want your Windows Squid server to be able to filter ads, and probably more? then please continue reading :)</p>
<h2 id="squid-ads-filtering">Filtering Ads on Squid</h2>
<p>There are three ways to use Ads Filtering for Squid on Windows (at least there are only three that i&#8217;m aware of, so if you know more, i&#8217;d be grateful if you could mention them here. Because i&#8217;m not sure on whether SquidGuard or DansGuardian can be used on Windows)</p>
<p>1. The first one is using the a pre-made list of various ad servers created by <a href="http://pgl.yoyo.org/as/">http://pgl.yoyo.org/as/</a> and the instructions on how to use it with Squid can be found there and it&#8217;s straight forward</p>
<p>2. While the second method is by using a redirector program called adzapper that involves installing perl (well there&#8217;s a portable version too if you prefer portable perl). But you could use them both if you want. And to use it you just need to:</p>
<ol>
<li>Go to <a href="http://adzapper.sf.net">adzapper website</a> and <a title="Direct Link to Adzapper Script" href="http://adzapper.sourceforge.net/scripts/squid_redirect">download the script</a>, rename it to <strong>squid_redirect.pl</strong> and place it into C:\squid\etc</li>
<li>Download Perl if you haven&#8217;t already. And if you&#8217;re looking for a portable version of Perl that doesn&#8217;t need to be installed, you can use <a href="http://strawberryperl.com/">Strawberry Perl</a>. Just make sure to go to their releases archive page</li>
<li>Put this line at the <strong>custom.conf</strong> our custom config file for squid</li>
</ol>
<pre>
# Make sure to change the directory to where perl.exe located
redirect_program "x:/strawberry-perl-directory/perl/bin/perl.exe" "c:/squid/etc/squid_redirector.pl"
</pre>
<p>3. And finally the third method is involving chaining Squid Proxy with Privoxy that is described below because it deserves a new section :P</p>
<h2 id="squid-proxy-chaining">Chaining Squid to other Proxy Server / Proxy Chain</h2>
<p>This part deals with chaining Squid that is designed to handle caching to other proxy server designed for specific purpose. And in this case we&#8217;re going to chain squid with privoxy that is going to be used for various filtering purpose. But i&#8217;m not going into a much detail about Privoxy (like how to add new rules into Privoxy for example) because it&#8217;s already listed on their Documentation :)</p>
<h3 id="squid-privoxy-chain">Using Squid with Privoxy</h3>
<p>First thing first. Put below lines in <strong>custom.conf</strong> right after the ACL section:</p>
<pre>
# don't cache privoxy config
acl privoxy-config dstdomain config.privoxy.org
cache deny privoxy-config

# forward request to privoxy
cache_peer 127.0.0.1 parent 8118 7 no-query no-digest

# force all requests to go to the proxy chain
never_direct allow all
</pre>
<p>And then if you haven&#8217;t downloaded <a href="http://privoxy.org">Privoxy</a> yet, download and extract it somewhere and then run privoxy.exe and finally <a href="#reload-squid-config">reload squid configuration</a> again and then open your browser and point your browser to <a rel="nofollow" href="http://config.privoxy.org" title="Privoxy Configuration Page from Browser">http://config.privoxy.org</a></p>
<p>If you do everything correctly, you&#8217;ll see this message <strong>This is Privoxy X.Y.Z on hostname.com (127.0.0.1), port 8118, enabled</strong></p>
<p>Pssst &#8230; To make editing Privoxy configuration much easier, you can use the included web-based editor (although for some items you need to edit the files directly). And to enable it, find and change <strong>enable-edit-actions</strong> to 1 in <strong>config.txt</strong>. But please <em>read the reason on why it is disabled by default</em></p>
<p>And now we&#8217;re done with chaining Squid to Privoxy. But what if you want more? like for example chaining Squid to Privoxy and then to other proxy server or perhaps <a href="https://www.torproject.org/">Tor</a> or <a href="http://anon.inf.tu-dresden.de/index_en.html">JAP</a>? all you have to do is just put this line:</p>
<p>If you&#8217;re planning on chaining to Tor</p>
<pre>
# connecting to Tor
forward-socks5 / 127.0.0.1:9050 .
</pre>
<p>or if you want to connect to your local JAP setup</p>
<pre>
# for JAP
forward / 127.0.0.1:4001 .
</pre>
<p>Into <strong>Privoxy config.txt</strong>. To forward all requests to Tor (assuming that you have configured Tor correctly and it is running</p>
<p>And that is all &#8230; i hope this post isn&#8217;t to long, but if you did read it until the end, the reason i choose to rewrite the Squid Windows Guide is because the old one looks like a total mess for me (not that the new one is not messy but i think it&#8217;s a little bit better). Anyway I hope you find this guide useful and it helps you on installing Squid on Windows :)</p>
	<p></p>
	<p><em>Copyright &copy; <a href="https://www.reaper-x.com" title="Reaper-X Technology">Reaper-X Technology</a> &ndash; www.reaper-x.com | <a href="https://www.reaper-x.com/2011/10/17/how-to-install-squid-proxy-on-windows/" title="How to Install Squid Proxy on Windows">Permalink</a> | <a href="https://www.reaper-x.com/2011/10/17/how-to-install-squid-proxy-on-windows/#comments" title="37 comments">37 comments</a></em></p>
	<p><em><a href="https://www.reaper-x.com">0x87485B96</a> | Tags : <a href="https://www.reaper-x.com/category/how-to/" rel="category tag">How To</a></em></p>]]></content:encoded>
			<wfw:commentRss>https://www.reaper-x.com/2011/10/17/how-to-install-squid-proxy-on-windows/feed/</wfw:commentRss>
		<slash:comments>37</slash:comments>
		</item>
	</channel>
</rss>
