<?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>How To Survive The Claire Perry Internet &#187; Linux</title>
	<atom:link href="/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://survivetheclaireperryinter.net</link>
	<description></description>
	<lastBuildDate>Fri, 16 Oct 2015 09:30:30 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.8</generator>
	<item>
		<title>Building a PIPCU Resistant Immunicity Style Proxy Using Tor</title>
		<link>https://survivetheclaireperryinter.net/2014/08/23/building-a-pipcu-resistant-immunicity-style-proxy-using-tor/</link>
		<comments>https://survivetheclaireperryinter.net/2014/08/23/building-a-pipcu-resistant-immunicity-style-proxy-using-tor/#comments</comments>
		<pubDate>Sat, 23 Aug 2014 14:18:44 +0000</pubDate>
		<dc:creator><![CDATA[Op]]></dc:creator>
				<category><![CDATA[Censorship Evasion]]></category>
		<category><![CDATA[Censorship Reporting]]></category>
		<category><![CDATA[Filter bypass]]></category>
		<category><![CDATA[Filter Evasion]]></category>
		<category><![CDATA[Technical Implementation]]></category>
		<category><![CDATA[Block]]></category>
		<category><![CDATA[BT]]></category>
		<category><![CDATA[Bypass]]></category>
		<category><![CDATA[Law]]></category>
		<category><![CDATA[legal]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Sky]]></category>
		<category><![CDATA[TalkTalk]]></category>
		<category><![CDATA[Virgin]]></category>
		<category><![CDATA[webproxy]]></category>

		<guid isPermaLink="false">https://survivetheclaireperryinter.net/?p=392</guid>
		<description><![CDATA[- A Little History - How a PAC Proxy Works - Using the Tor PAC Proxy - Creating Your Local Tor Proxy - Some Final Thoughts A Little History In June 2004 BT took the step of putting technical measures in place that allowed them to censor the Internet. At the time there was muffled<br /><a class="moretag" href="/2014/08/23/building-a-pipcu-resistant-immunicity-style-proxy-using-tor/">Continue reading...</a>]]></description>
				<content:encoded><![CDATA[<div class="well">
<h5><a href="#history">- A Little History </a></h5>
<h5><a href="#how">- How a PAC Proxy Works</a></h5>
<h5><a href="#use">- Using the Tor PAC Proxy</a></h5>
<h5><a href="#create">- Creating Your Local Tor Proxy</a></h5>
<h5><a href="#final">- Some Final Thoughts</a></h5>
</div>
<h2><a id="history"></a>A Little History</h2>
<p>In June 2004 BT took the step of <a href="http://www.theguardian.com/technology/2004/jun/06/childrensservices.childprotection">putting technical measures in place</a> that allowed them to censor the Internet.</p>
<p>At the time there was muffled dissent at the idea of creating and deploying such technology but those voices were silenced by accusations that opposition to CleanFeed was to support the abuse of children.</p>
<p>We warned that this was the start of a slippery slope.</p>
<p>In 2011 the MPA took BT to court in an attempt to block Newzbin, when the Honourable Justice Arnold understood that BT already had an Internet censorship system in place he ordered it to be used to block Newzbin</p>
<blockquote><p>In respect of its customers to whose internet service the system known as Cleanfeed is applied whether optionally or otherwise, [BT] shall within 14 days adopt the following technical means to block or attempt to block access by its customers to the website known as Newzbin2 currently accessible at www.newzbin.com, its domains and sub-domains and including payments.newzbin.com and any other IP address or URL whose sole or predominant purpose is to enable or facilitate access to the Newzbin2 website<small>Hon Justice Arnold</small></p>
</blockquote>
<p>On the back of the Newzbin success various other private entities took to the High Court to chase more ISPs and in February 2012 the Honourable Justice Arnold <a href="http://www.bailii.org/cgi-bin/markup.cgi?doc=/ew/cases/EWHC/Ch/2012/268.html">ruled</a></p>
<blockquote><p>&#8230; that both users and the operators of TPB infringe the copyrights of the Claimants (and those they represent) in the UK.<small>Hon Justice Arnold</small></p>
</blockquote>
<p>The result of this ruling was that BT, TalkTalk, Sky and others were required to <em>take measures to block or at least impede access by their customers to a peer-to-peer (&#8220;P2P&#8221;) file-sharing website called The Pirate Bay (&#8220;TPB&#8221;).</em></p>
<p>At the time the OpenRightsGroup issued the following statement;</p>
<blockquote><p>Blocking the Pirate Bay is pointless and dangerous. It will fuel calls for further, wider and even more drastic calls for internet censorship of many kinds, from pornography to extremism.<small>Jim Killock, Executive Director of the Open Rights Group</small></p>
</blockquote>
<p>So here we are in 2014, a decade after we originally predicted the slippery slope of Internet censorship and we have Court ordered censorship at the behest of foreign private entities, secret URL blocklists courtesy of the IWF, varying levels of Internet Filtering in homes, Internet filtering in coffee shops etc and now the City of London Police appear to be using organised Crime Legislation to intimidate and shut down proxies.</p>
<h2><a id="how"></a>How a PAC Proxy Works</h2>
<p>The PAC <em>(Proxy auto-config)</em> file format was originally designed by Netscape in 1996 for the Netscape Navigator 2.0 and is a text file that defines which URLs are to be routed over a proxy and optionally which proxy to use on a per URL basis.</p>
<p>A very basic PAC file could look like this;</p>
<pre>function FindProxyForURL(url, host) 
{    
    var list = new Array("wtfismyip.com","www.ipchicken.com");
    for(var i=0; i &lt; list .length; i++)
    {
        if (shExpMatch(host, list[i]))
        {
           return "SOCKS socks.survivetheclaireperryinter.net:9050";
        }
    }
    return "DIRECT";
}</pre>
<p>This PAC file defines two URLs <em>(wtfismyip.com and www.ipchicken.com)</em> and tells the browser that these URLs should be routed via the SOCKS proxy socks.survivetheclaireperryinter.net using port 9050. Any other URLs are routed directly <em>(as in not using a proxy)</em>.</p>
<p>The <a href="https://torproject.org">Tor Project</a> is one of the most powerful tools we have against Internet censorship and one of the features of a Tor relay is the ability to be used as a SOCKS proxy.</p>
<p>There are lots of Tor relays on the Internet that are configured not only as Bridges, pluggable transports, Exits &amp; relays but also as SOCKS servers. We will create a Tor relay to be coupled with a PAC file to selectively route certain URLs over The Onion Routing network to bypass censorship.</p>
<h2><a id="use"></a>Using the Tor PAC Proxy</h2>
<p>To test a Tor powered PAC proxy simply <a href="#config-browser">set your Browser Proxy settings</a> to; https://RoutingPacketsIsNotACrime.uk/pac.config?id=piratebay this will allow you to browse to thepiratebay.se via a Tor proxy in Russia.</p>
<p>To create your own list of URLs to route via your Tor proxy start by navigating to <a href="https://routingpacketsisnotacrime.uk">https://RoutingPacketsIsNotACrime.uk</a> and identify which URLs you would like to route.</p>
<div class="alert bluth yellow"><button type="button" class="close" data-dismiss="alert">&times;</button>Note that the only URL selected by default is wtfismyip.com. To re-iterate, this is a technical demonstration of Censorship evasion and bypassing censorship is <strong>NOT</strong> illegal.</div>
<p>Add all of your URLs separated by a comma e.g. &#8220;google.com, yahoo.com, bing.com&#8221; then click &#8220;Save PAC File&#8221;.</p>
<p>Make note of your unique PAC file URL e.g. https://RoutingPacketsIsNotACrime.uk/pac.config?id=ABCDEF1234567890</p>
<p>Configure your browser to use your unique PAC file</p>
<p><a id="config-browser"></a><br />
<h4>Configure Internet Explorer</h4>
<ol>
<li>Go to Start then Control Panel. (Windows 8 users hover your mouse to the bottom right, click Settings, then click Control Panel)</li>
<li>Find Internet Options (sometimes under Network and Internet), then go to the Connections tab.</li>
<li>At the bottom, click the LAN settings button.</li>
<li>A new dialog will appear. Tick the box that says Use automatic configuration script.</li>
<li>In the address field, paste in your unique PAC file ID e.g. <strong>https://RoutingPacketsIsNotACrime.uk/pac.config?id=ABCDEF1234567890</strong></li>
<li>Press OK, then OK on the Internet Options dialog.</li>
</ol>
<h4>Configure Mozilla Firefox</h4>
<ol>
<li>In Mozilla Firefox, go to Options. In Windows, click the Firefox button then choose Options, or go to Tools, then Options. In Mac OS X, go to Firefox, then Preferences. In Linux, go to Tools, Options.</li>
<li>Go to the Advanced tab, then go to the Network tab.</li>
<li>Click Settings next to Configure how Firefox connects to the Internet.</li>
<li>Select Automatic proxy configuration URL.</li>
<li>In the text field, paste in your unique PAC file ID e.g. <strong>https://RoutingPacketsIsNotACrime.uk/pac.config?id=ABCDEF1234567890</strong></li>
<li>Press OK, then OK on the Options dialog.</li>
</ol>
<h4>Configure Google Chrome</h4>
<ol>
<li>In Google Chrome, click the menu button to the right of the URL bar, and choose Settings.</li>
<li>At the bottom, click the Show advanced settings</li>
<li>Under Network, click Change proxy settings.
<ol>
<li>On Windows, at the bottom click the LAN settings button. A new dialog will appear. Tick the box that says Use automatic configuration script.</li>
<li>On Mac OS X, tick Automatic Proxy Configuration.</li>
<li>On Linux, click Network proxy, select Automatic from the Method drop down menu.</li>
</ol>
</li>
<li>In the address field, paste in your unique PAC file ID e.g. <strong>https://RoutingPacketsIsNotACrime.uk/pac.config?id=ABCDEF1234567890</strong></li>
<li>Close the dialogs to save the settings. On Mac OS X, press Apply first.</li>
</ol>
</p><p>You&#8217;ll note that the PAC file specifies the proxy as localhost:9050, trying to visit the URLs in question won&#8217;t work until we setup the local Tor relay.</p>
<h2><a id="create"></a>Creating Your Local Tor Proxy</h2>
<p>If you want to help the Tor network grow and create your own proxy to use with the RoutingPacketsIsNotACrime PAC files then these instructions should get you started.</p>
<p>If you don&#8217;t already have a dedicated server consider visiting <a href="https://www.digitalocean.com/">DigitalOcean</a>, <a href="https://aws.amazon.com/ec2/">Amazon EC2</a> or for some really good deals check <a href="http://lowendbox.com/">LowEndBox.com</a>.</p>
<p>For various reasons I would suggest hosting the server outside of the UK but that is a choice for you to make.</p>
<h3>CentOS 6</h3>
<h4>Install EPEL</h4>
<pre>wget http://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
yum install epel-release-6-8.noarch.rpm</pre>
<h4>Edit iptables</h4>
<pre>vim /etc/sysconfig/iptables</pre>
<p>Allow the ORPort and the proxy port (in this case 9001 and 9150)</p>
<pre>*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 9001 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 9150 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT</pre>
<p>Save and quit</p>
<pre>/etc/init.d/iptables restart</pre>
<p>If your server has IPv6 then make similar changes to ip6tables</p>
<h4>Editing torrc</h4>
<pre>vim /etc/tor/torrc</pre>
<p>A minimal torrc for use with a PAC file style proxy would look similar to the below (although you should read all the options to understand what you are doing);</p>
<pre>SocksPort xx.xx.xx.xx:9150
ORPort 9001
Nickname TheNameOfYourRelay
ContactInfo YourContactDetails
ExitPolicy reject *:*</pre>
<p>xx.xx.xx.xx should be a routeable IP <em>(e.g. not 127.0.0.1)</em> of your server, if you want to keep your relay server partially private you might want to add PublishServerDescriptor 0 to your config too.</p>
<div class="alert bluth yellow"><button type="button" class="close" data-dismiss="alert">&times;</button>There is no security here, if someone port scanned your server then they would see that it is an open proxy and could use it to do nasty things that people will blame you for!<br /> If your Tor relay is on a public IP <em>(e.g. not 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16)</em><em> then you may want to restrict the IPTables allow rule to only allow your source IP addresses</em></div>
<h4>Start Tor &amp; Confirm it is working</h4>
<pre>/etc/init.d/tor start
tail -f /var/log/messages</pre>
<p>You should see something along the lines of;</p>
<pre>socks Tor[31452]: Self-testing indicates your ORPort is reachable from the outside. Excellent. Publishing server descriptor.
socks Tor[31452]: Bootstrapped 85%: Finishing handshake with first hop.
socks Tor[31452]: Bootstrapped 90%: Establishing a Tor circuit.
socks Tor[31452]: Tor has successfully opened a circuit. Looks like client functionality is working.
socks Tor[31452]: Bootstrapped 100%: Done.
socks Tor[31452]: Performing bandwidth self-test...done.</pre>
<h4>Done!</h4>
<p>Assuming you have chosen the URLs you wanted in the previous section <em>(<a href="#use">Using the Tor PAC Proxy</a>)</em> you can now browse to the URLs that were previously censored as they are now being routed over Tor. Any non-restricted URLs will route over your normal Internet connection.</p>
<h3>Windows</h3>
<p>Follow our tutorial on <a href="/2014/03/11/installing-tor-on-windows-securely/">Securely Installing Tor on Windows</a> to get the full Tor Browser bundle up and running.</p>
<p>Once installed and started Tor will be running on localhost:9150 <em>(do not close the Tor Browser as this will also close the relay)</em></p>
<h4>Done!</h4>
<p>Assuming you have chosen the URLs you wanted in the previous section <em>(<a href="#use">Using the Tor PAC Proxy</a>)</em> you can now browse to the URLs that were previously censored as they are now being routed over Tor. Any non-restricted URLs will route over your normal Internet connection.</p>
<h2><a id="final"></a>Some Final Thoughts <em>(and quotes)</em></h2>
<p>Internet Censorship is abhorrent, we shouldn&#8217;t stand by and let the Government, Police or lawyers dictate what we can read. The slippery slope is getting steeper every day so we all need to help stop it.</p>
<blockquote><p>When bad men combine, the good must associate; else they will fall, one by one, an unpitied sacrifice in a contemptible struggle.<small>Edmund Burke</small></p>
</blockquote>
<blockquote><p>I always wondered why somebody doesn&#8217;t do something about that. Then I realized I was somebody.<small>Lily Tomlin</small></p>
</blockquote>
<blockquote><p>Withholding information is the essence of tyranny. Control of the flow of information is the tool of the dictatorship.<small>Bruce Coville</small></p>
</blockquote>
<blockquote><p>Who is more to be pitied, a writer bound and gagged by policemen or one living in perfect freedom who has nothing more to say?<small>Kurt Vonnegut</small></p>
</blockquote>
<blockquote><p>Once a government is committed to the principle of silencing the voice of opposition, it has only one way to go, and that is down the path of increasingly repressive measures, until it becomes a source of terror to all its citizens and creates a country where everyone lives in fear.<small>Harry S. Truman</small></p>
</blockquote>
<blockquote><p>Free societies&#8230;are societies in motion, and with motion comes tension, dissent, friction. Free people strike sparks, and those sparks are the best evidence of freedom&#8217;s existence.<small>Salman Rushdie</small></p>
</blockquote>
<blockquote><p>All men dream: but not equally. Those who dream by night in the dusty recesses of their minds wake in the day to find that it was vanity: but the dreamers of the day are dangerous men, for they may act their dreams with open eyes, to make it possible.<small>T.E. Lawrence</small></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>https://survivetheclaireperryinter.net/2014/08/23/building-a-pipcu-resistant-immunicity-style-proxy-using-tor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a SOCKS5 Proxy with a Digital Ocean Server to Bypass UK Internet Filters</title>
		<link>https://survivetheclaireperryinter.net/2014/01/10/building-a-socks5-proxy-with-a-digital-ocean-server/</link>
		<comments>https://survivetheclaireperryinter.net/2014/01/10/building-a-socks5-proxy-with-a-digital-ocean-server/#comments</comments>
		<pubDate>Fri, 10 Jan 2014 07:05:14 +0000</pubDate>
		<dc:creator><![CDATA[Op]]></dc:creator>
				<category><![CDATA[Censorship Evasion]]></category>
		<category><![CDATA[Filter bypass]]></category>
		<category><![CDATA[Filter Evasion]]></category>
		<category><![CDATA[Surveillance Avoidance]]></category>
		<category><![CDATA[Block]]></category>
		<category><![CDATA[BT]]></category>
		<category><![CDATA[Bypass]]></category>
		<category><![CDATA[bypass bt filter]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Evasion]]></category>
		<category><![CDATA[Filter]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[not free]]></category>
		<category><![CDATA[Proxy DNS Query]]></category>
		<category><![CDATA[proxy resolve dns]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Sky]]></category>
		<category><![CDATA[sky broadband shield]]></category>
		<category><![CDATA[socks list proxy]]></category>
		<category><![CDATA[TalkTalk]]></category>
		<category><![CDATA[talktalk dns server]]></category>
		<category><![CDATA[talktalk homesafe]]></category>
		<category><![CDATA[Virgin]]></category>
		<category><![CDATA[webproxy]]></category>

		<guid isPermaLink="false">https://survivetheclaireperryinter.net/?p=125</guid>
		<description><![CDATA[If you don&#8217;t currently run Linux on your desktop I would strongly suggest it. Try Fedora or Ubuntu. If you don&#8217;t want to run Linux permanently but do want to try this method then a Live Boot CD of Fedora or Ubuntu (or any other Linux OS of your choice)  would be an ideal method.<br /><a class="moretag" href="/2014/01/10/building-a-socks5-proxy-with-a-digital-ocean-server/">Continue reading...</a>]]></description>
				<content:encoded><![CDATA[<div class="alert bluth red"><button type="button" class="close" data-dismiss="alert">&times;</button>This article is for use on a Linux/Mac computer <em>(desktop / laptop etc)</em>. A Windows guide will be available at a later date.</div>
<p>If you don&#8217;t currently run Linux on your desktop I would strongly suggest it. Try <a href="https://fedoraproject.org/en_GB/get-fedora">Fedora</a> or <a href="http://www.ubuntu.com/">Ubuntu</a>. If you don&#8217;t want to run Linux permanently but do want to try this method then a <a href="https://en.wikipedia.org/wiki/Live_CD">Live Boot CD</a> of Fedora or Ubuntu <em>(or any other Linux OS of your choice)</em>  would be an ideal method.</p>
<p>Servers in datacenters are extremely unlikely to experience filtering so by tunnelling your connection through to a server you can browse the Internet without worrying if your connection is being restricted or surveilled.</p>
<p>IMAGE</p>
<h2>Signing up with Digital Ocean</h2>
<p>Navigate to <a href="https://www.digitalocean.com/">www.DigitalOcean.com</a> and click the Signup button at the top of the page. Enter an email address and a password. You may want to use an anonymous email provider such as Hushmail.com to protect your privacy and a strong password you&#8217;ve not used anywhere else. <strong>Important:</strong> The email address must be real as your server password will be emailed to you.</p>
<p><a class="lightbox" href="/wp-content/uploads/2014/01/signup.jpg"><img class="aligncenter size-medium wp-image-128" alt="signup" src="/wp-content/uploads/2014/01/signup-300x241.jpg" width="300" height="241" /></a>Once logged in you&#8217;ll have access to the initial control panel;<a class="lightbox" href="/wp-content/uploads/2014/01/logged_in.png"><img class="aligncenter size-medium wp-image-129" alt="logged_in" src="/wp-content/uploads/2014/01/logged_in-300x166.png" width="300" height="166" /></a></p>
<p>Click get started which will take you to the billing page, you can either use a credit card<em> (you may want to use an anonymous Visa / Mastercard, search online for keywords such as prepaid, anonymous etc)</em> or PayPal.</p>
<p>Once your payment is processed and cleared <em>(check <a href="https://cloud.digitalocean.com/billing">billing</a> for tracking your pre-paid balance if using PayPal) </em> or refresh the <a href="https://cloud.digitalocean.com/droplets">droplets</a> page to see the below;<a class="lightbox" href="/wp-content/uploads/2014/01/paid.jpg"><img class="aligncenter size-medium wp-image-130" alt="paid" src="/wp-content/uploads/2014/01/paid-300x175.jpg" width="300" height="175" /></a></p>
<p>Click <strong>Create Droplet</strong>!</p>
<p>Choose a friendly name for the server <em>(aka Droplet)</em>, this name is not important feel free to use how-to.survivetheclaireperryinter.net if you want to. Leave the Size option alone <em>(or if a larger size is selected change to to 512Mb/20Gb/1Tb as this is only $5 / £3 a month).</em> For lower latency and a reduced chance of NSA eavesdropping choose an Amsterdam datacenter <em>(not necessary but recommended)</em>.<a class="lightbox" href="/wp-content/uploads/2014/01/details1.jpg"><img class="aligncenter size-medium wp-image-131" alt="details1" src="/wp-content/uploads/2014/01/details1-286x300.jpg" width="286" height="300" /></a></p>
<p>Scroll down for more settings. For the purposes of this tutorial choose CentOS and then the latest CentOS version <em>(currently 6.4)</em> then click <strong>Create Droplet</strong>. <a class="lightbox" href="/wp-content/uploads/2014/01/details2.jpg"><img class="aligncenter size-medium wp-image-133" alt="details2" src="/wp-content/uploads/2014/01/details2-300x265.jpg" width="300" height="265" /></a></p>
<p>After a few seconds of watching the following screen your server will be created and you should have received an email with your root password.<a class="lightbox" href="/wp-content/uploads/2014/01/building.jpg"><img class="aligncenter size-medium wp-image-134" alt="building" src="/wp-content/uploads/2014/01/building-300x54.jpg" width="300" height="54" /></a></p>
<p>Behold your new server, make note of the IP address at the top near the word active. In this case the IP address is <strong>95.85.54.190</strong><a class="lightbox" href="/wp-content/uploads/2014/01/complete.jpg"><img class="aligncenter size-medium wp-image-135" alt="complete" src="/wp-content/uploads/2014/01/complete-300x102.jpg" width="300" height="102" /></a>Check your inbox and you should have an email with the IP address, the user name <em>(root)</em> and your password. It&#8217;s very important you don&#8217;t write a blog post and publish your username and password because bad things will happen to your server<a class="lightbox" href="/wp-content/uploads/2014/01/email.jpg"><img class="aligncenter size-medium wp-image-136" alt="email" src="/wp-content/uploads/2014/01/email-300x197.jpg" width="300" height="197" /></a></p>
<p>&nbsp;</p>
<p>Now we&#8217;re ready to create a proxy.</p>
<h2>Testing the Proxy / Tunnel</h2>
<p>Assuming you are logged into your Linux computer load up a terminal.<a class="lightbox" href="/wp-content/uploads/2014/01/terminal_1.png"><img class="aligncenter size-medium wp-image-137" alt="terminal_1" src="/wp-content/uploads/2014/01/terminal_1-300x215.png" width="300" height="215" /></a>Type the following;</p>
<pre class="bash">ssh -D 8080 root@95.85.54.190</pre>
<p> Replace the IP address with your own. You&#8217;ll be informed that the authenticity of the host can&#8217;t be established which is true because you don&#8217;t know what the RSA key fingerprint is. You can choose to accept it and continue or be paranoid and bail. If you chose to continue you will be prompted for you password that was sent by email.<a class="lightbox" href="/wp-content/uploads/2014/01/terminal_2.png"><img class="aligncenter size-medium wp-image-142" alt="terminal_2" src="/wp-content/uploads/2014/01/terminal_2-300x215.png" width="300" height="215" /></a></p>
<p>Load up another terminal <em>(or a tab)</em> and type the following;</p>
<pre class="bash">curl --socks5-hostname 127.0.0.1:8080 http://wtfismyip.com/json</pre>
<p>You should see the following output indicating that your ISP is <strong>Digital Ocean</strong>.<a class="lightbox" href="/wp-content/uploads/2014/01/terminal_3.png"><img class="aligncenter size-medium wp-image-140" alt="terminal_3" src="/wp-content/uploads/2014/01/terminal_3-300x215.png" width="300" height="215" /></a></p>
<p>&nbsp;</p>
<p>You could immediately configure your browser etc to use these settings but you should try and be a bit more thorough.</p>
<h2>Configuring the Proxy / Tunnel for long term use</h2>
<p>Exit all of the terminals opened in the previous step which will close all tunnels and SSH sessions and we&#8217;ll get started on making this a little more secure.</p>
<p>First things first is to change the root password from the one that was emailed to you. Load up a terminal and ssh in;</p>
<pre class="bash">ssh <a href="mailto:root@95.85.54.190">root@95.85.54.190</a></pre>
<p>Once logged in change the password with the passwd command. Ensure you use a different password to anything else you have.<a class="lightbox" href="/wp-content/uploads/2014/01/terminal_4.png"><img class="aligncenter size-medium wp-image-147" alt="terminal_4" src="/wp-content/uploads/2014/01/terminal_4-300x215.png" width="300" height="215" /></a>The root user is the most powerful user on a Linux server and can delete anything and everything so you really don&#8217;t want to be using it for everyday tasks. For creating the tunnel we want to use a non-privileged user. To do this simply type the following <em>(feel free to replace the name tunnel with your name or anything, it&#8217;s just a username and isn&#8217;t important)</em>;</p>
<pre class="bash">useradd tunnel</pre>
<p>Now change the password for this user by passing the username to the passwd command used earlier, make sure you use a strong password and one that isn&#8217;t that same as any of your others;</p>
<pre class="bash">passwd tunnel</pre>
<p><a class="lightbox" href="/wp-content/uploads/2014/01/terminal_5.png"><img class="aligncenter size-medium wp-image-148" alt="terminal_5" src="/wp-content/uploads/2014/01/terminal_5-300x215.png" width="300" height="215" /></a></p>
<p>Load up a new tab on your local machine and try logging in as your new user;</p>
<pre class="bash">ssh tunnel@<a href="mailto:root@95.85.54.190">95.85.54.190</a></pre>
<p><a class="lightbox" href="/wp-content/uploads/2014/01/terminal_6.png"><img class="aligncenter size-medium wp-image-149" alt="terminal_6" src="/wp-content/uploads/2014/01/terminal_6-300x215.png" width="300" height="215" /></a></p>
<p>&nbsp;</p>
<p>You&#8217;re now ready to setup a tunnel/SOCKS proxy you can use with your browser.</p>
<p>Exit all your terminals again and this time issue the command;</p>
<pre class="bash">ssh -D 8080 tunnel@<a href="mailto:root@95.85.54.190">95.85.54.190</a></pre>
<p>In a new terminal check that the proxy is working by issuing the CURL command again;</p>
<pre class="bash">curl --socks5-hostname 127.0.0.1:8080 http://wtfismyip.com/json</pre>
<p>For this example I&#8217;m going to use Firefox but feel free to try it out with others. In the address bar type <strong>about:config</strong>, you&#8217;ll be presented with the following screen;</p>
<p><a class="lightbox" href="/wp-content/uploads/2014/01/firefox_dragons.jpg"><img class="aligncenter size-medium wp-image-150" alt="firefox_dragons" src="/wp-content/uploads/2014/01/firefox_dragons-300x92.jpg" width="300" height="92" /></a></p>
<p>&nbsp;</p>
<p>Assuming you are going to be careful click the button.</p>
<p>In the Search bar at the top type <strong>proxy</strong>, then look for the strings <strong>network.proxy.socks</strong> and <strong>network.proxy.socks_port</strong>, type in the values from the command above (127.0.0.1 and 8080). If your ISP filters DNS then you may want to toggle <strong>network.proxy.socks_remote_dns</strong> too <em>(don&#8217;t forget to change your name servers!)</em>.</p>
<p>Finally change <strong>network.proxy.type</strong> to <strong>1</strong>.</p>
<p><a class="lightbox" href="/wp-content/uploads/2014/01/firefox_about_config.png"><img class="aligncenter size-medium wp-image-151" alt="firefox_about_config" src="/wp-content/uploads/2014/01/firefox_about_config-300x216.png" width="300" height="216" /></a>To test, simply load up a new Firefox tab and attempt to access a blocked page.</p>
<p>So there you have it, an easy way to get past any Web filtering and as an added bonus since your traffic is encrypted between your computer and your server in Amsterdam neither your ISP nor the UK Government can monitor it.</p>
<div class="alert bluth yellow"><button type="button" class="close" data-dismiss="alert">&times;</button>Traffic egressing the server can still be tracked and recorded. With the right combination of warrants and traffic capture at the Digital Ocean datacenter coupled with your home ISP logs illegal activity can still be traced back to you! Only use this to method to bypass filters,</div>
<p>Upcoming articles include creating a dedicated Raspberry PI proxy for use with multiple devices <em>(phones, tablets, Windows PCs etc)</em> and setup guides for other server providers. Make sure you follow <a href="https://twitter.com/stcpi">@STCPI</a> on Twitter for updates!</p>
]]></content:encoded>
			<wfw:commentRss>https://survivetheclaireperryinter.net/2014/01/10/building-a-socks5-proxy-with-a-digital-ocean-server/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Basic DNS Filter Evasion: HOSTS file</title>
		<link>https://survivetheclaireperryinter.net/2014/01/08/basic-dns-filter-evasion-hosts-file/</link>
		<comments>https://survivetheclaireperryinter.net/2014/01/08/basic-dns-filter-evasion-hosts-file/#comments</comments>
		<pubDate>Wed, 08 Jan 2014 13:53:18 +0000</pubDate>
		<dc:creator><![CDATA[Op]]></dc:creator>
				<category><![CDATA[Censorship Evasion]]></category>
		<category><![CDATA[Filter Evasion]]></category>
		<category><![CDATA[Block]]></category>
		<category><![CDATA[BT]]></category>
		<category><![CDATA[Censorship]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Evasion]]></category>
		<category><![CDATA[Filter]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Sky]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">https://survivetheclaireperryinter.net/?p=94</guid>
		<description><![CDATA[Background: Various ISPs such as Sky and BT use DNS manipulation to spoof responses that forwards requests to their proxy server instead of the correct response. Taking BT as an example a request for a blocked site has been seen to return an IP from within this netblock instead; inetnum: 213.120.234.0 - 213.120.235.255 netname: BT-UKIP-IPV4-INFRASTRUCTURE<br /><a class="moretag" href="/2014/01/08/basic-dns-filter-evasion-hosts-file/">Continue reading...</a>]]></description>
				<content:encoded><![CDATA[<h2>Background:</h2>
<p>Various ISPs such as Sky and BT use DNS manipulation to spoof responses that forwards requests to their proxy server instead of the correct response.</p>
<p>Taking BT as an example a request for a blocked site has been seen to return an IP from within this netblock instead;</p>
<p><code>inetnum: 213.120.234.0 - 213.120.235.255<br />
netname: BT-UKIP-IPV4-INFRASTRUCTURE<br />
descr: POP<br />
country: GB<br />
admin-c: BS1474-RIPE<br />
tech-c: BS1474-RIPE<br />
status: ASSIGNED PA<br />
remarks: Please send abuse notification to abuse@bt.net<br />
remarks: New netname<br />
mnt-by: BTNET-MNT<br />
mnt-lower: BTNET-MNT<br />
mnt-routes: BTNET-MNT<br />
source: RIPE # Filtered<br />
</code></p>
<p>Sky commonly reports back with IPs from;</p>
<p><code>inetnum: 90.207.238.128 - 90.207.238.191<br />
netname: SKY-IRONMAN-VIRTUALISATION-LAN<br />
descr: Sky Network Services<br />
country: GB<br />
admin-c: BBH-RIPE<br />
tech-c: BBH-RIPE<br />
status: ASSIGNED PA<br />
mnt-by: BSKYB-BROADBAND-MNT<br />
source: RIPE # Filtered<br />
</code></p>
<p>Initial research indicates that even attempting to use 3rd Party DNS servers on some ISPs elicits a spoofed response which indicates that these ISPs are intercepting and monitoring ALL DNS queries you make. This presents a variety of concerns such as the accuracy of SPF, DNS-SEC or TXT responses but that&#8217;s a topic for another time.</p>
<h2>Circumnavigation:</h2>
<p>If you discover that you are getting faked responses and are unable to reach the correct webserver follow the steps below.</p>
<ul>
<li>Get the A Record
<ul>
<li>Navigate to a website such as <a href="http://www.dnsstuff.com/tools">http://www.dnsstuff.com/tools</a></li>
<li>Look for the DNS Lookup tool<br />
<a class="lightbox" style="line-height: 1.5;" href="/wp-content/uploads/2014/01/dns_lookup.png"><img class="alignnone size-medium wp-image-98" alt="dns_lookup" src="/wp-content/uploads/2014/01/dns_lookup-300x196.png" width="300" height="196" /></a></li>
<li>In the text box enter the URL you are trying to reach <em>(e.g. www.google.com)</em></li>
<li>Select <strong>A</strong> from the record type</li>
<li>Submit the request and make a note of the <strong>IP address</strong> returned.</li>
</ul>
</li>
<li>Edit the Hosts file
<ul>
<li>Windows
<ul>
<li>Start notepad.exe as an Administrator</li>
<li>Open C:\Widnows\System32\drivers\etc\hosts</li>
<li>Add the URL and the IP address in the format shown below;<br />
<code>173.194.34.67 www.google.com</code></li>
<li>Save the file ensuring that a file suffix <strong>isn&#8217;t</strong> appended</li>
</ul>
</li>
<li>Linux / Mac
<ul>
<li>Open /etc/hosts as the superuser with your editor of choice (vim!)</li>
<li>Add the URL and the IP address in the format shown below;<br />
<code>173.194.34.67 www.google.com</code></li>
<li>Save the file ensuring that a file suffix <strong>isn&#8217;t</strong> appended</li>
</ul>
</li>
</ul>
</li>
<li>Testing
<ul>
<li>Load up a cmd prompt (Ctrl + R, type cmd, press return)</li>
<li>Type <code>nslookup www.google.com</code></li>
<li>Ensure you receive the IP address you entered in the hosts file</li>
</ul>
</li>
</ul>
<p>&nbsp;</p>
<p>If the ISP is using BGP filtering methods, Deep Packet Inspection <em>(DPI)</em> or a transparent proxy then this still may not work as they&#8217;ll detect traffic going to the blocked IP subnet and act accordingly.</p>
<p>Keep an eye on our <a href="/top-ways-to-evade-filters/">How to Evade Blocks</a> page and follow <a href="http://twitter.com/STCPI">@STCPI</a> on Twitter for more methods to discover and evade Internet censorship.</p>
]]></content:encoded>
			<wfw:commentRss>https://survivetheclaireperryinter.net/2014/01/08/basic-dns-filter-evasion-hosts-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
