LaFonera Software Heartbeat

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 03:48, 13 February 2007 (edit)
Wildblue (Talk | contribs)

← Previous diff
Revision as of 03:03, 19 February 2007 (edit) (undo)
Wildblue (Talk | contribs)

Next diff →
Line 2: Line 2:
== The Fon heartbeat == == The Fon heartbeat ==
-<b>This is the way to simulate the fon heartbeat, so that the LaFonera with dd-wrt is shown as active on the fon maps.</b>+'''This is the way to simulate the fon heartbeat, so that the LaFonera 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) 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) :+At first you have to register your LaFonera on www.fon.com
-# Open your web-based configuration on your DD-WRT-Fonera (e.g. 192.168.1.1)+If you have done this successfully there are two ways you can enable it on maps.fon.com.
-# Go to the "Administration" section, then to "Commands" (German: "Diagnose")+
-# paste the follwing commands and select "Save Startup" (German: "Startup speichern")+
-<pre>+== Fast and simple ==
-#!/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 & ) &+
-</pre>+
-4. Now you can reboot your router <b>or</b> simply past the commands again and select "Run Commands" (German: "Kommandos ausführen")+This is the most easy way (This guide is also available on http://www.wildblue.de/fonera/heartbeat/howto).
 +It is for simply putting your LaFonera on maps.fon.com without any need to set up your own WEBserver / FTPserver.
 +''' made by wildblue!'''
-Thats` is. Your Router is now active on maps.fon.com+'''Actual Version: 2.0.3'''
-'''* Keep in mind that it can take some time before your router gets active on the maps, it doesnt update immediately as what I have noticed. Be sure to also clean your web browser cache in between your visits at the maps.'''+Feel free to ask me for an update of the code.
 + 
 + 
 +# Open the web-based configuration on your DD-WRT-Fonera (e.g. 192.168.1.1)
 +# Go to the "Administration" section, then to "Commands" (German: "Diagnose")
 +# paste the follwing commands and select "Save Startup" (German: "Startup speichern")
-This works for execution every hour. Perfectly! 
<pre> <pre>
#!/bin/sh #!/bin/sh
Line 49: Line 41:
( /tmp/simthefon/simthefon cron >/tmp/simthefon/simthefon.log & ) &' >> /tmp/simthefon/heartbeat ( /tmp/simthefon/simthefon cron >/tmp/simthefon/simthefon.log & ) &' >> /tmp/simthefon/heartbeat
-echo '0 * * * * root /tmp/simthefon/simthefon cron >/tmp/simthefon/simthefon.log' >> /tmp/cron.d/heartbeat+echo 'SHELL=/bin/sh
 +PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
 +HOME=/tmp/root
 + 
 +*/5 * * * * root /tmp/simthefon/simthefon cron >/tmp/simthefon/simthefon.log' >> /tmp/cron.d/heartbeat
chmod a+x /tmp/simthefon/heartbeat chmod a+x /tmp/simthefon/heartbeat
/tmp/simthefon/heartbeat /tmp/simthefon/heartbeat
-stopservice cron && startservice cron+stopservice cron && startservice cron</pre>
-</pre>+
-===Security Warning:===+4. Now you can reboot your router '''or''' simply past the commands again and select "Run Commands" (German: "Kommandos ausführen")
-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!+
-Maybe in the near future this script will be included in the DD-WRT source. All you can read here in this wiki are howto-solutions and not final!.+
 +Thats` it. Your LaFonera is now active on maps.fon.com
-Second, more difficult way by Krikkit (I don't now why he made it that difficult, even if he changed the original script):+'''* Keep in mind that it can take some time before your router gets active on the maps, it doesn't update immediately because FON is updating their maps not every minute.'''
-1. download my script from http://www.krikkit.net/download/simthefon/simthefon.sh (thanks to futejia http://futejia.blogspot.com/ for his script)+Also please note, that i will change the script, if nessesary, for the correct execution on your device.
-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 )+== more difficult ... the advanced way ==
 +'''use your own WEBserver / FTPserver'''
-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...+The method shown above is the simpliest way to activate your LaFonera on maps.fon.com.
 +If you are a little more advanced in setting up a webserver or if your workstation is running 24/7 then the second way might be interesting for you.
-5. find out your MAC-addresses and change them in the file simthefon.sh+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 don't think this could happen because my webserver is no dynDNS device, its a web-hosted server.
 +If you are a little paranoic or just want to test your skills, feel free to try the second solution:
-<pre>+1. download the script from http://www.wildblue.de/fonera/heartbeat/simthefon
-WLMAC+
-ifconfig ath0|grep HWaddr|sed -e "s/^.*HWaddr //" |sed -e "s/ //g"+
-MAC+2. download the fon key from http://www.wildblue.de/fonera/heartbeat/key
-ifconfig eth0|grep HWaddr|sed -e "s/^.*HWaddr //" |sed -e "s/ //g"+ 
-</pre>+3. download known_hosts file from http://www.wildblue.de/fonera/heartbeat/known_hosts
 + 
 +4. copy the files "simthefon, key, known_hosts" on your local WEBserver / FTPserver or any other location where you can download it with wget on your LaFonera afterwards...
6. paste the text below into Administration --> Commands --> Commands input field and click "Save startup" 6. paste the text below into Administration --> Commands --> Commands input field and click "Save startup"
-startup script: 
<pre> <pre>
#!/bin/sh #!/bin/sh
Line 105: Line 100:
your hotspot should now be ACTIVE on http://maps.fon.com your hotspot should now be ACTIVE on http://maps.fon.com
 +* In the near future maybe this script could be included in the DD-WRT source (depends on BrainSlayer)
* Here is a Link to another Forum where the heartbeat-function was discussed earlier [http://boards.fon.com/viewtopic.php?p=7517#7517 Heartbeat for the LaFonera] * Here is a Link to another Forum where the heartbeat-function was discussed earlier [http://boards.fon.com/viewtopic.php?p=7517#7517 Heartbeat for the LaFonera]

Revision as of 03:03, 19 February 2007

You are here: DD-WRT wiki mainpage / LaFonera / Software / Heartbeat

The Fon heartbeat

This is the way to simulate the fon heartbeat, so that the LaFonera 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)


At first you have to register your LaFonera on www.fon.com

If you have done this successfully there are two ways you can enable it on maps.fon.com.

Fast and simple

This is the most easy way (This guide is also available on http://www.wildblue.de/fonera/heartbeat/howto). It is for simply putting your LaFonera on maps.fon.com without any need to set up your own WEBserver / FTPserver.

made by wildblue!

Actual Version: 2.0.3

Feel free to ask me for an update of the code.


  1. Open the 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
mkdir /tmp/simthefon

echo '#!/bin/sh
sleep 60
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 cron >/tmp/simthefon/simthefon.log & ) &' >> /tmp/simthefon/heartbeat

echo 'SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
HOME=/tmp/root

*/5 * * * * root /tmp/simthefon/simthefon cron >/tmp/simthefon/simthefon.log' >> /tmp/cron.d/heartbeat

chmod a+x /tmp/simthefon/heartbeat
/tmp/simthefon/heartbeat

stopservice cron && startservice cron

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


Thats` it. Your LaFonera is now active on maps.fon.com

* Keep in mind that it can take some time before your router gets active on the maps, it doesn't update immediately because FON is updating their maps not every minute.

Also please note, that i will change the script, if nessesary, for the correct execution on your device.


more difficult ... the advanced way

use your own WEBserver / FTPserver

The method shown above is the simpliest way to activate your LaFonera on maps.fon.com. If you are a little more advanced in setting up a webserver or if your workstation is running 24/7 then the second way might be interesting for you.

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 don't think this could happen because my webserver is no dynDNS device, its a web-hosted server. If you are a little paranoic or just want to test your skills, feel free to try the second solution:

1. download the script from http://www.wildblue.de/fonera/heartbeat/simthefon

2. download the fon key from http://www.wildblue.de/fonera/heartbeat/key

3. download known_hosts file from http://www.wildblue.de/fonera/heartbeat/known_hosts

4. copy the files "simthefon, key, known_hosts" on your local WEBserver / FTPserver or any other location where you can download it with wget on your LaFonera afterwards...

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

#!/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 LaFonera...

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

  • In the near future maybe this script could be included in the DD-WRT source (depends on BrainSlayer)