Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to install a program on a linux router. Can this also be done on a linksys router that has ddwrt installed on it? How?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

To install things on a router with DD-WRT, you must enable a few things in the router administration interface. First, enable JFFS2 on the Management tab of the Administration section. Second, enable SSHd on the Services tab of the Services section. If you need to access files from another computer, the easiest way is to share them via Windows File Sharing/SMB, and then mount it via the CIFS Automount section of the Management tab of the Administration section. You can also use SCP if you desire.

Once you've done that, you can access your router via SSH. To do so on Linux and Mac OS X, just run ssh [router IP address]. To do so on Windows, you'll need PuTTY or another SSH client.

Once you're on, you have access to a full Linux BusyBox shell. But, that's only half the battle. Routers don't come with x86-based processors, so you can't just copy a binary from a Linux machine and have it work. It has to be compiled for the processor included with your particular router and designed to work on BusyBox.

However, there are many packages compiled for routers, that can be installed with the package manager created by the OpenWRT project and included with DD-WRT, called ipkg (as another user indicated while I was writing this answer). The ipkg documentation has instructions for using the ipkg command and several sources of packages for DD-WRT.

share|improve this answer
    
This is exactly right. Unfortunately, even if you manage to get JFFS2 on your router and can log in to it via SSH, you may still be unable to put any additional packages on the router if you don't have enough free flash memory space. –  Koveras Sep 17 '12 at 16:40
add comment

You can use the ipkg package tool from openwrt: http://www.dd-wrt.com/wiki/index.php/Ipkg

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.