Bienvenido! - Willkommen! - Welcome!

Bitácora Técnica de Tux&Cía., Santa Cruz de la Sierra, BO
Bitácora Central: Tux&Cía.
Bitácora de Información Avanzada: Tux&Cía.-Información
May the source be with you!

Thursday, October 25, 2012

DD-WRT -OTRW,_the_Right_Way
NOTE: Optware, The Right Way is for broadcom devices only.

This is the latest, greatest and easiest way to enable Optware on your Router. It is recommended that you have a router with USB capable storage (Harddisks (must be self-powered), flash-drives etc.) and the LATEST build! (preferably freshly flashed)
For BrainSlayer builds. Common routers use broadcom or broadcom k26. Choose the appropriate newest build, then navigate the directories.
For Eko Builds, K26 here All Others Here
The SD/MMC Method is working thanks to DHC Darkshadow. For USB users, you wont be needing JFFS2, so DISABLE it! Another aspect to note is that some of these services (i.e Twonky) consume alot of CPU resources, so make sure you check your resource consumptions.

Default Services that will be installed:
  • Bash instead of shell in busybox - (LFS support)
  • Automounting, Unmounting and Hotmounting of storage devices - Automatically mounts all recognized partitions and filesystem formats (including NTFS in K26).
  • Network printing with Watchprinter - Plug a USB printer into your router and let anyone on the LAN (or even WAN) print.
  • Torrent transmission with watchdog - Including Bittorrent transmission with Web Administration
  • Pre-configured Samba share - Samba provides file and print services for various Microsoft Windows clients and can integrate with a Windows Server domain, either as a Primary Domain Controller (PDC) or as a domain member.
  • NFS File Sharing - It is now possible to share files via NFS in a pure Linux environment.
  • Xinetd - A replacement for inetd, the internet services daemon. Controls user defined network services such as printing and SWAT (Samba Web Administration Tool)
  • Pound - A lightweight open source reverse proxy program suitable to be used as a web server load balancing solution.
  • Vlighttpd - Allows you to get a 2nd IP on your system and run virtual hosting there.
  • Pixelserv - A super minimal webserver, it's one and only purpose is serving a 1x1 pixel transparent gif file. Using some creative firewalling (netfilter/iptables) rules you can redirect some webrequests (for adds for example) to pixelserv.
  • AsiaBlock - A custom iptables firewall that is configurable to block certain countries from accessing your Webserver, FTP or just general Web surfing.
  • Worldblock - Very similar to Asiablock, other than the fact that it is for blocking everything except your country. To properly use this service, you must know how to use Vi editor to add your country.
  • StopHack - This CRON script will check /var/log/messages for pound entries that are malicious and put the IP's in /opt/etc/asia.spam. The AsiaBlock service MUST be running for this to work.
  • Stophammer - Similar to stophack, only it provides firewall services that increase your network security in a very respectable fashion. See Service examples below to understand how it works.
  • Vim with proper terminal support - Vim is an advanced text editor that seeks to provide the power of the de-facto Unix editor 'Vi', with a more complete feature set.
  • Siproxd - A masquerading SIP Proxy Server. Siproxd is a proxy/masquerading daemon for the SIP protocol. It handles registrations of SIP clients on a private IP network and performs rewriting of the SIP message bodies to make SIP connections work via an masquerading firewall (NAT). It allows SIP software clients (like kphone, linphone) or SIP hardware clients (Voice over IP phones which are SIP-compatible).
  • Fixtables - This service is used to fix a firewall rule-set bug that is present in all K26 firmwares. K24 is not affected. The service also contains VITAL security measures against current DD-WRT builds! It is highly recommended to use.
  • Zabbix - Zabbix offers advanced monitoring, alerting and visualization features today which are missing in other monitoring systems, even some of the best commercial ones. This service blows away SNMP, Cacti, Wallwatcher, etc. For more information, search the forums and check out the website!
  • Reloc_syslogd - A service that is designed to extend the size of DD-WRT's syslogd and integrate kernel logging into /opt/var/log/messages
  • Service tool - Control all of these services. (Usage explained below)
  • Services running as other users than root
  • Other various useful tools such as net and storage diagnostics..
In my opinion, Everyone with a router that has storage device capabilities should take advantage of this! You will NOT regret it, even if it can be a time consuming process! If you are worried about formatting to a Linux filesystem and it's compatibility with windows, check out this thread from the forum on using the Windows NT Filesystem (NTFS)!

Getting Started

This method does NOT support Atheros based routers. if you want opkg for these type of routers see this thread.
These routers have been verified with Optware. If you have had success, please edit this section and add your model and name (add your name if model is already listed):
  • Asus RT-N16 (gatorback)
  • Linksys E3000 / E4200v1 (basmaf)
If starting from scratch, you will need to first format and partition your harddisk (ext2 or ext3), flashdrive or SD card (ext2 ONLY) Linux filesystem. Ext2 should be used for flashdrive because it does not use journaling (like ext3). It is much easier than you think, and can be accomplished via a Linux Live boot-CD. There will be NO changes to your PC whatsoever, and it is very simple to implement.
[gatorback]: In the WL-520GU (4MB firmware) only ext3 is supported, however a module ext2.o can be inserted in the kernel at bootup. Module and details are published here: [1] The WL-520GU does not have enough hardware to support a typical OTRW install.

Drive Preparation and Prerequisites

Before you can utilize this extremely beneficial addition to your USB capable router, you must follow these important instructions:

How to - Format and Partition External Storage Device

This must be done for Optware to work correctly!

Connecting the Drive to your Router


The are reports of flash drives that do not work: [2]
For users with small /opt partitions (Less than 256MB, such as flashdrives and SD/MMC cards) use this as your start-up script:

mount -o noatime -t ext3 /dev/scsi/host0/bus0/target0/lun0/part1 /opt
For external HardDrives, use the following method:

1. In the DD-WRT web GUI screen, on the Services USB tab enable the options for:
  • Core USB support
  • USB 2.0 support (Asus WL520gU routers must use USB 1.1 drivers only!)
  • USB storage support
  • Printer Support (optional)
  • ext2/ext3 File System support - Only for builds older than SVN 15501 !! The new system automatically selects FS type.
  • FAT File system support (optional, but try enabling this if your USB won't mount, even if you aren't using FAT FS) - Only for builds older than SVN 15501 !! The new system automatically selects FS type.
  • Automatic Drive Mount
  • In the Disk Mount Point drop-down menu, mount to /opt
2. From the DD-WRT web GUI screen, click on Save Settings, then Apply Settings 3. If everything was done correctly, this should appear on your Services -> USB Tab:

No comments: