Monday, October 11, 2010

Automated reboot of Netgear FVG318

I'm having trouble with some Netgear FVG318 wireless VPN routers. They can't seem to release their DHCP leases without a reboot, and there's no way to schedule a reboot on them.

Other than that, these are really great, reasonably priced little devices.

Hopefully my contacts with Netgear Support will yield a fix so that they don't run out of DHCP leases *for no reason*, but until then I need a workaround.

So, I used some wget magic to script logging in, saving the necessary cookies, and executing the reboot function.

Just replace your.fvg318.ip with your FVG318's IP, replace youradminpassword with your admin password. I doubt the line breaks will come out proper in blogspot, so I'll tell you that there is only one line of command between each comment line -- if it line wraps on here, you will need to make sure your copy that you run does not wrap those lines.

Then just set this up in a cron job to run every night at midnight and voila! No more unhappy uesrs, no more manual reboots.


# Load login page
/usr/bin/wget --no-check-certificate -q -O - --save-cookies /tmp/netgear-cookies.txt --keep-session-cookies 'https://your.fvg318.ip/' > /dev/null

# Log in
/usr/bin/wget --no-check-certificate -q -O - --save-cookies /tmp/netgear-cookies.txt --load-cookies /tmp/netgear-cookies.txt --keep-session-cookies --referer='https://your.fvg318.ip/platform.cgi' --post-data='web0x120010=admin&web0x120011=youradminpassword&umi.loginAuth=Login' 'https://your.fvg318.ip/platform.cgi' > /dev/null

# Reboot
/usr/bin/wget --no-check-certificate -q -O - --save-cookies /tmp/netgear-cookies.txt --load-cookies /tmp/netgear-cookies.txt --keep-session-cookies --referer='https://your.fvg318.ip/diagnostics.htm' --post-data='umi.restartWrap.x=69&umi.restartWrap.y=14' 'https://your.fvg318.ip/platform.cgi' > /dev/null


solicgroup said...


One of mine freezes randomly:
Wi-Fi emits no signal and access to the administration interface is no longer possible

I own 4, and is the only connection that is configured PPPoE, watch this...

Thanks again for your script, and if anyone can make a Windows version, others might be interrested I think

Robert Paul said...

Thanks for providing such a nice blog about Netgear, it really helpful to us and get lots of information from it. For any technical issue resolution contact at 0800-090-3220 or visit Netgear Helpline Number UK

manishkumar said...

This is such a great resource that you are providing and you give it away for free. I love seeing the blog that understands the value. I'm glad to have found this post as its such an interesting one! I am always on the lookout for quality posts and articles so I suppose I'm lucky to have found this! I hope you will be adding more in the future… for any kind of Netgear support, you can call us 0800-090-3240 or visit Netgear phone number UK.