CoovaEWT on Open-Mesh
Here you will find a simple user interface for your Open-mesh.com routers.
Installing packages
Commands given below should be cut-and-pasted into a Terminal window that is logged into your router as root via SSH.
Cut and paste the list of packages below into your Terminal window. The following sets up a shell variable with the basic packages you need:
PKGS="\ libexpat_1.95.8-1_mips.ipk \ capd_0.1-1_mips.ipk \ capd-open-mesh_1.0-1_mips.ipk \ mini-httpd_1.19-1_mips.ipk \ mini-httpd-htpasswd_1.19-1_mips.ipk \ "
To run things under SSL, add the following packages to the list:
PKGS="$PKGS \ ssslutil_0.1-1_mips.ipk \ libwrap_7.6-1_mips.ipk \ stunnel_4.20-1_mips.ipk \ "
Download and install the packages:
cd /tmp/ for pkg in $PKGS; do wget http://ap.coova.org/kamikaze/mips/$pkg done rm /usr/lib/ipkg/lists/* ipkg install $PKGS
Once the above is complete, you have all the software you need. Complete the installation by initializing the CoovaEWT configuration file.
sh /etc/coova/scripts/uci-config.sh init
Web services and authentication
Setting a password for the cgi-bin (optional, but recommended):
htpasswd -c /www/cgi-bin/.htpasswd admin
Start the mini_httpd service:
/etc/init.d/mini_httpd enable /etc/init.d/mini_httpd start
If running SSL, also start the stunnel service:
/etc/init.d/stunnel enable /etc/init.d/stunnel start
We will also need iptables rules to allow web traffic. Below is for port 80:
iptables -I INPUT -p tcp --dport 80 -j ACCEPT iptables -I OUTPUT -p tcp --sport 80 -j ACCEPT
If running SSL, then the iptables rules will changed to port 443:
iptables -I INPUT -p tcp --dport 443 -j ACCEPT iptables -I OUTPUT -p tcp --sport 443 -j ACCEPT
For lack of a better way, lets put the iptables rules into an init script, the below shown for port 80 (cut and paste into your terminal window):
PORT=80
cat <<EOF > /etc/init.d/mini_httpd.firewall
#!/bin/sh /etc/rc.common
START=99
start() {
iptables -I INPUT -p tcp --dport $PORT -j ACCEPT
iptables -I OUTPUT -p tcp --sport $PORT -j ACCEPT
}
stop() {
iptables -D INPUT -p tcp --dport $PORT -j ACCEPT
iptables -D OUTPUT -p tcp --sport $PORT -j ACCEPT
}
EOF
chmod a+rx /etc/init.d/mini_httpd.firewall
/etc/init.d/mini_httpd.firewall enable
/etc/init.d/mini_httpd.firewall start
Selecting a user interface
CoovaFXThe best user interface to use comes with the CoovaFX Firefox add-on, which you can also use to authenticate at your Hotspot. Use the CoovaEWT application to login to your router - setting the username, password, and SSL settings appropriately.
Embedded on router
If you have space to kill on your router, you can also put the web application on-board. While GWT makes very compact code, it gets large with repetitive code to achieve cross-browser support. The package is about a megabyte in size.
ipkg install http://ap.coova.org/kamikaze/mips/cap-ui_1.0-1_mips.ipk
or (though really not platform specific)
ipkg install http://ap.coova.org/kamikaze/mipsel/cap-ui_1.0-1_mipsel.ipk
Once installed, access your router using:
- http:// your-router-ip /cgi-bin/ewt-cgi/Home.html
(or it may be https, depending on your SSL preference).
Making changes
Everything needed to drive the user interface is found under the /etc/coova/ directory. The user interface is primarily driven by the XML files in the directory. The subdirectory scripts/. contains the shell scripts to collect and process data and do to interactive (wizard) screens.
License
The CoovaEWT web application and capd binary packages are licensed as freeware (for now at least).
![[Main Page]](/wiki/skins/common/images/coova.gif)


