<?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>Technical Diary &#187; tunnels</title>
	<atom:link href="http://andriigrytsenko.net/tag/tunnels/feed/" rel="self" type="application/rss+xml" />
	<link>http://andriigrytsenko.net</link>
	<description>With Andrii Grytsenko</description>
	<lastBuildDate>Tue, 17 Aug 2010 08:25:33 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to get fully internet functionality from restricted environment over ssh</title>
		<link>http://andriigrytsenko.net/2009/07/how-to-get-fully-internet-functionality-from-restricted-environment-over-ssh/</link>
		<comments>http://andriigrytsenko.net/2009/07/how-to-get-fully-internet-functionality-from-restricted-environment-over-ssh/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 22:44:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[*nix]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[tunnels]]></category>

		<guid isPermaLink="false">http://andriigrytsenko.net/?p=229</guid>
		<description><![CDATA[If you working place don&#8217;t provide internet or provide very restricted access to web pages. But you want to feel free in the internet browsing.

For this you need:
1. At least one open port for output connection OR access to proxy.
2. Server in the internet with root OR user rights. 
You can easily get it in [...]]]></description>
			<content:encoded><![CDATA[<p>If you working place don&#8217;t provide internet or provide very restricted access to web pages. But you want to feel free in the internet browsing.<br />
<span id="more-229"></span></p>
<p>For this you need:<br />
1. At least one open port for output connection OR access to proxy.<br />
2. Server in the internet with root OR user rights. </p>
<p>You can easily get it in several simple steps. Just imagine that you located at office1 and open port for ongoing connection = 443. Also you have access to server1 which located at internet. Now go to server1 and edit ssh configuration file. Add new <em>port</em> directive into this file(in case if you have open port, in other case skip this step). Like this:</p>
<pre>server1# grep -i port /etc/ssh/sshd_config
Port 22
Port 443
</pre>
<p>As you can see now server1 use 2 ports(22 and 443) for ssh daemon. Let&#8217;s check it:</p>
<pre>server1# netstat -lnp | grep ssh
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      3946/sshd
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      3946/sshd
</pre>
<p>It&#8217;s ok. The next step #2 install proxy server. You can choose anyone you like. I chose tinyproxy, because of it&#8217;s very small and simple in configuration. </p>
<pre>server1# apt-get install tinyproxy </pre>
<p>It&#8217;s valid command for debian. For your distro use distro specific package manager as well. </p>
<p>Go to /etc/tinyproxy/tinyproxy.conf and check <em>port</em> and <em>listen</em> directives for determinate on which port and address your proxy listen. In my case it&#8217;s port 8888 on localhost: </p>
<pre>server1#grep -E "^(Port|Listen)"  /etc/tinyproxy/tinyproxy.conf
Port 8888
Listen 127.0.0.1</pre>
<p>Start daemon and check that it run: </p>
<pre>server1# /etc/init.d/tinyproxy start
server1# netstat -lnp | grep tinyproxy
tcp        0      127.0.0.1:8888              0.0.0.0:*               LISTEN      3923/tinyproxy</pre>
<p>Looks fine. Now make ssh tunnel to your server. If you have direct connection to server. Use this :</p>
<pre>server1#ssh -p 443 user@server#1 -L8888:127.0.0.01:8888 </pre>
<p>If not then do as described <a href="http://andriigrytsenko.net/2009/07/ssh-connection-via-http-proxy/">here</a>. </p>
<p>And last one step is setting up proxy 127.0.0.1:8888 on your browser and enjoy. </p>
]]></content:encoded>
			<wfw:commentRss>http://andriigrytsenko.net/2009/07/how-to-get-fully-internet-functionality-from-restricted-environment-over-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
