1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Going from Tomato to DD-WRT

Discussion in 'DD-WRT Firmware' started by Bill_S, Feb 28, 2011.

  1. Bill_S

    Bill_S Network Guru Member

    I am trying to get familiar with DD-WRT, so I loaded v24-sp2 (11/02/09) std on my WRT54G v3 router that has been running Tomato v1.28. All went well until I got to the issue of Scripts. I currently have several scripts loading in Tomato and I would like to continue to have those run in DD-WRT. But I noted there is a different way of handling scripts in DD-WRT, so I thought I would ask for help.
    The scripts I run in Tomato are:

    #Assign an address to vlan1 port in different subnet
    sleep 10
    ip addr add dev vlan1 brd +

    #Route anything for this subnet via vlan1
    #and access the modem at on vlan1
    iptables -I POSTROUTING -t nat -o vlan1 -d -j MASQUERADE

    WAN Up
    #logger WAN UP Script Executing
    sleep 5
    test -s /tmp/dlhosts
    if [ $? == 1 ] ; then
    echo -e "#!/bin/sh\nwget -O - »www.mvps.org/winhelp2002/hosts.txt | grep | sed -e '2,\$s/' -e 's/[[:space:]]*#.*$//' > /etc/hosts\nlogger DOWNLOADED »www.mvps.org/winhelp2002/hosts.txt\nkillall -1 dnsmasq" > /tmp/dlhosts
    chmod 777 /tmp/dlhosts
    cru a Gethosts "30 03 * * 3 /tmp/dlhosts"

    Can anyone tell me how I can either run the same scripts or apply the same actions within DD-WRT? Do I even need a script for the vlan setup?

    Thanks for any help you can provide.

Share This Page