Just moozing

Before you can check your notes, you must make them…

Installing OpenWrt

with one comment

The power button on my Asus WL-500g Premium router is blinking slowly and I cannot get access to the device. It probably means that it fails to boot. This blog is about how I got it up and running again.

I connect my laptop to it directly and disabled network manager.

$ su –
Password:
# ifconfig eth0 192.168.1.23
# ifconfig eth0 up
# nmap -sP 192.168.1.1/24

Starting Nmap 5.00 ( http://nmap.org ) at 2010-12-18 14:36 CET
mass_dns: warning: Unable to determine any DNS servers. Reverse DNS is disabled. Try using –system-dns or specify valid servers with –dns-servers
Host 192.168.1.1 is up (0.00091s latency).
MAC Address: 00:1B:FC:xx:xx:xx (Asustek Computer)
Host 192.168.1.23 is up.
Nmap done: 256 IP addresses (2 hosts up) scanned in 5.96 seconds
# telnet 192.168.1.1
Trying 192.168.1.1…
^C
# nmap 192.168.1.1

Starting Nmap 5.00 ( http://nmap.org ) at 2010-12-18 14:37 CET
mass_dns: warning: Unable to determine any DNS servers. Reverse DNS is disabled. Try using –system-dns or specify valid servers with –dns-servers
All 1000 scanned ports on 192.168.1.1 are filtered
MAC Address: 00:1B:FC:xx:xx:xx (Asustek Computer)

Nmap done: 1 IP address (1 host up) scanned in 22.81 seconds
#

No access to device. I will flash it using tftp.
You need to write the following (included to be highlight’n’paste friendly)

 wget http://downloads.openwrt.org/backfire/10.03.1-rc4/brcm-2.4/openwrt-brcm-2.4-squashfs.trx
 atftp 192.168.1.1
 trace
 put openwrt-brcm-2.4-squashfs.trx

Note that the version of OpenWrt may be different in your case.

An example of a failed attempt

# atftp 192.168.1.1
tftp> trace
Trace mode on.
tftp> put openwrt-brcm-2.4-squashfs.trx
sent WRQ le: openwrt-brcm-2.4-squashfs.trx, mode: octet <>>
timeout: retrying…
sent WRQ <>>
timeout: retrying…
sent WRQ <>>
timeout: retrying…
sent WRQ <>>
timeout: retrying…
sent WRQ <>>
timeout: retrying…
sent WRQ <>>
timeout: retrying…
tftp: aborting
tftp> quit

The router must be turned on very shortly after the ‘put’ command has been issued. On a side note, to enable this without a blinking power diode, press the “restore” button while applying power.

# atftp 192.168.1.1
tftp> trace
Trace mode on.
tftp> put openwrt-brcm-2.4-squashfs.trx
<snip>
sent DATA <block: 4744, size: 512>
received ACK <block: 4744>
sent DATA <block: 4745, size: 0>
received ACK <block: 4745>
tftp> quit

;

Power cycle the router. If it works, the power diode will turn off again, while the system reboots or initializes itself (or whatever it needs to do).

It should now be accessible on 192.168.1.1

# nmap 192.168.1.1

Starting Nmap 5.00 ( http://nmap.org ) at 2010-12-18 14:52 CET
mass_dns: warning: Unable to determine any DNS servers. Reverse DNS is disabled. Try using –system-dns or specify valid servers with –dns-servers
Interesting ports on 192.168.1.1:
Not shown: 996 closed ports
PORT STATE SERVICE
22/tcp open ssh
23/tcp open telnet
53/tcp open domain
80/tcp open http
MAC Address: 00:1B:FC:xx:xx:xx (Asustek Computer)

Nmap done: 1 IP address (1 host up) scanned in 38.85 seconds

The router is now accessible using luci through the browser. Username and password are both “root”.

Use system -> backup/restore and select your configuration backup. This did not restore the wifi settings, so that had to be done also.

Advertisements

Written by moozing

December 20, 2010 at 09:00

Posted in Tech

Tagged with

One Response

Subscribe to comments with RSS.

  1. […] Uncategorized ← Installing OpenWrt […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: