<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/1.5.1-alpha" -->
<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/"
>

<channel>
	<title>the other side of the firewall</title>
	<link>http://sahuguet.blogsome.com</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Sat, 31 Dec 2005 16:23:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=1.5.1-alpha</generator>
	<language>en</language>

		<item>
		<title>Forward proxy with masquerading</title>
		<link>http://sahuguet.blogsome.com/2005/08/17/forward-proxy-with-masquerading/</link>
		<comments>http://sahuguet.blogsome.com/2005/08/17/forward-proxy-with-masquerading/#comments</comments>
		<pubDate>Wed, 17 Aug 2005 01:23:51 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
		
	<category>Hacks</category>
	<category>Apache</category>
		<guid>http://sahuguet.blogsome.com/2005/08/17/forward-proxy-with-masquerading/</guid>
		<description><![CDATA[	I need to do a demo related to identity management.
I have installed some software on a machine and want to let other people get a feel of the “simplified sign-on” experience.
	And to make things more real, I want to use real domain names.
	A user would point his web client to www.meteo.fr and gets redirected to [...]]]></description>
			<content:encoded><![CDATA[	<p>I need to do a demo related to identity management.<br />
I have installed some software on a machine and want to let other people get a feel of the “simplified sign-on” experience.</p>
	<p>And to make things more real, I want to use real domain names.</p>
	<p>A user would point his web client to www.meteo.fr and gets redirected to my server machine where the magic of SSO should happen.</p>
	<p>There are many ways to masquerade an IP address. You can ask the user to change the way domain names get resolved: e.g. /etc/hosts on Un*x systems. lmhosts on Windows machines. But this requires some complicated changes.</p>
	<p>A better way — since we are doing HTTP –, is to tell the user to use a proxy.<br />
The proxy will route your masqueraded URLs to the right destination while leaving the rest of the trafic unchanged.</p>
	<p>How do I do that? I have been struggking of a few days, looking at mod_proxy and mod_rewrite. Here is one way to do it:</p>
	<pre>
NameVirtualHost *:8666
	
    # masquerade www.figaro.fr
&lt;VirtualHost *:8666&gt;
    ServerName www.figaro.fr
    ProxyPass / http://my.machine.com
    ProxyPassReverse /
&lt;/VirtualHost&gt;
	
    # masquerade www.lemonde.fr
&lt;VirtualHost *:8666&gt;
    ServerName www.lemonde.fr
    ProxyPass / http://my.machine.com
    ProxyPassReverse / http://www.yahoo.fr/
&lt;/VirtualHost&gt;
	
    # regular trafic
&lt;VirtualHost *:8666&gt;
    ProxyRequests On
&lt;/VirtualHost&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://sahuguet.blogsome.com/2005/08/17/forward-proxy-with-masquerading/feed/</wfw:commentRss>
	</item>
	</channel>
</rss>
