<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>work @ t6d</title>
	
	<link>http://work.t6d.com</link>
	<description>A blog about flex, php and rails.</description>
	<lastBuildDate>Fri, 26 Mar 2010 02:14:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/WorkT6d" /><feedburner:info uri="workt6d" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Failed to start the database service MSSQL$Microsoft##SSEE</title>
		<link>http://feedproxy.google.com/~r/WorkT6d/~3/P2EclnD50B8/</link>
		<comments>http://work.t6d.com/2010/03/failed-to-start-the-database-service-mssqlmicrosoftssee/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 02:12:05 +0000</pubDate>
		<dc:creator>theo.denovan</dc:creator>
				<category><![CDATA[Server Configuration]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[mssql]]></category>
		<category><![CDATA[sharepoint]]></category>
		<category><![CDATA[wid]]></category>
		<category><![CDATA[wss]]></category>

		<guid isPermaLink="false">http://work.t6d.com/?p=54</guid>
		<description><![CDATA[If you get this error repeatedly it&#8217;s probably because the Windows Internal Database service hasn&#8217;t been correctly installed or configured. This should come bundled with the WSS installer.
The solution for me was to run the installer as an administrator.
]]></description>
			<content:encoded><![CDATA[<p>If you get this error repeatedly it&#8217;s probably because the Windows Internal Database service hasn&#8217;t been correctly installed or configured. This should come bundled with the WSS installer.</p>
<p>The solution for me was to <strong>run the installer as an administrator</strong>.</p>
<img src="http://feeds.feedburner.com/~r/WorkT6d/~4/P2EclnD50B8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://work.t6d.com/2010/03/failed-to-start-the-database-service-mssqlmicrosoftssee/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://work.t6d.com/2010/03/failed-to-start-the-database-service-mssqlmicrosoftssee/</feedburner:origLink></item>
		<item>
		<title>Cloning gitosis-admin.git asks for password</title>
		<link>http://feedproxy.google.com/~r/WorkT6d/~3/N-oJE1kAswc/</link>
		<comments>http://work.t6d.com/2010/03/cloning-gitosis-admin-git-asks-for-password/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 13:28:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[clone]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://work.t6d.com/?p=52</guid>
		<description><![CDATA[For some reason when cloning gitsosis-admin.git on OS X using the syntax
git clone ssh://gitosis@githost:gitsosis-admin.git

Git persistently asked for a password. Oddly, it seemed as though the host wasn&#8217;t being correctly interpreted as I received the message &#8220;The authenticity of host &#8216; (::1)&#8217; can&#8217;t be established.&#8221; every time I tried to connect.
The solution turned out to be ]]></description>
			<content:encoded><![CDATA[<p>For some reason when cloning gitsosis-admin.git on OS X using the syntax</p>
<pre style="padding-left: 30px;">git clone ssh://gitosis@githost:gitsosis-admin.git
</pre>
<p>Git persistently asked for a password. Oddly, it seemed as though the host wasn&#8217;t being correctly interpreted as I received the message &#8220;The authenticity of host &#8216; (::1)&#8217; can&#8217;t be established.&#8221; every time I tried to connect.</p>
<p>The solution turned out to be relatively simple, use SCP instead of SSH. Git defaults to this anyway, the only downside is that you have to qualify the repo with the repositories folder, ie:</p>
<pre style="padding-left: 30px;">git clone gitosis@githost:<strong>repositories/</strong>gitosis-admin.git</pre>
<p>Of course you can always add the gitosis username to your .ssh/config file to make things even simpler.</p>
<img src="http://feeds.feedburner.com/~r/WorkT6d/~4/N-oJE1kAswc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://work.t6d.com/2010/03/cloning-gitosis-admin-git-asks-for-password/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://work.t6d.com/2010/03/cloning-gitosis-admin-git-asks-for-password/</feedburner:origLink></item>
		<item>
		<title>Snow Leopard – Cannot connect to MySQL 4.1+ using old authentication</title>
		<link>http://feedproxy.google.com/~r/WorkT6d/~3/C12ItoRtLfw/</link>
		<comments>http://work.t6d.com/2010/01/snow-leopard-cannot-connect-to-mysql-4-1-using-old-authentication/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 00:30:44 +0000</pubDate>
		<dc:creator>theo.denovan</dc:creator>
				<category><![CDATA[Server Configuration]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[snow leopard]]></category>

		<guid isPermaLink="false">http://work.t6d.com/?p=45</guid>
		<description><![CDATA[Snow Leopard upgraded php to 5.3, this means that passwords have to be changed &#8211; usually via SET password FOR &#8216;user&#8217;@'host&#8217; = PASSWORD( &#8216;password&#8217; ). This is fine, and can be verified by SELECT LENGTH( password ), user FROM mysql.user. The result should be 41.
I had inadvertently enabled old_password=1 in /etc/my.cnf, this caused both PASSWORD ]]></description>
			<content:encoded><![CDATA[<p>Snow Leopard upgraded php to 5.3, this means that passwords have to be changed &#8211; usually via SET password FOR &#8216;user&#8217;@'host&#8217; = PASSWORD( &#8216;password&#8217; ). This is fine, and can be verified by SELECT LENGTH( password ), user FROM mysql.user. The result should be 41.</p>
<p>I had inadvertently enabled old_password=1 in /etc/my.cnf, this caused both PASSWORD and OLD_PASSWORD to return the same value. To fix this, simply comment out the old_password=1 line in my.cnf and restart mysqld.</p>
<p>Hopefully this saves someone a few dozen google searches.</p>
<img src="http://feeds.feedburner.com/~r/WorkT6d/~4/C12ItoRtLfw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://work.t6d.com/2010/01/snow-leopard-cannot-connect-to-mysql-4-1-using-old-authentication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://work.t6d.com/2010/01/snow-leopard-cannot-connect-to-mysql-4-1-using-old-authentication/</feedburner:origLink></item>
		<item>
		<title>Maximum memory available to AIR Applications in Windows – Why AIR/Flash needs to be 64-bit</title>
		<link>http://feedproxy.google.com/~r/WorkT6d/~3/EdVQHg9hgVg/</link>
		<comments>http://work.t6d.com/2010/01/maximum-memory-available-to-air-applications-in-windows-why-airflash-needs-to-be-64-bit/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 07:00:20 +0000</pubDate>
		<dc:creator>theo.denovan</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://work.t6d.com/?p=41</guid>
		<description><![CDATA[Let&#8217;s be honest, at some point in time we&#8217;ve all tried to load a stupendously large number of images into flash just to see what would happen. Unsurprisingly, Flash will crash. Precisely when it will crash however seems to be enshrouded in mystery. The reason why there doesn&#8217;t appear to be any direct Adobe documentation ]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s be honest, at some point in time we&#8217;ve all tried to load a stupendously large number of images into flash just to see what would happen. Unsurprisingly, Flash will crash. Precisely when it will crash however seems to be enshrouded in mystery. The reason why there doesn&#8217;t appear to be any direct Adobe documentation on the issue is that it&#8217;s not so much a Flash issue as an OS issue.</p>
<p>The maximum memory available to AIR applications is limited to 2gb (in windows) by the 32 bit nature of the Adobe AIR runtime. In windows this means that the maximum memory available will be around 2 gigabytes. (In tests my application consistently died at around 1.8gb). This limit is independent of the OS architecture &#8211; it makes no difference if you&#8217;re running Windows 32 bit or Windows 64 bit.</p>
<p>According to an MSDN article (<a href="http://msdn.microsoft.com/en-us/library/aa366778%28VS.85%29.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/aa366778%28VS.85%29.aspx</a>) the IMAGE_FILE_LARGE_ADDRESS_AWARE should allow 32 bit applications to access up to 4 gb of memory, I think it&#8217;s safe to assume that this option is not enabled in the Windows AIR runtime.</p>
<p>If Adobe is serious about AIR competing on an equal footing with native applications it is vital that these memory issues are resolved. Whilst AIR 2.0 seems to be a step in the right direction and I understand that using a runtime environment will never be the same as building a native app, I&#8217;d still love to see a 64 bit version of AIR.</p>
<p>(This article only pertains to the Windows AIR runtime, I haven&#8217;t tested Mac OS X or Linux. There is a 64 bit version of AIR for linux in closed beta.)</p>
<img src="http://feeds.feedburner.com/~r/WorkT6d/~4/EdVQHg9hgVg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://work.t6d.com/2010/01/maximum-memory-available-to-air-applications-in-windows-why-airflash-needs-to-be-64-bit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://work.t6d.com/2010/01/maximum-memory-available-to-air-applications-in-windows-why-airflash-needs-to-be-64-bit/</feedburner:origLink></item>
		<item>
		<title>Contextual scope handlers in Red5 (appLeave vs roomLeave, appStop vs roomStop, etc)</title>
		<link>http://feedproxy.google.com/~r/WorkT6d/~3/vx7JOcx_Rg0/</link>
		<comments>http://work.t6d.com/2010/01/contextual-scope-handlers-in-red5-appleave-vs-roomleave-appstop-vs-roomstop-etc/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 07:58:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[appDisconnect]]></category>
		<category><![CDATA[appLeave]]></category>
		<category><![CDATA[application scope]]></category>
		<category><![CDATA[appStop]]></category>
		<category><![CDATA[child scope]]></category>
		<category><![CDATA[red5]]></category>
		<category><![CDATA[roomDisconnect]]></category>
		<category><![CDATA[roomLeave]]></category>
		<category><![CDATA[roomStop]]></category>
		<category><![CDATA[scope]]></category>
		<category><![CDATA[scope handlers]]></category>

		<guid isPermaLink="false">http://work.t6d.com/?p=36</guid>
		<description><![CDATA[The issue is
In Red5 different scope handlers triggered by universal events (such as a client disconnecting) will be invoked depending on whether or not the universal event applies to the application scope (the root scope) or a child scope. For instance, if a client disconnects from the application, this will call the appStop, appLeave and ]]></description>
			<content:encoded><![CDATA[<p><strong>The issue is</strong></p>
<p>In Red5 different scope handlers triggered by universal events (such as a client disconnecting) will be invoked depending on whether or not the universal event applies to the application scope (the root scope) or a child scope. For instance, if a client disconnects from the application, this will call the appStop, appLeave and appDisconnect handlers. By disconnecting from the application scope the client is also disconnecting from all child scopes (ie: rooms), however these handlers are <strong>not</strong> called.</p>
<p><strong>A little bit confusing<br />
</strong></p>
<p>Of itself, that behaviour&#8217;s not too difficult to grasp and I certainly haven&#8217;t had anywhere close to enough exposure to the design premise behind red5 to comment on it. Having said that, there are a couple of things which I find a little bit confusing:</p>
<ol>
<li>The difference between the disconnect and leave handlers is not immediately obvious. It appears that both these handlers are called from the disconnect method on the Scope class (org.red5.server.Scope). My best guess at the moment is that the duplicitous methods have been left in for backwards compatibility or cohesion with FMS.</li>
<li>It seems like the only time the room handlers will be called is if a client is directly connected to a child scope and then wishes to regress to a higher scope. ie: the client connects directly to a room and then drops back to the application scope. In my case the reverse is usually true; the client connects to a lobby and then proceeds to connect to a room (child scope). Connecting to a child scope however is treated by a red5 as a completely new connection, triggering the appConnect handler and resulting in a new client id being assigned to the connection.</li>
</ol>
<p>I&#8217;ve only been using Red5 for a couple of weeks now, so it&#8217;s likely a lot of the confusion is my own fault. The code I&#8217;m using to connect to a child scope on the server-side was provided by flashmonkey at <a href="http://www.flashmonkey.org/?p=341">http://www.flashmonkey.org/?p=341</a>:</p>
<pre name="code" class="java">
public void changeScope() {
<div style="padding-left: 20px;">IConnection connection = Red5.getConnectionLocal();
IScope currentScope = connection.getScope();
boolean success = currentScope.createChildScope("ChildScope");
if (success)
{
<div style="padding-left: 40px;">IScope newScope = currentScope.getScope("ChildScope");
newScope.connect(connection);</div>

}
</div>

}
</pre>
<img src="http://feeds.feedburner.com/~r/WorkT6d/~4/vx7JOcx_Rg0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://work.t6d.com/2010/01/contextual-scope-handlers-in-red5-appleave-vs-roomleave-appstop-vs-roomstop-etc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://work.t6d.com/2010/01/contextual-scope-handlers-in-red5-appleave-vs-roomleave-appstop-vs-roomstop-etc/</feedburner:origLink></item>
		<item>
		<title>Red5 Application Directory Structure</title>
		<link>http://feedproxy.google.com/~r/WorkT6d/~3/IKlHCvYpQgw/</link>
		<comments>http://work.t6d.com/2009/12/red5-application-directory-structure/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 11:42:47 +0000</pubDate>
		<dc:creator>theo.denovan</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[directory]]></category>
		<category><![CDATA[directory structure]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[red5]]></category>
		<category><![CDATA[remoting]]></category>
		<category><![CDATA[rmpt]]></category>

		<guid isPermaLink="false">http://work.t6d.com/?p=17</guid>
		<description><![CDATA[For future reference, (and for the benefit of the worldwide interwebs), I thought I&#8217;d share the directory structure I use for my Red5 applications; it&#8217;s fairly standard but there&#8217;s not an overwhelming amount of documentation out there. (It&#8217;s based on the examples at http://code.google.com/p/red5/source/browse/java/example/trunk/).
Source folder
-&#62; src
-&#62; libs
-&#62; www
-&#62; WEB-INF
-&#62; classes
-&#62; logback-APPLICATION_NAME.xml
-&#62; lib
-&#62; red5-web.properties
-&#62; red5-web.xml
-&#62; web.xml


The ]]></description>
			<content:encoded><![CDATA[<p>For future reference, (and for the benefit of the worldwide interwebs), I thought I&#8217;d share the directory structure I use for my Red5 applications; it&#8217;s fairly standard but there&#8217;s not an overwhelming amount of documentation out there. (It&#8217;s based on the examples at <a href="http://code.google.com/p/red5/source/browse/java/example/trunk/">http://code.google.com/p/red5/source/browse/java/example/trunk/</a>).</p>
<p><strong>Source folder</strong></p>
<pre class="rb">-&gt; src
-&gt; libs
-&gt; www
<div style="padding-left: 30px;">-&gt; WEB-INF</div>
<div style="padding-left: 60px;">-&gt; classes</div>
<div style="padding-left: 90px;">-&gt; logback-<strong>APPLICATION_NAME</strong>.xml</div>
<div style="padding-left: 60px;">-&gt; lib
-&gt; red5-web.properties
-&gt; red5-web.xml
-&gt; web.xml</div>
</pre>
<ul>
<li>The src folder builds to www/WEB-INF/classes</li>
<li>www is symbolically linked to webapps/APPLICATION_NAME</li>
<li>APPLICATION_NAME should be replaced with the name of your application</li>
</ul>
<p><strong>red5-web.properties</strong></p>
<pre class="rb">webapp.contextPath=/<strong>APPLICATION_NAME</strong>
webapp.virtualHosts=localhost, 127.0.0.1</pre>
<p><strong>red5-web.xml</strong></p>
<pre class="xml">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"&gt;
&lt;beans&gt;

&lt;bean id="placeholderConfig"&gt;
&lt;property name="location" value="/WEB-INF/red5-web.properties" /&gt;
&lt;/bean&gt;

&lt;bean id="web.context"
autowire="byType" /&gt;

&lt;bean id="web.scope"
init-method="register"&gt;
&lt;property name="server" ref="red5.server" /&gt;
&lt;property name="parent" ref="global.scope" /&gt;
&lt;property name="context" ref="web.context" /&gt;
&lt;property name="handler" ref="web.handler" /&gt;
&lt;property name="contextPath" value="${webapp.contextPath}" /&gt;
&lt;property name="virtualHosts" value="${webapp.virtualHosts}" /&gt;
&lt;/bean&gt;

&lt;bean id="web.handler" singleton="true" /&gt;
&lt;/beans&gt;</pre>
<p><strong>web.xml</strong></p>
<pre class="xml">&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
&lt;web-app
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4"&gt;

&lt;display-name&gt;<strong>APPLICATION_NAME</strong>&lt;/display-name&gt;

&lt;context-param&gt;
&lt;param-name&gt;webAppRootKey&lt;/param-name&gt;
&lt;param-value&gt;/<strong>APPLICATION_NAME</strong>&lt;/param-value&gt;
&lt;/context-param&gt;

&lt;listener&gt;
&lt;listener-class&gt;org.red5.logging.ContextLoggingListener&lt;/listener-class&gt;
&lt;/listener&gt;

&lt;filter&gt;
&lt;filter-name&gt;LoggerContextFilter&lt;/filter-name&gt;
&lt;filter-class&gt;org.red5.logging.LoggerContextFilter&lt;/filter-class&gt;
&lt;/filter&gt;

&lt;filter-mapping&gt;
&lt;filter-name&gt;LoggerContextFilter&lt;/filter-name&gt;
&lt;url-pattern&gt;/*&lt;/url-pattern&gt;
&lt;/filter-mapping&gt;

&lt;!-- remove the following servlet tags if you want to disable remoting for this application --&gt;
&lt;servlet&gt;
&lt;servlet-name&gt;gateway&lt;/servlet-name&gt;
&lt;servlet-class&gt;
org.red5.server.net.servlet.AMFGatewayServlet
&lt;/servlet-class&gt;
&lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
&lt;/servlet&gt;

&lt;servlet-mapping&gt;
&lt;servlet-name&gt;gateway&lt;/servlet-name&gt;
&lt;url-pattern&gt;/gateway&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;

&lt;security-constraint&gt;
&lt;web-resource-collection&gt;
&lt;web-resource-name&gt;Forbidden&lt;/web-resource-name&gt;
&lt;url-pattern&gt;/streams/*&lt;/url-pattern&gt;
&lt;/web-resource-collection&gt;
&lt;auth-constraint/&gt;
&lt;/security-constraint&gt;

&lt;/web-app&gt;</pre>
<p><strong>logback-APPLICATION_NAME.xml</strong></p>
<pre class="xml">
<div id="_mcePaste">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</div>
<div id="_mcePaste">&lt;configuration&gt;</div>
<div id="_mcePaste">&lt;contextName&gt;<strong>APPLICATION_NAME</strong>&lt;/contextName&gt;</div>
<div id="_mcePaste">&lt;jmxConfigurator contextName="<strong>APPLICATION_NAME</strong>" /&gt;</div>
<div id="_mcePaste">&lt;appender name="<strong>APPLICATION_NAME</strong>"&gt;</div>
<div id="_mcePaste">&lt;File&gt;log/<strong>APPLICATION_NAME</strong>.log&lt;/File&gt;</div>
<div id="_mcePaste">&lt;Append&gt;false&lt;/Append&gt;</div>
<div id="_mcePaste">&lt;Encoding&gt;UTF-8&lt;/Encoding&gt;</div>
<div id="_mcePaste">&lt;BufferedIO&gt;false&lt;/BufferedIO&gt;</div>
<div id="_mcePaste">&lt;ImmediateFlush&gt;true&lt;/ImmediateFlush&gt;</div>
<div id="_mcePaste">&lt;layout&gt;</div>
<div id="_mcePaste">&lt;Pattern&gt;</div>
<div id="_mcePaste">%date [%thread] %-5level %logger{35} - %msg%n</div>
<div id="_mcePaste">&lt;/Pattern&gt;</div>
<div id="_mcePaste">&lt;/layout&gt;</div>
<div id="_mcePaste">&lt;/appender&gt;</div>
<div id="_mcePaste">&lt;root&gt;</div>
<div id="_mcePaste">&lt;appender-ref ref="<strong>APPLICATION_NAME</strong>" /&gt;</div>
<div id="_mcePaste">&lt;/root&gt;</div>
<div id="_mcePaste">&lt;logger name="<strong>PACKAGE</strong>"&gt;</div>
<div id="_mcePaste">&lt;level value="DEBUG" /&gt;</div>
<div id="_mcePaste">&lt;/logger&gt;</div>
<div id="_mcePaste">&lt;/configuration&gt;</div>
</pre>
<img src="http://feeds.feedburner.com/~r/WorkT6d/~4/IKlHCvYpQgw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://work.t6d.com/2009/12/red5-application-directory-structure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://work.t6d.com/2009/12/red5-application-directory-structure/</feedburner:origLink></item>
		<item>
		<title>Monitoring Bandwidth Usage with DD-WRT, Chillispot and FreeRadius</title>
		<link>http://feedproxy.google.com/~r/WorkT6d/~3/skxpWHHzKaU/</link>
		<comments>http://work.t6d.com/2009/12/monitoring-bandwidth-usage-with-dd-wrt-chillispot-and-freeradius/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 12:48:35 +0000</pubDate>
		<dc:creator>theo.denovan</dc:creator>
				<category><![CDATA[Server Configuration]]></category>
		<category><![CDATA[bandwidth]]></category>
		<category><![CDATA[chillispot]]></category>
		<category><![CDATA[daloradius]]></category>
		<category><![CDATA[ddwrt]]></category>
		<category><![CDATA[freeradius]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[wifi]]></category>

		<guid isPermaLink="false">http://work.t6d.com/?p=11</guid>
		<description><![CDATA[Recording bandwidth used by wifi clients sounds like a relatively simple task. $90 and far too many hours later I can assure you that for a person without much network experience it can be deceptively challenging.

This article is a quick guide describing how to configure DD-WRT, Chillispot and Freeradius for the specific use case of mac-address freeradius authentication and accounting. It also briefly touches on web-based admin solutions. A radius server handles authorisation and accounting (ie: counting of bandwidth used by wifi users). The Chillispot instance within DD-WRT funnels all wifi clients through this authorisation and periodically, (if so configured), dispatches accounting packets to the radius server]]></description>
			<content:encoded><![CDATA[<p>Recording bandwidth used by wifi clients sounds like a relatively simple task. $90 and far too many hours later I can assure you that for a person without much network experience it can be deceptively challenging.</p>
<p>This article is a quick guide describing how to configure DD-WRT, Chillispot and Freeradius for the specific use case of mac-address freeradius authentication and accounting. It also briefly touches on web-based admin solutions. A radius server handles authorisation and accounting (ie: counting of bandwidth used by wifi users). The Chillispot instance within DD-WRT funnels all wifi clients through this authorisation and periodically, (if so configured), dispatches accounting packets to the radius server.</p>
<p><strong>The Purpose</strong></p>
<p>The purpose of my configuration is to restrict access to my wireless network and monitor the bandwidth consumed by authorised users. Consequently, the setup which this article describes is <strong>not</strong> orientated towards a hotspot, as all authentication is performed based on mac addresses.</p>
<p>The main focus of this post is on configuring a Chillispot instance within a router running DD-WRT. For information about setting up free radius check out the following sites:</p>
<ul>
<li>http://wiki.freeradius.org/</li>
<li>http://www.howtoforge.com/authentication-authorization-and-accounting-with-freeradius-and-mysql-backend-and-webbased-management-with-daloradius</li>
</ul>
<p><strong>The Pieces</strong></p>
<ol>
<li>A router running DD-WRT</li>
<li>A configured free radius server</li>
</ol>
<p><strong>DD-WRT and Chillispot</strong></p>
<p>Full versions of DD-WRT come bundled with Chillispot, however getting Chillispot and free radius using mac-address authorisation to play nicely can be a little bit tricky. The main thing to remember is that DHCP servers within DD-WRT should be disabled as Chillispot contains its own DHCP server. It may be possible to get the various instances to exist harmoniously but the simplest solution for me was just disable them. To configure DD-WRT:</p>
<ol>
<li>Disable the DHCP server under setup, untick all checkboxes relating to DNSMasq.</li>
<li>Disable DNSMasq under the Services tab.</li>
<li>If you haven&#8217;t already, you should probably set some form of security for your wireless network.</li>
<li>Enable Chillispot under Services-&gt;Hotspot.</li>
</ol>
<p><strong>Configuring Chillispot</strong></p>
<p>The following image details my Chillispot setup:</p>
<div id="attachment_12" class="wp-caption aligncenter" style="width: 487px"><img class="size-full wp-image-12" title="Chillispot Configuration" src="http://work.t6d.com/wp-content/uploads/2009/12/Screen-shot-2009-12-01-at-10.12.16-PM.png" alt="Chillispot configuration in DDWRT" width="477" height="391" /><p class="wp-caption-text">Chillispot configuration in DDWRT</p></div>
<p>Most of the parameters are relatively self explanatory. More information can be found here: http://www.dd-wrt.com/wiki/index.php/Chillispot. The parameters of note are:</p>
<ul>
<li>The UAM secret is irrelevant for mac-address based authentication. (It is passed by Chillispot to a login script. Mac-based authentication does not require a login script).</li>
<li>The shared key should correspond with the secret set in your freeradius client configuration (located at /etc/raddb/clients.conf for me).</li>
<li>UAM allowed is a comma-delimited list of sites unauthenticated users can access.</li>
<li>Setting MACAuth to true causes Chillispot to make an authentication request against free radius when a user joins the wireless network, where User =%MAC_ADDRESS%, Pass = Password. %MAC_ADDRESS% is replaced with the user&#8217;s mac address, Pass, by default, is literally the string &#8220;Password&#8221;.</li>
<li>The additional Chillispot option of macpasswd changes the default password used for mac-address authentication, in my case to &#8220;sushi&#8221;.</li>
</ul>
<p><strong>Configuring a Radius user account</strong></p>
<p>Rad-check attributes:</p>
<ul>
<li>username = %MAC_ADDRESS%</li>
<li>User-Password := &#8220;Password&#8221; (or the value set by macpasswd)</li>
</ul>
<p>Rad-reply (accounting) attributes:</p>
<ul>
<li>Acct-Interim-Interval := 300</li>
<li>Idle-Timeout := 600</li>
</ul>
<p>The above attributes cause Chillispot to send updates about bandwidth usage to the radius server every 5 minutes. If a user has been idle for 10 minutes their session is terminated.</p>
<p>That&#8217;s all you need! You should have a (mostly) functioning setup at this point in time, the rest of the article is focused on web-based admin tools.</p>
<p><strong>Web-based Administration</strong></p>
<p>Free Radius:</p>
<ul>
<li>Dalo Radius allows you to create user accounts from a web-based interface for your radius server. It requires that your radius server is configured via MySQL. http://daloradius.com</li>
</ul>
<img src="http://feeds.feedburner.com/~r/WorkT6d/~4/skxpWHHzKaU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://work.t6d.com/2009/12/monitoring-bandwidth-usage-with-dd-wrt-chillispot-and-freeradius/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://work.t6d.com/2009/12/monitoring-bandwidth-usage-with-dd-wrt-chillispot-and-freeradius/</feedburner:origLink></item>
	</channel>
</rss>
