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:

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

    FIREWALL
    #Route anything for this subnet via vlan1
    #and access the modem at 192.168.0.1 on vlan1
    iptables -I POSTROUTING -t nat -o vlan1 -d 192.168.0.1/24 -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 127.0.0.1 | sed -e '2,\$s/127.0.0.1/0.0.0.0/g' -e 's/[[:space:]]*#.*$//' > /etc/hosts\nlogger DOWNLOADED »www.mvps.org/winhelp2002/hosts.txt\nkillall -1 dnsmasq" > /tmp/dlhosts
    chmod 777 /tmp/dlhosts
    /tmp/dlhosts
    fi
    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.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice