OpenWrt Forum Archive

Topic: Modify Official Netgear firmware

The content of this topic has been archived on 3 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I have a DGND3700 which has a dynamic update option for dyndns but I would like to add an opendns updater and was wondering if this was possible, I dont want to use the live parental controls that come with this router as they do not work properly.

I can access the router via telnet and get the below but I am very new to linux:

BusyBox v1.00 (2011.09.17-03:36+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ # ls
bin      dev      lib      mnt      proc     sys      usr      www
data     etc      linuxrc  opt      sbin     tmp      var

Would it be possible to add a script that can run on router start up that will update opendns, I found some sites below with info but have no idea how to implement on this router, they mention curl? which I am not sure is an option:

http://www.opendns.com/support/article/101

http://matthew.mceachen.us/blog/opendns … u-679.html

http://bassmadrigal.com/blog/2008/08/op … ough-linux

Please help.

Would some how getting the router to run this work:

"It's possible to update the IP using an HTTP request. I use the following command in a cron job:

wget -O - -q --http-user=USERNAME --http-passwd=PASSWD https://updates.opendns.com/nic/update"

telnet in again and run that command in the shell. see how it goes (and if wget is available).

Thank you, it does indeed have wget but I get an error

wget: unrecognized option `--http-user=USERNAME

tried with just --user but the same, is this to do with the versionn of wget?

Most likely, yes. It might be a stripped down version, either manually or the busybox version. try wget --help to see what it supports and which version it is.

~ # wget --help
BusyBox v1.00 (2011.09.17-03:36+0000) multi-call binary

Usage: wget [-c|--continue] [-q|--quiet] [-O|--output-document file]
                [--header 'header: value'] [-Y|--proxy on/off] [-P DIR] url

wget retrieves files via HTTP or FTP

Options:
        -c      continue retrieval of aborted transfers
        -q      quiet mode - do not print
        -P      Set directory prefix to DIR
        -O      save to filename ('-' for stdout)
        -Y      use proxy ('on' or 'off')

~ #

I tried this "wget -O - https://bilbonvia:123456@updates.opendns.com/nic/upda
e?hostname=home"

but doesn't support https either. Tried to compile a new wget using instructiuons on internet but got:

/tmp/wget-1.5.3 # ./configure
loading cache ./config.cache
configuring for GNU Wget 1.5.3
checking host system type... mips-pc-linux-gnuoldld
checking whether make sets ${MAKE}... no
checking for a BSD compatible install... ./install-sh -c
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH
/tmp/wget-1.5.3 #

If I knew whetre the dyndns config was or how to browse maybe I could modify that?

I have downloaded the dgnd3700 sdk, looks like you can compile it failry easily.

Would it be possible to modify one of the source files with a opendns updater, how would I do it? Then compile?

If you want a "full" version of busybox there are precompiled static binaries available.
http://busybox.net/downloads/binaries/
Select mips or mipsel depending on which your router has. The DGND3300 and WNDR3700 are both mipsel so I'd think the DGND3700 would be as well. Upload the file to a USB stick then copy it to /tmp
chmod +755
then you can run from /tmp as below
./busybox-mipsel wget blabla-bla.com/files/to/get
Or just run it with no options to see what is available.
You can put it in places other than /tmp or even leave it on the USB drive if the DGND3700 allows you to mount ext2,3,4 filesystems.

On the router I changed to /tmp and did a wget http://busybox.net/downloads/binaries/l … box-mipsel

chmod 755

but when I try to run it I get:

/tmp # ./busybox-mipsel wget
./busybox-mipsel: 1: Syntax error: "(" unexpected

edit, the mips version works but unfortunately the wget version in the latest busybox is not supporting https.

(Last edited by bilbo on 31 Oct 2011, 23:29)

Any luck compiling your own wget?

no not been able to get it figured out. No massive issue , I'll have to settle for the software client updater for now.

You need busybox-mips and not busybox-mipsel.

I've made a script which enable telnet, connect to the router and launch a script placed on the usb key.

Set oSh=CreateObject("WScript.Shell")
WScript.Sleep 500: oSh.Run "telnetenable 192.168.1.1 204D7B0B892F Gearguy Geardog"
WScript.Sleep 500: oSh.Run "telnet 192.168.1.1"
WScript.Sleep 500: oSh.SendKeys "/tmp/shares/USB_Storage/test.sh"
WScript.Sleep 500: oSh.SendKeys "{ENTER}"
WScript.Sleep 500: oSh.SendKeys "exit~"

It's just a bad senkey, but it works.

ps: telnetenable must be in the same directory...

(Last edited by Mystikal57 on 15 Nov 2012, 21:43)

The discussion might have continued from here.