Saturday, 23 January 2010

Adding local DNS entries to a Netgear DG834



Log into your netgear with telnet.

Telnet to your modem: telnet

Create a new hosts file with local addresses:

mkdir /var/etc
cp /etc/hosts /var/etc/hosts
echo "" >> /var/etc/hosts

To check it works, restart the DNS Masquerade program:

killall dnsmasq

Making things permanent:




  1. It would appear that on DG834Gv4 dnsmasq is not even present; dnrd is used instead, that also uses the /etc/hosts file as dnsmasq.

    To check if it works use
    killall dnrd

    dnrd -a yourLANrouterAddress -m hosts -c off -b -s dnsServer1 -s dnsServer2
    or wathever command line your router is using as found by
    cat /proc/PIDofDNRD/cmdline

    where PIDofDNR can be found using ps | grep dnrd


  2. On my DG834Gv4 the mount command fails so I'm unable to make the change permanent:
    Cannot read /etc/fstab: No such file or directory.
    I could create a fstab file but have no idea what should go in it !

  3. RE:DG834Gv4 and DG834Gv3 for that matter,
    Create the absent file system table using:
    cat /proc/mounts > /etc/fstab

  4. mount / -o rw,remount

    mount: Mounting rootfs on / failed: Permission denied

    Any ideas ?

  5. Anonymous (7 June 2011 22:19), worked?

  6. I'm having the same problem as Anonymous (7 June 2011 22:19):

    # mount / -o rw,remount
    Cannot read /etc/fstab: No such file or directory
    # cat /proc/mounts > /etc/fstab
    # mount / -o rw,remount
    mount: Mounting rootfs on / failed: Permission denied
    # cat /etc/fstab
    rootfs / rootfs rw 0 0
    /dev/root / squashfs ro 0 0
    none /dev devfs rw 0 0
    /proc /proc proc rw,nodiratime 0 0
    ramfs /tmp ramfs rw 0 0

    Any help here is greatly appreciated.

  7. Thanks for the tutorial, it's working fine :)
    Is there any workaround for the full filesystem?
    Thanks again.