As the WRT54G seems to loss wireless connection over time then I have this script on couple of WRT54G boxes running in the client mode. With Sveasoft firmwares just paste following script to your WRT console or add relevant portions to the rc_startup variable: #8<-----CUT-HERE-------------------------------------- nvram set rc_startup="echo '#!/bin/ash # # If the GW is not reachable for 10 times then reboot the box. # Note: The script can be enabled by setting ping_watchdog=1. AAA=1 while [ \$AAA -eq 1 ] do GW=\$(nvram get wan_gateway) sleep 60 while [ \$? -eq 0 ] do sleep 30 ping -c 10 \$GW done Check=\$(nvram get ping_watchdog) if [ \"\$Check\" = \"1\" ] then reboot fi done' > /tmp/uurer /bin/chmod +x /tmp/uurer /tmp/uurer &" nvram commit #8<-----CUT-HERE-------------------------------------- With OpenWRT firmwares you have to add following lines to /etc/init.d/S45firewall or to some other startup file: #8<-----CUT-HERE-------------------------------------- echo '#!/bin/ash # # If the GW is not reachable for 10 times then reboot the box. # Note: The script can be enabled by setting ping_watchdog=1. AAA=1 while [ $AAA -eq 1 ] do GW=$(nvram get wan_gateway) sleep 60 while [ $? -eq 0 ] do sleep 30 ping -c 10 $GW done Check=$(nvram get ping_watchdog) if [ "$Check" = "1" ] then reboot fi done' > /tmp/uurer chmod +x /tmp/uurer /tmp/uurer & #8<-----CUT-HERE-------------------------------------- To enable the script: #8<-----CUT-HERE-------------------------------------- nvram set ping_watchdog=1 nvram commit #8<-----CUT-HERE-------------------------------------- To disable the script (at run time): #8<-----CUT-HERE-------------------------------------- nvram set ping_watchdog=0 nvram commit #8<-----CUT-HERE-------------------------------------- Note: To activate these changes you have to reboot the WRT.