zap.qc.caan Electronic Outpost

Home page | History | Useful Links | Software of Note |   

I have installed a D-Link DSL-G604T ADSL router in our house recently, to replace the Netopia modem + Netgear RO-318 + Linksys Wireless access point that we had before.

It is an inexpensive, but interesting device, running a version of Linux, and easily configurable through a web interface.

Here are a couple of interesting web references about it:

I have upgraded the device to firmware version V2.00B01T01.EU.20050930, but it leaves me with 3 small problems:

  1. Remote management through SSH is enabled by default and the web interface doesn't allow to fix that
  2. The web interface doesn't allow to enable WEP security on the WiFi if it's presently disabled (bug in the web page)
  3. The Dynamic DNS client doesn't appear to work

I have fixed these problems thusly:

1. Disable remote management through SSH

Search the internet for cm_cli and you will find interesting information on this command-line tool that lets you change the configuration of your G604T without the web interface.

To disable remote SSH administration, SSH (or telnet) into the device, and issue the following commands:

cm_cli -l <<-EOF
begin
fdb:settings/service/remote_ssh/state=1
end
EOF
cm_cli -l <<-EOF
begin
logic:command/save
end
EOF

2. Enable WEP security

Again, using cm_cli, one can enable WEP.  Once that is done, the web interface can be used to modify those settings.  Just SSH (or telnet) into the device, and issue the following commands:

cm_cli -l <<-EOF
begin
ap:settings/privacy_type=2
ap:settings/wep_privacy=1
ap:settings/wep_auth_type=0
ap:settings/key_id=0
ap:settings/key_value1=01020304050607080910111213
ap:settings/key_len1=13
end
EOF
cm_cli -l <<-EOF
begin
logic:command/save
end
EOF

3. Send the IP address to DynDNS.org (SNMP works!)

The Dynamic DNS client on the D604T did not appear to work, but the SNMP function does.  So I am running the ddclient daemon from DynDNS.org on my FreeBSD machine in the house and using the following shell script to extract the ADSL IP address from the router.

#!/bin/sh
# read-dlink - Extract IP address of ADSL interface from D-Link g604t router with SNMP
#                                               D.Fortin, 2006-01-28

# get interface details for the ppp link on the D-Link G604T
snmpwalk -v 2c -c public 192.168.127.1 IP-MIB::ipAdEntAddr | \
        fgrep -v 127.0.0.1 | \
        fgrep -v 192.168 | \
        /usr/bin/awk '/IpAddress:/{ print $4 }'
exit 0

This script is then called from ddclient as configured in /etc/ddclient/ddclient.conf (use=cmd, cmd=/usr/local/bin/read-dlink.sh).

I would still be better to get the DynDNS client to work in the D604T, but it didn't when I tried, so I gave up.  Our local ADSL provider changes our IP address at least once a day, so a DynDNS client is a must :-/

Anyway, that's it for now.  Configured thus, the D604T appears quite stable.


 
Copyright 2006, Denis Fortin - All Rights Reserved