Table of Contents

Router Hacking

(or, how to make your USB-enabled router (mine is ASUS) into a web-server on the free and cheap)

	//Set up flash drive correctly onto /opt directory. Get ipkg somehow
 
	ipkg install coreutils 	//gives you things like chown
	ipkg install php-fcgi nginx php-gd ...etc
	ipkg files nginx 	//shows you where key nginx files are located
 
	location / {
            root   html;
            index  index.html index.htm index.php doku.php;
        }
 
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
            root           html;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            #fastcgi_param  SCRIPT_FILENAME  /opt/share/nginx/html/$fastcgi_script_name;
	    fastcgi_param  SCRIPT_FILENAME   $document_root$fastcgi_script_name;
            include     fastcgi_params;
        }
	#prevents external access to dokuwiki data files that aren't php
	location ~ /(data|conf|bin|inc)/ {
	    deny all;
	}		
 
 
iptables -t filter -I INPUT -p tcp —dport 80 -j ACCEPT

Crashing

To Do

Web Hosting Ideal Programs

Wireless Router in Linux

3/21/11

2/28/11

2/24/11

//PHP's UID and GID seem to be 33 (www-data) <http://www.dokuwiki.org/install:permissions>
nhergert@Lazarus:~$ sudo chown -R nhergert:www-data /home/nhergert/ServerBackup/ 
nhergert@Lazarus:~$ sudo chmod -R 775 /home/nhergert/ServerBackup/

2/14/11

2/7/11

2/6/11

2/4/11

2/3/11

Administration

Re: HOWTO: Setup Ubuntu as a wireless router Some suggestions:

Instead of manipulating iptables directly, consider using shorewall (http://shorewall.net) it makes configuring iptables much easier and also enables creating “trusted” and “untrusted” zones pretty easily. Also doing NAT/masquerade and port forwarding is also easy.

Second, instead of installing a dhcp server, consider using the dnsmasq package. It's both a DHCP server and a DNS cache and works rather nicely on my Ubuntu software router (I notice you put it in the future plans, though).

For easy web administration, I use webmin (http://webmin.com). It's not in the Ubuntu repository but you can find a binary package on their web page. You can configure a lot of settings like that, including shorewall.

BeagleBoard

Ideal Setup/Usage

*Light* Blog/CMS Software

Uses flat files, not MySQL

Firmware

Familiar Routers

Adding Functionality

like lighttpd, php, etc

Extended Hacking

Adding USB Audio output