<?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>vincentkong.com &#187; Proxy</title>
	<atom:link href="http://www.vincentkong.com/tag/proxy/feed" rel="self" type="application/rss+xml" />
	<link>https://www.vincentkong.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 07 Jul 2010 00:32:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Surfing the Web using Web Proxy</title>
		<link>https://www.vincentkong.com/2009/10/surfing-the-web-using-web-proxy</link>
		<comments>https://www.vincentkong.com/2009/10/surfing-the-web-using-web-proxy#comments</comments>
		<pubDate>Tue, 20 Oct 2009 00:48:17 +0000</pubDate>
		<dc:creator>Vincent Kong</dc:creator>
				<category><![CDATA[Proxy]]></category>

		<guid isPermaLink="false">http://www.vincentkong.com/?p=786</guid>
		<description><![CDATA[If you want to browse the internet without having to go through the hassle of building a SSH Tunnel, then a quick and dirty solution would be to use a web proxy. There are limitations to what kind of websites it can work with since browsers cookies aren&#8217;t fully supported. e.g. GMail doesn&#8217;t work.  phpMyProxy [...]


Related posts:<ol><li><a href='https://www.vincentkong.com/2007/05/apache-mod_proxy-and-reverse-proxy' rel='bookmark' title='Permanent Link: Apache mod_proxy and Reverse Proxy'>Apache mod_proxy and Reverse Proxy</a></li>
<li><a href='https://www.vincentkong.com/2008/08/surfing-the-web-using-ssh-tunnel' rel='bookmark' title='Permanent Link: Surfing the Web using SSH Tunnel'>Surfing the Web using SSH Tunnel</a></li>
<li><a href='https://www.vincentkong.com/2007/05/integrating-tomcat-and-apache-using-proxy' rel='bookmark' title='Permanent Link: Integrating Tomcat and Apache Using Proxy'>Integrating Tomcat and Apache Using Proxy</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>If you want to browse the internet without having to go through the hassle of building a <a href="http://www.vincentkong.com/2008/08/surfing-the-web-using-ssh-tunnel">SSH Tunnel</a>, then a quick and dirty solution would be to use a web proxy.  There are limitations to what kind of websites it can work with since browsers cookies aren&#8217;t fully supported. e.g. GMail doesn&#8217;t work.  <a href="http://www.phpmyproxy.com/">phpMyProxy</a> is a php web proxy script written by <a href="http://www.eproxies.info">eProxies.info</a>.</p>
<h3>Installing phpMyProxy in Ubuntu</h3>
<p><a href="http://www.eproxies.info/downloads.php">Download</a> phpMyProxy_1.0.3.zip and extract it into the web host directory.</p>
<p><code>$unzip phpMyProxy_1.0.3.zip /var/www</code></p>
<p>phpMyProxy requires the client URL library for PHP.</p>
<p><code>$ sudo apt-get install php5-curl</code></p>
<p>Modify the <code>proxy.config.php</code> file; it&#8217;s recommended to change the <code>'url_var_name'</code> from <code>'q'</code> to something else like <code>'url'</code> otherwise Google search would not work with phpMyProxy.</p>
<p>To hide your traffic it&#8217;s recommend do <a href="http://www.vincentkong.com/2007/06/configuring-apache-for-ssl-support">encryption with SSL</a> which can be easily setup with Apache.</p>
<div id="attachment_1112" class="wp-caption alignnone" style="width: 310px"><a href="http://www.vincentkong.com/wp-content/uploads/2009/10/phpmyproxy.png"><img class="size-medium wp-image-1112" title="phpMyProxy" src="http://www.vincentkong.com/wp-content/uploads/2009/10/phpmyproxy-300x232.png" alt="Browsing Futureshop.ca with phpMyProxy" width="300" height="232" /></a><p class="wp-caption-text">Browsing Futureshop.ca with phpMyProxy</p></div>


<p>Related posts:<ol><li><a href='https://www.vincentkong.com/2007/05/apache-mod_proxy-and-reverse-proxy' rel='bookmark' title='Permanent Link: Apache mod_proxy and Reverse Proxy'>Apache mod_proxy and Reverse Proxy</a></li>
<li><a href='https://www.vincentkong.com/2008/08/surfing-the-web-using-ssh-tunnel' rel='bookmark' title='Permanent Link: Surfing the Web using SSH Tunnel'>Surfing the Web using SSH Tunnel</a></li>
<li><a href='https://www.vincentkong.com/2007/05/integrating-tomcat-and-apache-using-proxy' rel='bookmark' title='Permanent Link: Integrating Tomcat and Apache Using Proxy'>Integrating Tomcat and Apache Using Proxy</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>https://www.vincentkong.com/2009/10/surfing-the-web-using-web-proxy/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing BoutDuTunnel Server on Mono XSP</title>
		<link>https://www.vincentkong.com/2009/06/installing-boutdutunnel-server-on-mono-xsp</link>
		<comments>https://www.vincentkong.com/2009/06/installing-boutdutunnel-server-on-mono-xsp#comments</comments>
		<pubDate>Fri, 05 Jun 2009 21:43:37 +0000</pubDate>
		<dc:creator>Vincent Kong</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Mono]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Tunnel]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.vincentkong.com/?p=865</guid>
		<description><![CDATA[In my previous blog I talked about setting up a HTTP tunnel using BoutDuTunnel. To setup the server-side, a command line application was used: BdtServer. BoutDuTunnel also provides a web application solution BdtWebServer which lets you host the application inside a web server. To host BdtWebServer in Ubuntu, BoutDuTunnel recommends to use Apache/mod_mono, however I [...]


Related posts:<ol><li><a href='https://www.vincentkong.com/2009/05/http-tunnel-through-isa-server' rel='bookmark' title='Permanent Link: HTTP Tunnel Through ISA Server'>HTTP Tunnel Through ISA Server</a></li>
<li><a href='https://www.vincentkong.com/2009/05/building-mono-from-source' rel='bookmark' title='Permanent Link: Building Mono from Source'>Building Mono from Source</a></li>
<li><a href='https://www.vincentkong.com/2008/03/ssh-through-http-proxies' rel='bookmark' title='Permanent Link: SSH through HTTP Proxies'>SSH through HTTP Proxies</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>In my previous blog I talked about setting up a <a href="http://www.vincentkong.com/2009/05/http-tunnel-through-isa-server/">HTTP tunnel using BoutDuTunnel</a>.  To setup the server-side, a command line application was used:  <code>BdtServer</code>.  BoutDuTunnel also provides a web application solution <code>BdtWebServer</code> which lets you host the application inside a web server.  To host BdtWebServer in Ubuntu, BoutDuTunnel recommends to use <code>Apache/mod_mono</code>, however I decided to use an alternative approach.</p>
<h3>Configuring BdtWebServer</h3>
<p>Mono XSP is a lightweight and simple webserver written in C# which runs run ASP.NET applications.</p>
<p>To install Mono XSP run the following:</p>
<pre>$ apt-get install mono-xsp2
$ apt-get install libmono-system-runtime2.0-cil</pre>
<p>To ensure that XSP is properly installed you can install the ASP.NET 1.1 and 2.0 demo pages.</p>
<pre>$ apt-get install asp.net2-examples
$ xsp2 --applications /:/usr/share/asp.net2-demos</pre>
<p>When the server has successfully started, point your browser to http://localhost:8080 (the default port for XSP web server is 8080) to display the web page below:</p>
<div id="attachment_887" class="wp-caption alignnone" style="width: 310px"><a href="http://www.vincentkong.com/wp-content/uploads/2009/06/asp_net_examples.png"><img class="size-medium wp-image-887" title="ASP.NET Examples" src="http://www.vincentkong.com/wp-content/uploads/2009/06/asp_net_examples-300x296.png" alt="ASP.NET Examples" width="300" height="296" /></a><p class="wp-caption-text">ASP.NET Examples</p></div>
<p>If the following error is encountered:</p>
<p><code>System.InvalidOperationException: Standard output has not been redirected or process has not been started.</code></p>
<p>Run the following command to address the issue:</p>
<pre>ln -s /usr/bin/gmcs2 /usr/bin/gmcs</pre>
<p>Now the BdtWebServer is ready to be started:</p>
<p><code>xsp2 --port 8080 --nonstop --applications /:/opt/bdt.bin.1.4.3066.mono/BdtWebServer</code></p>
<p><code>--nonstop</code> don&#8217;t stop the server by pressing enter. Must be used when the server has no controlling terminal.</p>
<h3>Configuring BdtClient</h3>
<p>Setting up the BdtClient to establish a connection to BdtWebServer is similar to BdtServer with the exception that the <code>name</code> attribute is set to <code>BdtServer.soap</code> in the <code>service</code> tag of the configuration file.</p>
<pre>&lt;service name="BdtServer.soap" .../&gt;</pre>
<h3>Security Issue</h3>
<p>When hosting the BdtWebServer application in a web server the <code>BdtServerCfg.xml</code> (which contains the username and passwords) will be exploit when you point the web browser http://my.server:8080/BdtServerCfg.xml.</p>
<p>To address this issue I setup XSP to integrate with <code>Apache/mod_proxy</code> by configuring the following Apache configuration to forbid access to <code>BdtServerCfg.xml</code></p>
<pre>    &lt;Location /BdtServerCfg.xml&gt;
        Order deny,allow
        Deny from all
    &lt;/Location&gt;

    &lt;Proxy *&gt;
        Order deny,allow
        Allow from all
    &lt;/Proxy&gt;
    ProxyRequests off
    ProxyPass / http://localhost:8080/
    ProxyPassReverse / http://localhost:8080/</pre>
<p>Finally, I setup a firewall to block port 8080 from public access.</p>


<p>Related posts:<ol><li><a href='https://www.vincentkong.com/2009/05/http-tunnel-through-isa-server' rel='bookmark' title='Permanent Link: HTTP Tunnel Through ISA Server'>HTTP Tunnel Through ISA Server</a></li>
<li><a href='https://www.vincentkong.com/2009/05/building-mono-from-source' rel='bookmark' title='Permanent Link: Building Mono from Source'>Building Mono from Source</a></li>
<li><a href='https://www.vincentkong.com/2008/03/ssh-through-http-proxies' rel='bookmark' title='Permanent Link: SSH through HTTP Proxies'>SSH through HTTP Proxies</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>https://www.vincentkong.com/2009/06/installing-boutdutunnel-server-on-mono-xsp/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTTP Tunnel Through ISA Server</title>
		<link>https://www.vincentkong.com/2009/05/http-tunnel-through-isa-server</link>
		<comments>https://www.vincentkong.com/2009/05/http-tunnel-through-isa-server#comments</comments>
		<pubDate>Mon, 01 Jun 2009 01:57:20 +0000</pubDate>
		<dc:creator>Vincent Kong</dc:creator>
				<category><![CDATA[Mono]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Tunnel]]></category>

		<guid isPermaLink="false">http://www.vincentkong.com/?p=826</guid>
		<description><![CDATA[About a year ago I wrote about creating a HTTP tunnel through a HTTP proxy server using GNU HTTP Tunnel.   Unfortunately if the proxy server was run by a ISA server then GNU HTTP Tunnel would not work since it doesn&#8217;t support NTLM authentication. BoutDuTunnel is an open source project written in C# and [...]


Related posts:<ol><li><a href='https://www.vincentkong.com/2009/06/installing-boutdutunnel-server-on-mono-xsp' rel='bookmark' title='Permanent Link: Installing BoutDuTunnel Server on Mono XSP'>Installing BoutDuTunnel Server on Mono XSP</a></li>
<li><a href='https://www.vincentkong.com/2008/03/ssh-through-http-proxies' rel='bookmark' title='Permanent Link: SSH through HTTP Proxies'>SSH through HTTP Proxies</a></li>
<li><a href='https://www.vincentkong.com/2008/08/surfing-the-web-using-ssh-tunnel' rel='bookmark' title='Permanent Link: Surfing the Web using SSH Tunnel'>Surfing the Web using SSH Tunnel</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>About a year ago I wrote about creating a HTTP tunnel through a HTTP proxy server using <a href="http://www.vincentkong.com/2008/03/ssh-through-http-proxies/">GNU HTTP Tunnel</a>.   Unfortunately if the proxy server was run by a ISA server then GNU HTTP Tunnel would not work since it doesn&#8217;t support NTLM authentication.</p>
<p><a href="http://sebastien.lebreton.free.fr/bdtunnel/"> BoutDuTunnel</a> is an open source project written in C# and is compatible with HTTP proxy servers, even if they use NTLM authentication (like ISA Server) and even if they prohibit the &#8220;connect method&#8221;.</p>
<p>To setup BoutDuTunnel on Ubuntu I had to install Mono.  When using Mono 2.0.1 or 2.4 an error occurred <code>Unexpected binary element: 21</code> when running the <code>BdtClient.exe</code>.  Therefore I <a href="http://www.vincentkong.com/2009/05/building-mono-from-source/">installed Mono 1.9.1 by building it from the source</a>.</p>
<p>Instead of installing the latest version of BoutDuTunnel, I installed 1.4.3066 because an error would occur on the BoutDuTunnel server moments after the BoutDuTunnel client connected to it.</p>
<p><code>Unhandled Exception: System.MethodAccessException: Method `Bdt.Server.Service.TunnelSession:CheckTimeout (Bdt.Shared.Logs.ILogger)' is inaccessible from method `Bdt.Server.Service.TimeoutObject:CheckTimeout (Bdt.Shared.Logs.ILogger,System.Collections.Generic.Dictionary`2)'</code></p>
<h3>Setting Up the HTTP Tunnel</h3>
<h4>Setting Up BdtServer (on the home computer)</h4>
<p>The BdtServer can be setup through the command line or hosted inside Apache/mod_mono.  To setup BdtServer with the command line extract the BoutDuTunnel and modify the BdtServer configuration file.</p>
<p><code>$ unzip bdt.bin.1.4.3066.mono.zip<br />
$ cd bdt.bin.1.4.3066.mono/BdtServer<br />
$ nano BdtServerCfg.xml</code></p>
<p>The configuration file is well commented and should be similar to the following:</p>
<p>Configure binary stream/HTTP as the communication protocol to be used.</p>
<pre>&lt;service
name     = "BdtServer"
protocol = "Bdt.Shared.Protocol.HttpBinaryRemoting"
port     = "8080"
/&gt;</pre>
<p>Require user be authenticated before establishing a communication.</p>
<pre>&lt;users&gt;
&lt;username
enabled  = "true"
password = "password"
/&gt;
&lt;/users&gt;</pre>
<p>To start up BdtServer execute the following:</p>
<p><code>$ cd bdt.bin.1.4.3066.mono/BdtServer/<br />
$ mono BdtServer.exe</code></p>
<h4>Setting Up BdtClient (on the office computer)</h4>
<p>There are two types of client available for BoutDuTunnel:</p>
<ul>
<li>BdtClient run by the command line</li>
<li>BdtGuiClient which provides a GUI interface</li>
</ul>
<p>To setup BdtClient modify the <code>BdtClientCfg.xml</code> configuration file.</p>
<p>Configure hostname and communication protocol for server with BdtServer.</p>
<pre>  &lt;service
    name     = "BdtServer"
    protocol = "Bdt.Shared.Protocol.HttpBinaryRemoting"
    address  = "my.server"
    port     = "8080"
    username = "my.username"
    password = "my.password"
  /&gt;</pre>
<p>Configure the proxy/ISA server to be used.</p>
<pre>  &lt;proxy
    enabled  = "true"&gt;
    &lt;authentification
      auto     = "false"
      username = "proxy.username"
      password = "proxy.password"
      domain   = "proxy.domain"
    /&gt;
    &lt;configuration
      auto     = "false"
      address  = "proxy.hostname"
      port     = "proxy.port"
    /&gt;
  &lt;/proxy&gt;</pre>
<p>Configure the ports to be forwarded.</p>
<pre>  &lt;forward&gt;
    &lt;port22
      shared  = "false"
      enabled = "true"
      address = "my.ssh.server"
      port    = "22"
    /&gt;
  &lt;/forward&gt;</pre>
<p>Run the BoutDuTunnel client to establish a tunnel connection to the BdtServer.</p>
<p><code>C:\bdt.bin.1.4.3066.mono\BdtClient&gt;BdtClient</code></p>
<p>Now a SSH connection can be establish to your home computer by connecting through <code>localhost:22</code></p>


<p>Related posts:<ol><li><a href='https://www.vincentkong.com/2009/06/installing-boutdutunnel-server-on-mono-xsp' rel='bookmark' title='Permanent Link: Installing BoutDuTunnel Server on Mono XSP'>Installing BoutDuTunnel Server on Mono XSP</a></li>
<li><a href='https://www.vincentkong.com/2008/03/ssh-through-http-proxies' rel='bookmark' title='Permanent Link: SSH through HTTP Proxies'>SSH through HTTP Proxies</a></li>
<li><a href='https://www.vincentkong.com/2008/08/surfing-the-web-using-ssh-tunnel' rel='bookmark' title='Permanent Link: Surfing the Web using SSH Tunnel'>Surfing the Web using SSH Tunnel</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>https://www.vincentkong.com/2009/05/http-tunnel-through-isa-server/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Surfing the Web using SSH Tunnel</title>
		<link>https://www.vincentkong.com/2008/08/surfing-the-web-using-ssh-tunnel</link>
		<comments>https://www.vincentkong.com/2008/08/surfing-the-web-using-ssh-tunnel#comments</comments>
		<pubDate>Sat, 23 Aug 2008 04:25:35 +0000</pubDate>
		<dc:creator>Vincent Kong</dc:creator>
				<category><![CDATA[Proxy]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tunnel]]></category>

		<guid isPermaLink="false">http://www.vincentkong.com/?p=241</guid>
		<description><![CDATA[Sometimes, you are connected to an internet which is unknown/insecure such as public WiFi hotspots or you are just surfing the internet at work.  In these type of scenarios you might want to secure your connection so no one can sniff at what or where you&#8217;re surfing. One way to create a secure connection is [...]


Related posts:<ol><li><a href='https://www.vincentkong.com/2007/07/remote-desktop-with-ssh-tunneling' rel='bookmark' title='Permanent Link: Remote Desktop with SSH Tunneling'>Remote Desktop with SSH Tunneling</a></li>
<li><a href='https://www.vincentkong.com/2008/03/ssh-through-http-proxies' rel='bookmark' title='Permanent Link: SSH through HTTP Proxies'>SSH through HTTP Proxies</a></li>
<li><a href='https://www.vincentkong.com/2009/05/http-tunnel-through-isa-server' rel='bookmark' title='Permanent Link: HTTP Tunnel Through ISA Server'>HTTP Tunnel Through ISA Server</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Sometimes, you are connected to an internet which is unknown/insecure such as public WiFi hotspots or you are just surfing the internet at work.  In these type of scenarios you might want to secure your connection so no one can sniff at what or where you&#8217;re surfing. One way to create a secure connection is to create an SSH tunnel, and have your web browser use it as a SOCKS proxy.</p>
<p>The first requirement is to have a remote host running an SSH server. e.g. a <a href="http://www.vincentkong.com/2007/05/openssh-for-ubuntu-quickstart-guide/">box at home running OpenSSH</a>. Then, you need to have an SSH client installed on your local machine, for Windows you can use <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty">PuTTY</a>.</p>
<h3>Establish an SSH tunnel using PuTTY:</h3>
<h4>Create a new PuTTY session</h4>
<p>Run PuTTY and create a new session to connect to the remote host. Fill in the hostname, the port (usually 22), make sure SSH is checked.</p>
<p><a href="http://www.vincentkong.com/wp-content/uploads/2008/07/putty_session.png"><img class="aligncenter size-medium wp-image-244" title="PuTTY Session" src="http://www.vincentkong.com/wp-content/uploads/2008/07/putty_session-300x290.png" alt="PuTTY Session" width="300" height="290" /></a></p>
<h4>Configure the Secure Tunnel</h4>
<p>Click on &#8220;Tunnels&#8221; on the left panel to set up dynamic fowarding for a local port. Under &#8220;Add new forwarded port&#8221; type in the port number (e.g. 4080) for the source port, leave the destination blank, and check Auto and Dynamic. Then click the &#8220;Add&#8221; button. You should see D4080 listed in the &#8220;Forwarded Ports&#8221; box.</p>
<p><a href="http://www.vincentkong.com/wp-content/uploads/2008/07/putty_tunnel.png"><img class="aligncenter size-medium wp-image-245" title="PuTTY Tunnel" src="http://www.vincentkong.com/wp-content/uploads/2008/07/putty_tunnel-300x290.png" alt="PuTTY Tunnel" width="300" height="290" /></a></p>
<h3>Establish an SSH tunnel on Linux:</h3>
<p>Use the following command:</p>
<p><code>$ ssh -D 4080 username@remote_host_server</code></p>
<p>The tunnel is created when you login to the SSH server.</p>
<h3>Configuring Your Web Browser:</h3>
<p>To use the SSH tunnel as a SOCKS proxy you need to change the connection settings in the browser.</p>
<p>In the Firefox Connection Settings:</p>
<ul>
<li> Check &#8220;Manual Proxy Configuration:&#8221;</li>
<li> Fill in 127.0.0.1 for the &#8220;SOCKS Host:&#8221; and 4080 for &#8220;Port:&#8221;</li>
<li> Check &#8220;SOCKS v5&#8243;</li>
</ul>
<p><a href="http://www.vincentkong.com/wp-content/uploads/2008/07/firefox_proxy.png"><img class="aligncenter size-medium wp-image-246" title="Firefox Proxy Settings" src="http://www.vincentkong.com/wp-content/uploads/2008/07/firefox_proxy-272x300.png" alt="Firefox Proxy Settings" width="272" height="300" /></a></p>
<p>Once everything is done you are now surfing the web securely.</p>


<p>Related posts:<ol><li><a href='https://www.vincentkong.com/2007/07/remote-desktop-with-ssh-tunneling' rel='bookmark' title='Permanent Link: Remote Desktop with SSH Tunneling'>Remote Desktop with SSH Tunneling</a></li>
<li><a href='https://www.vincentkong.com/2008/03/ssh-through-http-proxies' rel='bookmark' title='Permanent Link: SSH through HTTP Proxies'>SSH through HTTP Proxies</a></li>
<li><a href='https://www.vincentkong.com/2009/05/http-tunnel-through-isa-server' rel='bookmark' title='Permanent Link: HTTP Tunnel Through ISA Server'>HTTP Tunnel Through ISA Server</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>https://www.vincentkong.com/2008/08/surfing-the-web-using-ssh-tunnel/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SSH through HTTP Proxies</title>
		<link>https://www.vincentkong.com/2008/03/ssh-through-http-proxies</link>
		<comments>https://www.vincentkong.com/2008/03/ssh-through-http-proxies#comments</comments>
		<pubDate>Sat, 29 Mar 2008 02:28:45 +0000</pubDate>
		<dc:creator>Vincent Kong</dc:creator>
				<category><![CDATA[Proxy]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Tunnel]]></category>

		<guid isPermaLink="false">http://wordpress.vincentkong.com/?p=5</guid>
		<description><![CDATA[A couple of days ago my office implemented a new firewall which block almost all incoming and outgoing traffic, including SSH which prevented me from accessing my Linux server. The only thing that was accessible was the internet through a HTTP proxy which implemented filtering capabilties and required credentials. Fortunately, with this I&#8217;m able to [...]


Related posts:<ol><li><a href='https://www.vincentkong.com/2009/05/http-tunnel-through-isa-server' rel='bookmark' title='Permanent Link: HTTP Tunnel Through ISA Server'>HTTP Tunnel Through ISA Server</a></li>
<li><a href='https://www.vincentkong.com/2008/08/surfing-the-web-using-ssh-tunnel' rel='bookmark' title='Permanent Link: Surfing the Web using SSH Tunnel'>Surfing the Web using SSH Tunnel</a></li>
<li><a href='https://www.vincentkong.com/2007/07/remote-desktop-with-ssh-tunneling' rel='bookmark' title='Permanent Link: Remote Desktop with SSH Tunneling'>Remote Desktop with SSH Tunneling</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>A couple of days ago my office implemented a new firewall which block almost all incoming and outgoing traffic, including SSH which prevented me from accessing my Linux server. The only thing that was accessible was the internet through a HTTP proxy which implemented filtering capabilties and required credentials. Fortunately, with this I&#8217;m able to create a tunnel and encapulate a SSH connection into HTTP.</p>
<p>To create a HTTP tunnel I chose to use the <a href="http://www.nocrew.org/software/httptunnel.html">GNU HTTP Tunnel</a> software which does the work to encapsulate TCP into HTTP requests.  For the Windows platform a <a href="http://www.neophob.com/serendipity/index.php?/archives/85-GNU-HTTPtunnel-v3.3-Windows-Binaries.html">binary version</a> is also available</p>
<p><strong>Setting up the tunnel</strong></p>
<p><strong><em>On the home computer (server):</em></strong></p>
<p>Install the GNU HTTP Tunnel with the following command:</p>
<p><code>$ apt-get install httptunnel</code></p>
<p>Start the HTTP Tunnel server:</p>
<p><code>$ hts --forward-port localhost:22 8080 </code></p>
<p>Here the HTTP Tunnel server receives HTTP requests through port 8080, decapsulates and re-assembles the ssh stream and forwards it to port 22, the SSH server.</p>
<p><strong><em>On the office computer (client):</em></strong></p>
<p>Start the HTTP Tunnel client:</p>
<p><code>$ htc --forward-port 900 --proxy OfficeProxy:8080 HomeComputer:8080</code></p>
<p>Here the HTTP Tunnel client listens on port 900 for a ssh stream, as well it establishes a TCP connection which can pass data back and forth to the home computer through the HTTP proxy.</p>
<p>If the proxy requires authentication, add <code>--proxy-authorization username:password</code> to the <code>htc</code> command line.</p>
<p>Finally to establish a SSH connection run the following:</p>
<p><code>$ ssh username@localhost:900</code></p>
<p>For information:  <a href="http://sebsauvage.net/punching">Punching holes into firewalls</a></p>


<p>Related posts:<ol><li><a href='https://www.vincentkong.com/2009/05/http-tunnel-through-isa-server' rel='bookmark' title='Permanent Link: HTTP Tunnel Through ISA Server'>HTTP Tunnel Through ISA Server</a></li>
<li><a href='https://www.vincentkong.com/2008/08/surfing-the-web-using-ssh-tunnel' rel='bookmark' title='Permanent Link: Surfing the Web using SSH Tunnel'>Surfing the Web using SSH Tunnel</a></li>
<li><a href='https://www.vincentkong.com/2007/07/remote-desktop-with-ssh-tunneling' rel='bookmark' title='Permanent Link: Remote Desktop with SSH Tunneling'>Remote Desktop with SSH Tunneling</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>https://www.vincentkong.com/2008/03/ssh-through-http-proxies/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Apache mod_proxy and Reverse Proxy</title>
		<link>https://www.vincentkong.com/2007/05/apache-mod_proxy-and-reverse-proxy</link>
		<comments>https://www.vincentkong.com/2007/05/apache-mod_proxy-and-reverse-proxy#comments</comments>
		<pubDate>Fri, 25 May 2007 15:34:45 +0000</pubDate>
		<dc:creator>Vincent Kong</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://wordpress.vincentkong.com/?p=83</guid>
		<description><![CDATA[The mod_proxy module implements a proxy/gateway for Apache. It implements proxying capability for several different protocols and are divided into additional modules: mod_proxy_http, mod_proxy_ftp, mod_proxy_ajp, mod_proxy_balancer, and mod_proxy_connect. Apache can be configured in both a forward and reverse proxy mode. Only reverse proxy will be discussed in this section. A reverse proxy is a gateway [...]


Related posts:<ol><li><a href='https://www.vincentkong.com/2007/05/integrating-tomcat-and-apache-using-proxy' rel='bookmark' title='Permanent Link: Integrating Tomcat and Apache Using Proxy'>Integrating Tomcat and Apache Using Proxy</a></li>
<li><a href='https://www.vincentkong.com/2007/05/apache-for-ubuntu-quickstart-guide' rel='bookmark' title='Permanent Link: Apache for Ubuntu Quickstart Guide'>Apache for Ubuntu Quickstart Guide</a></li>
<li><a href='https://www.vincentkong.com/2007/06/configuring-apache-for-ssl-support' rel='bookmark' title='Permanent Link: Configuring Apache for SSL Support'>Configuring Apache for SSL Support</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The mod_proxy module implements a proxy/gateway for Apache. It implements proxying capability for several different protocols and are divided into additional modules: <code>mod_proxy_http</code>, <code>mod_proxy_ftp</code>, <code>mod_proxy_ajp</code>, <code>mod_proxy_balancer</code>, and <code>mod_proxy_connect</code>.</p>
<p>Apache can be configured in both a <em>forward</em> and <em>reverse</em> proxy mode. Only reverse proxy will be discussed in this section.</p>
<p>A reverse proxy is a gateway for servers, and enables one web server to provide content from another transparently.</p>
<p><em>Note: </em>A reverse proxy is activated using the <code class="directive">ProxyPass</code> directive. It is <strong>not</strong> necessary to turn <code class="directive">ProxyRequests</code> on in order to configure a reverse proxy.</p>
<p><strong>Setting Up Reverse Proxy</strong></p>
<p>Enable the <code>mod_proxy</code> module</p>
<p><code>$ a2enmod proxy</code></p>
<p>Enable the <code>mod_proxy_http</code> module if you are going to proxy to a <code>http</code> protocol</p>
<p><code>$ a2enmod proxy_http</code></p>
<p>Add the following to the <code>/etc/apache2/httpd.conf</code> or a virtual host site in <code>/etc/apache2/sites-available</code>:</p>
<pre>ProxyRequests Off
&lt;Proxy *&gt;
    Order deny,allow
    Allow from all
&lt;/Proxy&gt;</pre>
<pre>ProxyPreserveHost on
ProxyPass /foo http://foo.example.com/bar
ProxyPassReverse /foo http://foo.example.com/bar</pre>
<p>For more information on mod_proxy refer to the Apache documentation at <a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy.html">http://httpd.apache.org/docs/2.2/mod/mod_proxy.html</a></p>


<p>Related posts:<ol><li><a href='https://www.vincentkong.com/2007/05/integrating-tomcat-and-apache-using-proxy' rel='bookmark' title='Permanent Link: Integrating Tomcat and Apache Using Proxy'>Integrating Tomcat and Apache Using Proxy</a></li>
<li><a href='https://www.vincentkong.com/2007/05/apache-for-ubuntu-quickstart-guide' rel='bookmark' title='Permanent Link: Apache for Ubuntu Quickstart Guide'>Apache for Ubuntu Quickstart Guide</a></li>
<li><a href='https://www.vincentkong.com/2007/06/configuring-apache-for-ssl-support' rel='bookmark' title='Permanent Link: Configuring Apache for SSL Support'>Configuring Apache for SSL Support</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>https://www.vincentkong.com/2007/05/apache-mod_proxy-and-reverse-proxy/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
