<?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>marius &#187; Proxy</title>
	<atom:link href="http://devilx.net/tag/proxy/feed/" rel="self" type="application/rss+xml" />
	<link>http://devilx.net</link>
	<description></description>
	<lastBuildDate>Wed, 25 Jan 2012 07:42:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>RDP over SSH over HTTPS</title>
		<link>http://devilx.net/2007/01/12/rdp-over-ssh-over-https/</link>
		<comments>http://devilx.net/2007/01/12/rdp-over-ssh-over-https/#comments</comments>
		<pubDate>Fri, 12 Jan 2007 21:17:29 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Linux and stuff ...]]></category>
		<category><![CDATA[Mac and stuff ...]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[DarwinPorts]]></category>
		<category><![CDATA[HTTPS]]></category>
		<category><![CDATA[Jabber]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[prtunnel]]></category>
		<category><![CDATA[RDP]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Tunnel]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.devilx.net/?p=271</guid>
		<description><![CDATA[Okay, tunneling unter Linux/Unix system definitely is a bit complicated &#8211; until you really understand the basics. Some day I was searching for a possibility to tunnel a RDP Session over a WWW-Proxy and I really couldn&#8217;t find anything useful &#8230; <a href="http://devilx.net/2007/01/12/rdp-over-ssh-over-https/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Okay, tunneling unter Linux/Unix system definitely is a bit complicated &#8211; until you really understand the basics. Some day I was searching for a possibility to tunnel a RDP Session over a WWW-Proxy and I really couldn&#8217;t find anything useful on Google or Yahoo!. After some more searching, asking and trying I finally figured out how this can be done.</p>
<p>First of all: You cannot tunnel RDP directly through a proxy. RDP doesn&#8217;t speak any HTTP(S) to make the proxy connect to the RDP-Server or anything else. So you&#8217;ll need an application, that surrounds this RDP datachannel with HTTP, prefferable HTTPS. I found <em>prtunnel</em> for my Mac on DarwinPorts. This software allows you to tunnel anything you want through an http/socks proxy by connecting to the proxy, making it connect (by sending HTTP commands) to the preffered host and open a local port for the application (e.g. rdesktop) to connect. Good, so let&#8217;s connect using prtunnel to myrdpmachine.com:3389 and be happy! &#8211; NAH. As soon as you&#8217;ll try that you&#8217;ll see that it&#8217;s not that simple. Most http-proxies do not allow CONNECTs to other ports than 80/443. So you can either set up your RDP daemon to use that port &#8211; never found that option in Windoze &#8211; or you can use an SSH jumphost, since it&#8217;s pretty simple to change the SSH port to 443. So, you connect with prtunnel to your SSH machine on port 443, where the SSH daemon runs, open an SSH tunnel through that machine to the myrdpmachine.com port 3389 and connect with your RDP client on localhost:. Okay, let&#8217;s stop the theory and begin with the practice:</p>
<p>Open three terminals and execute the following command on the first one:</p>
<pre>prtunnel -V -t http -H 'proxy address' -P 'proxy port' \
'port on local machine' 'remote host to connect to over proxy' \
'remote port, put SSHd on 443'</pre>
<p>Then, terminal #2 gets the following command: ssh -L&#8217;local tunneling port&#8217;:'destination host&#8217;:'destination port&#8217; -p &#8216;local port to connect to, the same given at prtunnel&#8217; &#8216;user&#8217;@localhost<br />
After that you can hapily run your <em>rdesktop localhost:&#8217;local tunneling port&#8217;</em> and start RDPing. To make the stuff even more clear, here a concrete example:</p>
<pre>prtunnel -V -t http -H 192.168.111.2 -P 3128 13337 192.168.111.3 443
ssh -L13338:192.168.111.24:3389 -p 13337 root@localhost
rdesktop localhost:13338</pre>
<p>That&#8217;s all the magic. Though, you need to pay attention when selecting your ports, because of course only free ports will work and you really should try to keep them higher than 1024 unless you want to become root. Also you need to remember that running an RDP session over HTTP(S) might get the attention of a firewall or whatever monitoring application is available in that network. &#8220;Abnormal behaviour&#8221; &#8211; you&#8217;d never get such an 50:50 up- and downtraffic unless you run some peer-2-peer application or remote desktops.</p>
<p>But of course you can modify the commands and use it to be able to connect to let&#8217;s say Jabber from a network where only 80/443-outgoing is available &#8211; all you need is a jumphost.</p>
]]></content:encoded>
			<wfw:commentRss>http://devilx.net/2007/01/12/rdp-over-ssh-over-https/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

