Monday, March 24, 2008

DD-WRT v24 RC-6 Command Line Config

Recently I made a bonehead mistake and turned off the web gui for my DD-WRT. Luckily I was able to ssh into it, but that was rather useless since there's no clear command line setup interface for it. I could start httpd by typing: httpd start and I could then get into the gui but that does not allow you to modify any settings, if you try the /appli.cgi just takes you to a blank page and you don't see anything happen. If you reboot the router the web gui goes away. After scouring the net I found no obvious answer and basically just gave up.

Knowing that developers are often a little slow about telling people how their stuff works (often because they don't know themselves) I approached my search from the startup scripts perspective and found my answer at the dd-wrt site here: Startup Scripts: NVRAM Method. So I ssh to my router and after a little spelunking with the nvram command I found the answer and et-voila! I have my router with a properly working web gui. Here's what I did:

  1. nvram show | grep -i http
    This gave me too much stuff so I changed my grep to nvram show | grep -i http_
    I then found that http_enable was set to 0 so...
  2. nvram set http_enable=1
  3. nvram commit
    There's a pause here while the router reloads services
  4. Browse to the gui and you should now see a fully functional web gui
  5. Reboot the router to configrm the command took and it did.
Hope this helps some of the lost souls I found out there with the same problem on the net.

5 comments:

  1. For the want of a nail the shoe was lost,,,. Right nail, right time, thankyou.

    ReplyDelete
  2. Well, there I went following footsteps in the snow, straight over the same cliff!
    Many thanks for you fix, worked a treat.
    And thanks for posting it too.
    No help from the DD-WRT site :-((
    Methinks it's time to move to Tomato.
    Phil

    ReplyDelete
  3. Just wanted to say thanks. Simple and very helpful! Keep it up.

    ReplyDelete