Bekijk de volledige versie : TrzepakoTomato-USB support+OpenVPN+Traffic Mgr

22-10-2008, 11:21
Greets All!
This firmware - TrzepakoTomato is a mix-up of several features.
-conanxu mod 1.5 (IP/MAC Bandwidth, pps, connection limiter, SPEEDMOD and so on...)
-ipt_ROUTE & ipt_random
-Traffic Mgr (static qos for users)
-ARP Binding
-IPID Adjust
-NVRAM status
-Many more
For example you have 2(or more) gateways in the lan/wan and you want to one of them to handle http requests so you type(or add into scripts section):

iptables -A PREROUTING -t mangle -p tcp --dport 80 -j ROUTE --gw ip_address_of_another_gw
Or if you want to split the udp traffic randomly between gateways:

# iptables -A PREROUTING -t mangle -p udp -m random --average 50 -j ROUTE --gw
# iptables -A PREROUTING -t mangle -p udp -j ROUTE --gw

# iptables -L PREROUTING -t mangle
target prot opt source destination
ROUTE all -- anywhere anywhere random 50% ROUTE gw
ROUTE all -- anywhere anywhere ROUTE gw
-Edited thttpd for user announcements.
1. Format your jffs partition.
2. Login and type:

cd /jffs/
touch index.htm
vi index.htm
Type sth like that:

<title>Hello Samanta!</title>
Would you like to bring me some coffee ;) ?<hr>

3. Save and close the index.htm file (in vi use the :wq / :w; :q esc)
Or download the file from an url:

wget http://www.somedomain.com/index.html
4. Type into the scripts/shell:

iptables -t nat -A PREROUTING -p tcp --dport 80 -s ip_of_the_secretary -j REDIRECT --to-port 81
5.Run the thttpd at the 81 port by typing into shell/scripts section.

httpd -p 81 -b


1. Flash your router with TrzepakoTomato firmware v1.21.0006+
2. Prepare your flash drive on Linux PC
- Create two partitions with fdisk: swap and ext3 partition (100MB and 1900MB in my case)
- Create swapspace 'mkswap /dev/sdf1'
- Create ext3 filesystem on second partition 'mkfs.ext3 -I 128 /dev/sdf2 -L router' (note the -I 128)
- Plug it into router
3. Load kernel modules and mount partition
- Connect to router via telnet and issue these commands

modprobe usbcore
modprobe ehci-hcd
modprobe scsi_mod
modprobe usb-storage
modprobe sd_mod
modprobe ext3
sleep 3

mount /dev/scsi/host0/bus0/target0/lun0/part2 /mnt
mkdir /mnt/opt-tomato
mount -o bind /mnt/opt-tomato /opt

you can add these lines to startup script
4. Install optware
wget http://www.wlan-sat.com/boleo/optwar...stall-ddwrt.sh -O - | tr -d '\r' > /tmp/optware-install.sh
sh /tmp/optware-install.sh
Modify PATH variable
export PATH=/opt/bin:/opt/sbin:$PATH
(note that you need to issue 2 last commands everytime you make new shell connection)

http://www.postimage.org/aV1dESSJ.jpg (http://www.postimage.org/image.php?v=aV1dESSJ)
http://www.postimage.org/Pqcsimi.jpg (http://www.postimage.org/image.php?v=Pqcsimi)
http://www.postimage.org/PqcspQJ.jpg (http://www.postimage.org/image.php?v=PqcspQJ)
http://www.postimage.org/aVsAa4J.jpg (http://www.postimage.org/image.php?v=aVsAa4J)
http://www.postimage.org/Pq1EiyX0.jpg (http://www.postimage.org/image.php?v=Pq1EiyX0)
ASUS 500g Premium v1(only) image:
(without usb & fs support)

Support, questions an suggestions are WELCOME!