[Printable]
Share

No Cat Splash on openwrt

Posted: Tue 2nd August 2005 in Blog

To get captive portal working on openwrt you need to do the following:
Get White Russian. from openwrt.org

Set it up using the instructions on their site. Warning do turn boot wait on as per their instructions - they're not joking. Its a really good idea, without it I would have bricked my Linksys.

Wait a bit, reboot it as per install instructions, set you password, as per  openwrt.org.

picture of Piertopier's splash screen
PierToPier.net's (old) login screen

Ok now your ready for my bit.

type

ipkg update


then

ipkg install nocatsplash

this should download most of the appropriate bits.

Now you need to stop the default openwrt firewall rules from loading. They override the Captive Portal rules otherwise. To do this you need to remove the S from front of the script so its not run on boot:
type

mv /etc/init.d/S45firewall /etc/init.d/K45firewall

Now if you've got a normal Linksys wrt54g then you should find that the /etc/ nocat.conf will work fine. However you may want to edit it to reflect your settings. NoCat will figure out the appropriate settings its self for the interfaces, or it does on mine. If you've mucked around with its normal routing, bridging and similar functions then you may have to check the interfaces in /etc/nocat.conf. Also if you have a version 1 wrtg or another manufacturers access point (mine worked its a WRT54G v2.2>

There's a couple of fixes needed to get the actually package to work however, one thing you do need to do, the file /usr/lib/NoCatSplash/ initialize.fw, loads some iptables modules needed by nocat. Unfortunately its missing ipt_REDIRECT which is kind of important as its the bit you need to get redirected to the splash. You need to locate the line:

for module in ipt_TOS ipt_mac; do


and replace it with:

for module in ipt_TOS ipt_mac ipt_REDIRECT; do

 

You can test the function of no cat, by typing splashd at the prompt - this shouldn't give you any errors, and access the internet again you should be captive portaled by no cat splash and asked for a login!

The package doesn't start up on its own! So your going to need the init script. This appears to be missing from the ipkg here's one Dave from piertopier.net sent me, from another nocat package, pop it in /etc/init.d/ S60nocat and make it bootable with

chmod +x /etc/init.s/S60nocat

Start Up Script Code

#!/bin/sh # # start/stop splashd super server. case "$1" in
start)
echo -n "Starting NoCat splash server:"
echo -n " splashd" ;
/usr/sbin/splashd -D &
echo "."
;;
stop)
echo -n "Stopping NoCat splash server:"
echo -n " splashd" ;
killall splashd
echo "."
;;
restart)
echo -n "Restarting NoCat splash server:"
echo -n " splashd"
$0 stop
$0 start
echo "."
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
exit 0

Stability Warning

NoCat splash has some serious stability issues on OpenWRT. It falls over from time to time, no idea why, when it falls over it needs to be restarted. MeshAP seems to have a problem too. It uses a cronjob to restart it when it dies. I've not solved this problem, instead I switched to Chillispot instead. I assume using wget to retrieve the splash screen and running the startup script if it doesn't would work.

Making the Splash look Pretty

If you want to edit your splash page to make it fit your tastes then edit. / usr/share/NoCatSplash/htdocs/splash.html ours looks like this. Remember its got to render on a PDA - or if a nut like me's around lynx.......

Nocat Splash Compatibility Issues

We've stopped using NoCat on OpenWRT in favour of Chillispot, however we still use it (or NoCat auth?) on MeshAP, PSP's don't like it but can be tweaked with a special option see piertopier.net forums. Certain PDA's don't like it - might relate to windows update? New versions of Safari on a Mac don't like it either. In this case the only known solution is get Firefox.

[Printable]
Share

No Cat Splash on openwrt

Posted: Tue 2nd August 2005 in Blog

No Cat Splash on openwrt

To get captive portal working on openwrt you need to do the following:
Get White Russian. from
openwrt.org

Set it up using the instructions on their site. Warning do turn boot wait on as per their instructions - they're not joking. Its a really good idea, without it I would have bricked my Linksys.

Wait a bit, reboot it as per install instructions, set you password, as per  openwrt.org.

picture of Piertopier's splash screen
PierToPier.net's (old) login screen

Ok now your ready for my bit.

type

ipkg update


then

ipkg install nocatsplash

this should download most of the appropriate bits.

Now you need to stop the default openwrt firewall rules from loading. They override the Captive Portal rules otherwise. To do this you need to remove the S from front of the script so its not run on boot:
type

mv /etc/init.d/S45firewall /etc/init.d/K45firewall

Now if you've got a normal Linksys wrt54g then you should find that the /etc/ nocat.conf will work fine. However you may want to edit it to reflect your settings. NoCat will figure out the appropriate settings its self for the interfaces, or it does on mine. If you've mucked around with its normal routing, bridging and similar functions then you may have to check the interfaces in /etc/nocat.conf. Also if you have a version 1 wrtg or another manufacturers access point (mine worked its a WRT54G v2.2>

There's a couple of fixes needed to get the actually package to work however, one thing you do need to do, the file /usr/lib/NoCatSplash/ initialize.fw, loads some iptables modules needed by nocat. Unfortunately its missing ipt_REDIRECT which is kind of important as its the bit you need to get redirected to the splash. You need to locate the line:

for module in ipt_TOS ipt_mac; do


and replace it with:

for module in ipt_TOS ipt_mac ipt_REDIRECT; do

 

You can test the function of no cat, by typing splashd at the prompt - this shouldn't give you any errors, and access the internet again you should be captive portaled by no cat splash and asked for a login!

The package doesn't start up on its own! So your going to need the init script. This appears to be missing from the ipkg here's one Dave from piertopier.net sent me, from another nocat package, pop it in /etc/init.d/ S60nocat and make it bootable with

chmod +x /etc/init.s/S60nocat

Start Up Script Code

#!/bin/sh # # start/stop splashd super server. case "$1" in
start)
echo -n "Starting NoCat splash server:"
echo -n " splashd" ;
/usr/sbin/splashd -D &
echo "."
;;
stop)
echo -n "Stopping NoCat splash server:"
echo -n " splashd" ;
killall splashd
echo "."
;;
restart)
echo -n "Restarting NoCat splash server:"
echo -n " splashd"
$0 stop
$0 start
echo "."
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
exit 0

Stability Warning

NoCat splash has some serious stability issues on OpenWRT. It falls over from time to time, no idea why, when it falls over it needs to be restarted. MeshAP seems to have a problem too. It uses a cronjob to restart it when it dies. I've not solved this problem, instead I switched to Chillispot instead. I assume using wget to retrieve the splash screen and running the startup script if it doesn't would work.

Making the Splash look Pretty

If you want to edit your splash page to make it fit your tastes then edit. / usr/share/NoCatSplash/htdocs/splash.html ours looks like this. Remember its got to render on a PDA - or if a nut like me's around lynx.......

Nocat Splash Compatibility Issues

We've stopped using NoCat on OpenWRT in favour of Chillispot, however we still use it (or NoCat auth?) on MeshAP, PSP's don't like it but can be tweaked with a special option see piertopier.net forums. Certain PDA's don't like it - might relate to windows update? New versions of Safari on a Mac don't like it either. In this case the only known solution is get Firefox.