{"id":34,"date":"2007-09-22T18:52:33","date_gmt":"2007-09-22T22:52:33","guid":{"rendered":"http:\/\/timelordz.com\/blog\/wordpress\/?p=34"},"modified":"2007-09-22T19:04:09","modified_gmt":"2007-09-22T23:04:09","slug":"linux-on-a-home-router","status":"publish","type":"post","link":"https:\/\/www.timelordz.com\/blog\/2007\/09\/linux-on-a-home-router\/","title":{"rendered":"Linux on a home router"},"content":{"rendered":"<p>Taking my Cisco classes has been great, and I&#8217;ve certainly been learning a lot more about networking, routers, routing protocols, TCP\/IP, network design, WANs, VLANs and such. But a few weeks ago I came across this killer site for <a href=\"http:\/\/openwrt.org\/\" target=\"_blank\" title=\"OpenWRTSite\">OpenWRT<\/a> which allows you to install Linux onto Linksys and other routers which have enough memory and use supported chip sets.  I love Linux and knew immediately knew I would have to do this.<\/p>\n<p>My first attempt on my own Belkin bricked it -it didn&#8217;t have enough memory (knew it but couldn&#8217;t resist trying). Getting the correct original firmware back on it was a nightmare &#8211; THANKS BELKIN for putting about a dozen incorrect firmwares out there and utterly hiding the correct one for this version. Appreciate it.<\/p>\n<p>But then a friend of mine had a Linksys WRT54G ver. 2.0 that he just replaced as it was giving him some trouble and he graciously donated it to science. Perfect!<\/p>\n<p>Now that I had supported hardware, I simply had to play with this. It sat several weeks as I was busy with class, but then last weekend I finally got to try it out.<\/p>\n<p><!--more--><\/p>\n<p>At first I installed the latest OpenWRT development version Kamikaze. This is ridiculously easy as I literally just used the Linksys firmware update and loaded up the OpenWRT image directly. I couldn&#8217;t believe it was that simple. It took all of about 3 minutes and included the web interface. Scoff.<\/p>\n<p>Then I decided to use the earlier, stable version White Russian as it had more features enabled for this model. Well, this was a bit trickier as the web interface update bombed and the router was dead. No problem, my Belikin experience stood me in familiar waters.<\/p>\n<p>Here is the fun way to do the flashing. You just tftp the image onto the router! OMG! I had no idea you could do that with a crappy home router! Sure, with a real router &#8211; of course. But a tiny little home router, I just would never have even considered that. You simply download the firmware, start a ping to the router and as soon as it boots it will start to initialize &#8211; at that point you blast the image to it using a tftp client and reboot the router. Here is a shot of that procedure:<\/p>\n<p><a href=\"http:\/\/timelordz.com\/blog\/wordpress\/wp-content\/uploads\/2007\/09\/tftping.jpg\" title=\"tftping.jpg\"><img decoding=\"async\" src=\"http:\/\/timelordz.com\/blog\/wordpress\/wp-content\/uploads\/2007\/09\/tftping.thumbnail.jpg\" alt=\"tftping.jpg\" \/><\/a><\/p>\n<p>(All images can be opened full size.)<\/p>\n<p>Of course it makes perfect sense &#8211; that&#8217;s all the web update does anyway &#8211; but still, who would have though you could just use a regular tftp client, etc. I assumed there was a proprietary protocol or authentication process. Nope.<\/p>\n<p>After that you can ssh into the router &#8211; same as though it were any regular Linux box. Note also it runs an httpd server, has other services with \/etc\/init.d scripts, ect. So friggin cool. . .<\/p>\n<p><a href=\"http:\/\/timelordz.com\/blog\/wordpress\/wp-content\/uploads\/2007\/09\/ssh2router.jpg\" title=\"ssh2router.jpg\"><img decoding=\"async\" src=\"http:\/\/timelordz.com\/blog\/wordpress\/wp-content\/uploads\/2007\/09\/ssh2router.thumbnail.jpg\" alt=\"ssh2router.jpg\" \/><\/a><\/p>\n<p>There is also a fully integrated web interface. And check out the options it gives you: full firewall rule creation, list of iptables, CPU \/ resource graphs, etc. You can even set up multiple VLANs, remote syslog, VPN, and MUCH more. Just slightly more sophisticated that the firmware home routers ship with.<\/p>\n<p><a href=\"http:\/\/timelordz.com\/blog\/wordpress\/wp-content\/uploads\/2007\/09\/cpugraph.jpg\" title=\"cpugraph.jpg\"><img decoding=\"async\" src=\"http:\/\/timelordz.com\/blog\/wordpress\/wp-content\/uploads\/2007\/09\/cpugraph.thumbnail.jpg\" alt=\"cpugraph.jpg\" \/>                <\/a><a href=\"http:\/\/timelordz.com\/blog\/wordpress\/wp-content\/uploads\/2007\/09\/firewall.jpg\" title=\"firewall.jpg\"><img decoding=\"async\" src=\"http:\/\/timelordz.com\/blog\/wordpress\/wp-content\/uploads\/2007\/09\/firewall.thumbnail.jpg\" alt=\"firewall.jpg\" \/>                    <\/a><a href=\"http:\/\/timelordz.com\/blog\/wordpress\/wp-content\/uploads\/2007\/09\/iptables.jpg\" title=\"iptables.jpg\"><img decoding=\"async\" src=\"http:\/\/timelordz.com\/blog\/wordpress\/wp-content\/uploads\/2007\/09\/iptables.thumbnail.jpg\" alt=\"iptables.jpg\" \/><\/a><\/p>\n<p>I especially liked this one: scan your neighbor SSIDs and retrieve the MAC address which makes links of them &#8211; click the link and it looks up the manufacturer for you:<\/p>\n<p><a href=\"http:\/\/timelordz.com\/blog\/wordpress\/wp-content\/uploads\/2007\/09\/neighbors.jpg\" title=\"neighbors.jpg\"><img decoding=\"async\" src=\"http:\/\/timelordz.com\/blog\/wordpress\/wp-content\/uploads\/2007\/09\/neighbors.thumbnail.jpg\" alt=\"neighbors.jpg\" \/><\/a><\/p>\n<p>And oh, there is also even a package management system so you can add and remove the modules you need to customize the router and its capabilities. It uses software repositories and resolves dependencies, etc. Wow.<\/p>\n<p><a href=\"http:\/\/timelordz.com\/blog\/wordpress\/wp-content\/uploads\/2007\/09\/packages.jpg\" title=\"packages.jpg\"><img decoding=\"async\" src=\"http:\/\/timelordz.com\/blog\/wordpress\/wp-content\/uploads\/2007\/09\/packages.thumbnail.jpg\" title=\"packages.jpg\" alt=\"packages.jpg\" \/><\/a><\/p>\n<p>Well, another uber geek project proving Linux is the most versatile operating system in the world &#8211; running on embedded devices, home systems and enterprise class servers. I just friggin <em>love <\/em>the idea of ssh&#8217;ing into the router and managing it through the shell, setting up iptable rules, modular customization, etc. Too cool.<\/p>\n<p>If you have a <a href=\"http:\/\/wiki.openwrt.org\/TableOfHardware\" title=\"Supported Routers\">supported<\/a> router your might want to check it out! There are complete install instructions, a wiki and forums there. If you have a supported router and can just use the Linksys upgrade firmware page, it is insanely easy. And if you brick it, use the tftp recovery procedures <a href=\"http:\/\/wiki.openwrt.org\/OpenWrtDocs\/Installing\/TFTP?action=show&amp;redirect=OpenWrtViaTftp\" title=\"tftp\" target=\"_blank\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Taking my Cisco classes has been great, and I&#8217;ve certainly been learning a lot more about networking, routers, routing protocols, TCP\/IP, network design, WANs, VLANs and such. But a few weeks ago I came across this killer site for OpenWRT which allows you to install Linux onto Linksys and other routers which have enough memory [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-34","post","type-post","status-publish","format-standard","hentry","category-it-adventures"],"_links":{"self":[{"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/posts\/34","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/comments?post=34"}],"version-history":[{"count":0,"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/posts\/34\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/media?parent=34"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/categories?post=34"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/tags?post=34"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}