{"id":211,"date":"2010-02-22T13:57:35","date_gmt":"2010-02-22T17:57:35","guid":{"rendered":"http:\/\/www.braindeadprojects.com\/blog\/?p=211"},"modified":"2010-04-11T16:56:42","modified_gmt":"2010-04-11T20:56:42","slug":"finally-saying-no-to-nocatsplash","status":"publish","type":"post","link":"http:\/\/www.braindeadprojects.com\/blog\/what\/finally-saying-no-to-nocatsplash\/","title":{"rendered":"Finally Saying No to NoCatSplash"},"content":{"rendered":"<p><a href=\"http:\/\/www.braindeadprojects.com\/blog\/wp-content\/logo-nocat.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-226\" title=\"logo-nocat\" src=\"http:\/\/www.braindeadprojects.com\/blog\/wp-content\/logo-nocat.png\" alt=\"\" width=\"144\" height=\"144\" \/><\/a><\/p>\n<p>For the last 6 months or so, I&#8217;ve been running a free wireless access point for my neighborhood. In an effort to get my local community to know each other (and local goings-on), I&#8217;ve back-ended the system using the <a href=\"http:\/\/elgg.org\/\" target=\"_blank\">elgg<\/a> social networking platform.<\/p>\n<p>To use the free wifi, you have to register on the social site.<\/p>\n<figure id=\"attachment_279\" aria-describedby=\"caption-attachment-279\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.braindeadprojects.com\/blog\/wp-content\/midtownwifi.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-279\" title=\"midtownwifi\" src=\"http:\/\/www.braindeadprojects.com\/blog\/wp-content\/midtownwifi-300x228.png\" alt=\"\" width=\"300\" height=\"228\" srcset=\"http:\/\/www.braindeadprojects.com\/blog\/wp-content\/midtownwifi-300x228.png 300w, http:\/\/www.braindeadprojects.com\/blog\/wp-content\/midtownwifi-1024x780.png 1024w, http:\/\/www.braindeadprojects.com\/blog\/wp-content\/midtownwifi.png 1280w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-279\" class=\"wp-caption-text\">The Captive Portal<\/figcaption><\/figure>\n<p>Uptime however has been a major pain &#8211; for quite some time <a href=\"http:\/\/nocat.net\">NoCatSplash<\/a> has been broken in <a href=\"http:\/\/dd-wrt.com\/site\/index\">DD-WRT<\/a>. Ever since version 24 (at the very least), it&#8217;s been grouchy &#8211; all of the sudden not working and requiring a reboot (or possibly clearing and resetting the iptables targets and restarting splashd)\u00a0 to fix. The wiki documents a few <a href=\"http:\/\/www.dd-wrt.com\/wiki\/index.php\/NoCatSplash#Work-Around\" target=\"_blank\">workarounds<\/a>, but I&#8217;ve gotten tired of the overall bugs.<\/p>\n<p>Initially I planned on simply fixing it, but after a little bit of thought,\u00a0 I decided to give <a href=\"http:\/\/openwrt.org\" target=\"_blank\">OpenWRT<\/a> another look. I&#8217;m sure I could have gotten away with using the mini or micro versions of DD-WRT and adding to it, but last time I used OpenWRT&#8217;s build environment I was really impressed &#8211; so I spent this weekend working with it again.<\/p>\n<p>Building your own image is simple &#8211; using the <a href=\"http:\/\/downloads.openwrt.org\/kamikaze\/8.09.2\/brcm-2.4\/OpenWrt-ImageBuilder-brcm-2.4-for-Linux-i686.tar.bz2\" target=\"_blank\">ImageBuilder<\/a> system (I&#8217;m working with WRT-54G&#8217;s)\u00a0 simply &#8220;make image&#8221; setting the target <strong>PROFILE<\/strong> and <strong>PACKAGES<\/strong> via environment variables. This method uses existing binary packages to build a .bin or .trx file for easy installation (via the web interface or mtd command). &#8220;<em>make info<\/em>&#8221; will give you a long list of profiles, and packages that are readily available are contained in the packages subdirectory.<\/p>\n<p>Recompiling packages is extremely easy &#8211; download the SDK:<\/p>\n<blockquote><p>mkdir ~\/devel &amp;&amp; cd ~\/devel<\/p>\n<p>wget http:\/\/downloads.openwrt.org\/kamikaze\/8.09.2\/brcm-2.4\/OpenWrt-SDK-brcm-2.4-for-Linux-i686.tar.bz2<\/p>\n<p>tar xjvpf OpenWrt-SDK-brcm-2.4-for-Linux-i686.tar.bz2<\/p><\/blockquote>\n<p>If the package already exists, check it out via subversion:<\/p>\n<blockquote><p>cd OpenWrt-SDK-brcm-2.4-for-Linux-i686<\/p>\n<p>svn export svn:\/\/svn.openwrt.org\/openwrt\/packages\/net\/&lt;packagename&gt;\u00a0 package\/&lt;packagename&gt;<\/p><\/blockquote>\n<p>And to compile simply execute:<\/p>\n<blockquote><p>make package\/&lt;packagename&gt;\/compile V=99<\/p><\/blockquote>\n<p>(On older versions it&#8217;s &#8220;make package\/&lt;packagename&gt;<strong>&#8211;<\/strong>compile V=99&#8243;)<\/p>\n<p>After hitting my head against the nocatsplash package&#8217;s failure to build correctly, I finally opted to look at <a href=\"http:\/\/kokoro.ucsd.edu\/nodogsplash\/\" target=\"_blank\">nodogsplash<\/a>. &#8220;Because it will at least build&#8221; is probably not the best way to choose captive portal software, but it&#8217;s mine.<\/p>\n<p>First thing requiring a fix is a bug that causes nodogsplash to crash when one sends a request to the auth-server without a &#8220;redir&#8221; GET variable being set &#8211; a bug evidenced by:<\/p>\n<blockquote><p>links &#8220;http:\/\/192.168.1.1:2050\/nodogsplash_auth\/?tok=fffffff&#8221;<\/p><\/blockquote>\n<p>Thankfully the crash is &#8220;gracefully&#8221; handled in safe.c&#8217;s safe_strdup()&#8230;. but it still causes the daemon to crash.<\/p>\n<p>So &#8211; a quick patch, as well as some added &#8220;features&#8221; (including a magic token) and I&#8217;m set. Patches to source can be added to package\/&lt;packagename&gt;\/patches. Upon make, patches in this directory are first applied.<\/p>\n<p>So instead of waiting around for a fix to NoCatSplash in DD-WRT, I&#8217;m moving on. So far NoDogSplash has proven effective &#8211; although I&#8217;m far from actually migrating to it (the old access point is still running for the time being). In the next few weeks I should have a custom web interface built, as well as <a href=\"www.pmacct.net\/ \" target=\"_blank\">pmacctd <\/a>configured (I am exporting Netflow version 9 data to a collector as a <a href=\"www.pmacct.net\/ \" target=\"_blank\">C.Y.A <\/a>measure), and bandwidth shaping properly enabled.<\/p>\n<p>Custom patches to NoDogSplash are forthcoming.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For the last 6 months or so, I&#8217;ve been running a free wireless access point for my neighborhood. In an effort to get my local community to know each other (and local goings-on), I&#8217;ve back-ended the system using the elgg social networking platform. To use the free wifi, you have to register on the social &hellip; <a href=\"http:\/\/www.braindeadprojects.com\/blog\/what\/finally-saying-no-to-nocatsplash\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Finally Saying No to NoCatSplash<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,1,18,13],"tags":[],"class_list":["post-211","post","type-post","status-publish","format-standard","hentry","category-rf","category-what","category-wireless","category-wrt-54g"],"_links":{"self":[{"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/posts\/211"}],"collection":[{"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/comments?post=211"}],"version-history":[{"count":14,"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/posts\/211\/revisions"}],"predecessor-version":[{"id":227,"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/posts\/211\/revisions\/227"}],"wp:attachment":[{"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/media?parent=211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/categories?post=211"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/tags?post=211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}