install packages on ddwrt

Posted on November 25, 2010

0



It is not a bad idea if you have a L3 Device that you can reach whenever you want and that has all the basic troubleshooting tools like nslookup, netcat, tcpdump, openssl, ssh, openvpn… A Netgear WRN3500L router with ddwrt can be really helpful. It provides you WLAN access at home, access to your NAS and access to the tools that you cannot use on your PC at your company (and that helps you reach your computer at home :-)).

To install the mentions tools, programs the ipkg or ipkg-opt should be used. Thats a tool like apt at Ubuntu or like yum at Fedora. The applications I installed on my USB stick as the router has not enough space for me.
First I created 3 partitions on my 8GB USB stick. This USB is plugged in my Netgear WRN3500L, lets say this is my really small NAS :-)

I used the following commands to mount it for ipkg:

# mount /dev/discs/disc0/part1 /opt
# mount /dev/discs/disc0/part2 /jffs
# mount /dev/discs/disc0/part3 /mnt

After mounting I have enabled jffs.
Link for Jffs:http://www.dd-wrt.com/wiki/index.php/Jffs

# nvram set sys_enable_jffs2=1
# nvram set enable_jffs2=1
# nvram commit

and followed the documents on ddwrt for ipkg and ipkg-opt.

Ipkg (tutorial)
http://www.dd-wrt.com/wiki/index.php/Ipkg

Installing Optware (ipkg-opt)
http://www.dd-wrt.com/wiki/index.php/Optware

The commands I used from optware link:

# mkdir /jffs/opt
# mount -o bind /jffs/opt /opt
# wget http://www.3iii.dk/linux/optware/optware-install-ddwrt.sh -O – | tr -d ‘\r’ > /tmp/optware-install.sh
# sh /tmp/optware-install.sh

Lets update the package list.

# ipkg update
Downloading http://downloads.openwrt.org/whiterussian/packages/Packages
Connecting to downloads.openwrt.org (78.24.191.177:80)
Done.
Updated list of available packages in /jffs/usr/lib/ipkg/lists/whiterussian
Downloading http://downloads.openwrt.org/whiterussian/packages/non-free/Packages
Connecting to downloads.openwrt.org (78.24.191.177:80)
Done.
Updated list of available packages in /jffs/usr/lib/ipkg/lists/non-free
Downloading http://downloads.openwrt.org/backports/rc5/Packages
Connecting to downloads.openwrt.org (78.24.191.177:80)
Done.
Updated list of available packages in /jffs/usr/lib/ipkg/lists/backports
#
# ipkg-opt update
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/Packages.gz
Inflating http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/Packages.gz
Updated list of available packages in /opt/lib/ipkg/lists/optware
Successfully terminated.

See what we have for openssl.

# ipkg list | grep openssl
libopenssl – OpenSSL (Secure Socket Layer) libraries
openssl-util – OpenSSL (Secure Socket Layer) command line tool
mini-httpd-openssl – A small HTTP server, built with SSL support using OpenSSL.
php4-mod-openssl – OpenSSL module for PHP4
php5-mod-openssl – OpenSSL module for PHP5
#
# ipkg-opt list | grep openssl
openssl – 0.9.7m-5 – Openssl provides the ssl implementation in libraries libcrypto and libssl, and is needed by many other applications and librari
openssl-dev – 0.9.7m-5 – openssl native development files
perl-crypt-openssl-random – 0.03-1 – Crypt-OpenSSL-Random – Routines for accessing the OpenSSL pseudo-random number generator
perl-crypt-openssl-rsa – 0.24-1 – Crypt-OpenSSL-RSA – RSA encoding and decoding, using the openSSL libraries
py25-openssl – 0.10-1 – Python wrapper around a small subset of the OpenSSL library.
py26-openssl – 0.10-1 – Python wrapper around a small subset of the OpenSSL library.

To install a package the following command can be used.

# ipkg-opt install packagename
Advertisement
Posted in: ddwrt, Linux, Security