ddclient, Netgear FVS338 Router

How to get ddclient to work with the Netgear FVS338 VPN Router. Support for this router is not built into ddclient.
We needed to get the Netgear FVS338 router working with dynamic DNS at one site. We had used ddclient before, but, never with this router which is not on the list of supported routers. So, we had to find a way to make it work. Yes, you can always simply use the web to get your current IP address, but, why make needless calls through the router when the reality is, the IP might change once or twice a year. Overkill, and wasteful.

So, we needed to find a way to obtain the public IP address from the router itself. ddclient allows commands to be run, so, it was more a matter of how to get the address from this router. It did not seem to have the ability to do so via HTTP without scripting a login, etc. Too much work, but, the router does have telnet as well, which is easy to script. So, we went that way. In short, the key one line to add for this router to ddclient.conf that seems to work is:

use=cmd, cmd='(echo guest; sleep 2; echo password; sleep 2; echo "/netConf/wan/wanSetup/status wanId 0"; sleep 2; echo "exit" ) | telnet | grep DHCP | cut -d " " -f 7'

guest is the guest username (and the default as well), password is the default guest password (and also the default), is the local IP address of the router. So, change those as you see fit. Voila, no needless network WAN traffic, run it every minute, who cares, It’s fast. So, the customer is able to keep their dynamic DNS updated every minute, efficiently, and easily. ddclient is a great, flexible little tool for dynamic dns.
blog comments powered by Disqus

© 2017 by 5 Diamond IT Consulting, Contact Us
Privacy Policy | Site Map

Open source software we work with includes Apache HTTP server, cURL, Fedex Shipping for osCommerce and Zen Cart, MySQL, Mariadb, osCommerce shopping cart, PHP, and Zen Cart shopping cart. We offer services such as shell scripting, HP3000 consulting. Tools we recommend for small business include KALL8 toll free phone service, VOIPo VOIP phone service