<?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>froztbyte.getBlog() &#187; ssh</title>
	<atom:link href="http://blog.froztbyte.net/tag/ssh/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.froztbyte.net</link>
	<description>returns the contents of froztbyte.blog</description>
	<lastBuildDate>Fri, 03 Apr 2020 21:58:55 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.0</generator>
	<item>
		<title>Mineshafts</title>
		<link>http://blog.froztbyte.net/2012/06/mineshafts/</link>
		<comments>http://blog.froztbyte.net/2012/06/mineshafts/#comments</comments>
		<pubDate>Mon, 25 Jun 2012 14:24:28 +0000</pubDate>
		<dc:creator><![CDATA[froztbyte]]></dc:creator>
				<category><![CDATA[minipost]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[tunneling]]></category>

		<guid isPermaLink="false">http://blog.froztbyte.net/?p=238</guid>
		<description><![CDATA[Or: when you seriously need to tunnel I&#8217;ve got some servers sitting 300~500ms away, behind a bad NAT, and GRE/pptp can&#8217;t make it through. Quick way to solve it? Build a small crappy VM, install ssh, and make the following &#8230;<p class="read-more"><a href="http://blog.froztbyte.net/2012/06/mineshafts/">Read more &#187;</a></p>]]></description>
				<content:encoded><![CDATA[<p>Or: when you seriously need to tunnel</p>
<p>I&#8217;ve got some servers sitting 300~500ms away, behind a bad NAT, and GRE/pptp can&#8217;t make it through. Quick way to solve it? Build a small crappy VM, install ssh, and make the following modifications to files:</p>
<p><em>/etc/ssh/sshd_config</em>: append the <span style="text-decoration: underline;">PermitTunnel</span> directive. Pick one you like from `man 5 sshd_config`<br />
<em>/etc/ssh/ssh_config</em>: append the <span style="text-decoration: underline;">Tunnel</span> directive. Again, check which you want from `<em>man 5 ssh_config</em>`.</p>
<p>Quickly generate a key for use for the tunnel dial and push it to your dial host:<br />
<em>ssh-keygen -C &#8220;tunneling key&#8221; -t rsa -f ~/.ssh/tunnel_rsa<br />
ssh-copy-id -i ~/.ssh/tunnel_rsa user@tunnelhost</em></p>
<p>Now start up the tunnel:<br />
<em>ssh -NTCf -w any user@tunnelhost</em></p>
<p>Slap IPs on each side:<br />
<em>client:~# ip addr add 192.0.2.1/32 peer 192.0.2.2 dev &lt;tundev&gt;</em><br />
<em>tunnelhost:~# ip addr add 192.0.2.2/32 peer 192.0.2.1 dev &lt;tundev&gt;</em></p>
<p>Also, I noticed that between two debian hosts the tunnels defaulted to state DOWN, so a quick <em>ip link set up dev &lt;tundev&gt; </em>was needed each side.</p>
<p>Ping across, check if it works, and if all&#8217;s good you should be able to route via the tunnel and do whatever you need to. Since ssh is generally pretty capable and usable everywhere (even over some crazy portforwards), this should get you going fairly easily.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.froztbyte.net/2012/06/mineshafts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
