LaFonera Software Heartbeat

From DD-WRT Wiki

Revision as of 19:25, 6 February 2007 by Krikkit (Talk | contribs)
Jump to: navigation, search

Back to La Fonera

The Fon heartbeat

This is the way to simulate the fon heartbeat, so that the fonera with dd-wrt is shown as active on the fon maps.

It is based on the work of freddy (http://fon.freddy.eu.org), futejia (http://futejia.blogspot.com) and krikkit (http://www.krikkit.net)

There are two ways you can enable your activity on the fon maps.

The easy way by wildblue (This guide is also available on http://www.wildblue.de/fonera/heartbeat/howto) :

  1. Open your web-based configuration on your DD-WRT-Fonera (e.g. 192.168.1.1)
  2. Go to the "Administration" section, then to "Commands" (German: "Diagnose")
  3. paste the follwing commands and select "Save Startup" (German: "Startup speichern")
#!/bin/sh
sleep 60
mkdir /tmp/simthefon
cd /tmp/simthefon
/usr/bin/wget http://www.wildblue.de/fonera/heartbeat/key
/usr/bin/wget http://www.wildblue.de/fonera/heartbeat/simthefon
/usr/bin/wget http://www.wildblue.de/fonera/heartbeat/known_hosts
cat /tmp/simthefon/known_hosts >> /tmp/root/.ssh/known_hosts
chmod a+x /tmp/simthefon/simthefon
( /tmp/simthefon/simthefon >/tmp/simthefon/simthefon.log & ) &

4. Now you can reboot your router or simply past the commands again and select "Run Commands" (German: "Kommandos ausführen")


Thats` is. Your Router is now active on maps.fon.com


Security Warning:

The method shown above is dangerous. If somebody could make the router think that he (the attacker) is www.wildblue.de or if the www.wildblue.de server gets compromised, he is able to do *anything* as root on your router! I recommend not to choose that approach. Copy the scripts to a local ftp/web server instead!



Second, more difficult way by Krikkit (I don't now why he made it that difficult, even if he changed the original script):

1. download my script from http://www.krikkit.net/download/simthefon/simthefon.sh (thanks to futejia http://futejia.blogspot.com/ for his script)

2. download the fon key (you can get the fon key from here: http://fon.freddy.eu.org/fonera/fon-0.7.0-rev4/etc/dropbear/key )

3. download known_hosts file ( http://fon.freddy.eu.org/fonera/fon-0.7.0-rev4/etc/dropbear/known_hosts )

4. save the script and the fon key and fon known_hosts on your local ftp server or any location where you can download it with wget afterwards...

5. find out your MAC-addresses and change them in the file simthefon.sh

WLMAC
ifconfig ath0|grep HWaddr|sed -e "s/^.*HWaddr //" |sed -e "s/ //g"

MAC
ifconfig eth0|grep HWaddr|sed -e "s/^.*HWaddr //" |sed -e "s/ //g"

6. paste the text below into Administration --> Commands --> Commands input field and click "Save startup"

startup script:

#!/bin/sh
sleep 60
mkdir /tmp/simthefon
cd /tmp/simthefon
/usr/bin/wget ftp://192.168.1.2/simthefon/key
/usr/bin/wget ftp://192.168.1.2/simthefon/simthefon.sh
/usr/bin/wget ftp://192.168.1.2/simthefon/known_hosts
cat /tmp/simthefon/known_hosts >> /tmp/root/.ssh/known_hosts
chmod a+x /tmp/simthefon/simthefon.sh
( /tmp/simthefon/simthefon.sh >/tmp/simthefon/simthefon.log & ) &

do not forget to edit the wget commands, to fit your locations...

reboot your fonera...

your hotspot should now be ACTIVE on http://maps.fon.com