<?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>Durand&#039;s Home Page &#187; networking</title>
	<atom:link href="http://www.djm.co.za/tag/networking/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.djm.co.za</link>
	<description>Just another personal web page</description>
	<lastBuildDate>Mon, 29 Aug 2011 16:14:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Quick and Simple SOCKS tunnelling with tsocks and ssh</title>
		<link>http://www.djm.co.za/2009/01/22/quick-and-simple-socks-tunnelling-with-tsocks-and-ssh/</link>
		<comments>http://www.djm.co.za/2009/01/22/quick-and-simple-socks-tunnelling-with-tsocks-and-ssh/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 13:38:47 +0000</pubDate>
		<dc:creator>durand</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[networking]]></category>

		<guid isPermaLink="false">http://www.djm.co.za/?p=96</guid>
		<description><![CDATA[I found an awesome tool to quickly and simply set up a SOCKS tunnel from behind a firewall to an outside server. It&#8217;s called tsocks (http://tsocks.sourceforge.net/). Using this in combination with an ssh tunnel allowed me to tunnel all my traffic through our firewall and to a remote server over a secure link.  It was [...]]]></description>
			<content:encoded><![CDATA[<p>I found an awesome tool to quickly and simply set up a SOCKS tunnel from behind a firewall to an outside server. It&#8217;s called <a title="tsocks homepage" href="http://tsocks.sourceforge.net/">tsocks (http://tsocks.sourceforge.net/)</a>. Using this in combination with an ssh tunnel allowed me to tunnel all my traffic through our firewall and to a remote server over a secure link.  It was like working (browsing, for example) directly from the remote server.</p>
<p>You will probably want to use this technique if:</p>
<ul>
<li>Your firewall is preventing you from accessing what you need to access outside your network.</li>
<li>You don&#8217;t have control over the firewall to open up the ports you need.</li>
<li>You DO have access to an external server via ssh.</li>
<li>The ssh daemon on the remote server has been configured to allow this or you can configure it yourself.  (GatewayPorts = yes)</li>
</ul>
<p>I&#8217;ll just quickly go over the steps which will get you ready to run:</p>
<ol>
<li>Install tsocks.</li>
<li>Configure tsocks.  My configuration looks like this:
<p><em>local = 192.168.0.0/255.255.0.0<br />
server = 127.0.0.1<br />
server_type = 4<br />
server_port = 1080<br />
</em><br />
Which means that for all local addresses, it will go directly over the LAN. However, for everything else, it will tunnel to 127.0.0.1:1080 over SOCKS version 4.</li>
</ol>
<p>Now the only thing left is to create the SSH tunnel on a local port of 1080 (as configured in tsocks.conf) to your remote server:</p>
<p style="text-align: left;"><em>bash#  ssh -D 1080  &lt;username&gt;@&lt;server.com&gt;</em></p>
<p style="text-align: left;">Leave that running. It&#8217;s your link to the outside world. Now open up another terminal and do whatever you need to do. In this example, we&#8217;ll start firefox:  (make sure your firefox isn&#8217;t already running so that it&#8217;s a complete restart.)</p>
<p style="text-align: left;"><em>bash# source /usr/bin/tsocks on<br />
bash# firefox</em></p>
<p style="text-align: left;">And&#8230;. that&#8217;s pretty much it.</p>
<p style="text-align: left;">Tsocks preload&#8217;s itself as a library and implements it&#8217;s own network operations. (connect,  etc..).   So it works like magic.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.djm.co.za/2009/01/22/quick-and-simple-socks-tunnelling-with-tsocks-and-ssh/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

