<?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>Twenty Ways &#187; Unix</title>
	<atom:link href="http://www.twentyways.com/category/unix/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.twentyways.com</link>
	<description>(21 would just be ridiculous)</description>
	<lastBuildDate>Tue, 29 Jun 2010 08:09:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>SSH Tricks #2: SSH as a proxy</title>
		<link>http://www.twentyways.com/2008/10/20/ssh-tricks-2-ssh-as-a-proxy/</link>
		<comments>http://www.twentyways.com/2008/10/20/ssh-tricks-2-ssh-as-a-proxy/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 16:46:32 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.twentyways.com/?p=59</guid>
		<description><![CDATA[We talked about port forwarding recently. This helps you get access to single resources but it requires a lot of planning and configuration. It would be pretty awesome if SSH had a proxy feature. Lucky for us all there is the -D option for the ssh command. This option turns the ssh connection in to [...]]]></description>
			<content:encoded><![CDATA[<p>We talked about <a href="http://www.twentyways.com/2008/10/16/ssh-tricks-1-ssh-port-forwardsssh-tricks-1-ssh-port-forwards/">port forwarding</a> recently. This helps you get access to single resources but it requires a lot of planning and configuration. It would be pretty awesome if SSH had a proxy feature.</p>
<p>Lucky for us all there is the -D option for the ssh command. This option turns the ssh connection in to a <a href="http://en.wikipedia.org/wiki/SOCKS">SOCKS</a> proxy on the remote server. The potential uses for this are huge. I often use this feature to gain quick access to my whole network.</p>
<p><strong>Setting it up</strong></p>
<pre>superbox$ ssh -D 31337 someserver</pre>
<p><strong>Using it</strong></p>
<div class="mceTemp">
<dl id="attachment_60" class="wp-caption alignright" style="width: 160px;">
<dt class="wp-caption-dt"><a href="http://www.twentyways.com/wp-content/uploads/2008/10/ffproxysettings.png"><img class="size-thumbnail wp-image-60" title="Firefox SOCKS Proxy Settings" src="http://www.twentyways.com/wp-content/uploads/2008/10/ffproxysettings-150x150.png" alt="Firefox SOCKS Proxy is set to localhost port 31337" width="150" height="150" /></a></dt>
</dl>
</div>
<p>To use this you will need to configure your applications to connect through the SOCKS proxy. Firefox is pretty easy to configure. The settings for the proxy live in the Preferences under the Advanced section in the Network tab. Click the <em>Settings&#8230;</em> button to bring up a dialog similar to the one on the right. Set the SOCKS host to <em>localhost</em> and the port to the one you chose when connecting.</p>
<p>Now that the proxy is setup you can test out that you&#8217;re proxy is working by visiting <a title="http://whatismyipaddress.com/" href="http://whatismyipaddress.com/">http://whatismyipaddress.com/</a> to check to see if it looks like you are accessing the site from a new IP address.</p>
<p>In the next installment of SSH Tricks we&#8217;ll talk about using ssh config files to save time and energy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twentyways.com/2008/10/20/ssh-tricks-2-ssh-as-a-proxy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH Tricks #1: SSH Port Forwards</title>
		<link>http://www.twentyways.com/2008/10/17/ssh-tricks-1-ssh-port-forwards/</link>
		<comments>http://www.twentyways.com/2008/10/17/ssh-tricks-1-ssh-port-forwards/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 14:17:16 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[mac os]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.twentyways.com/?p=56</guid>
		<description><![CDATA[SSH is the ultimate tool for shifting bits around networks in a secure manner. This is the first of a series of articles on SSH tips. This article is all about the basics; as the tips progress, we will get trickier. Overview Port forwards are a way of mapping a TCP from one side of [...]]]></description>
			<content:encoded><![CDATA[<p>SSH is the ultimate tool for shifting bits around networks in a secure manner. This is the first of a series of articles on SSH tips. This article is all about the basics; as the tips progress, we will get trickier.</p>
<p><strong>Overview</strong></p>
<p>Port forwards are a way of mapping a TCP from one side of the ssh connection to the other. They are established using the -L and -R parameters to the ssh command. These stand for local and remote port forwards. A local forward takes a port on the local machine and connects it to an IP address and port from the remote machine. As you suspect, a remote forward takes a port on the remote machine and connects is to an IP address and port from machine you are connecting from.</p>
<p><strong>Examples</strong></p>
<p>You could forward port 80 from an  internal web server to port 8188 on the machine you are connecting from. This is a sort of poorman&#8217;s VPN. You can gain access to resources inside your network via SSH local port forwards. After connecting to your gateway machine you would be able to access the web server at http://localhost:8188.  To actually do this the command would look like this:</p>
<pre>superbox$ ssh -L 8188:internalweb:80 homerouter</pre>
<p>Another common use for this is securing VNC access. Many VNC servers offer the option to only accept connections from localhost. By combining this option with a ssh local forward  you can create an encrypted VNC session. This would be done by doing:</p>
<pre>superbox$ ssh -L 5900:localhost:5900 vncserver</pre>
<p>Remote port forwards are much less common. Lets say you have a local web server running on your workstation and you&#8217;d like your friend to take a look at an error on a hot new web app. you&#8217;re developing. The catch is you don&#8217;t want to let them login to your machine to do a local forward to gain access to your server. In this case you could use a remote port forward like this:</p>
<pre>superbox$ ssh -R 8188:localhost:80 untrusted-friend</pre>
<p>Your somewhat trustworthy friend could then access your web server at http://localhost:8188.</p>
<p>In the next installment of this series we will reveal a way to make your SSH connection behave even more like a VPN.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twentyways.com/2008/10/17/ssh-tricks-1-ssh-port-forwards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
