Going from Tomato to DD-WRT

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
bsdaiwa
DD-WRT Novice


Joined: 07 Mar 2010
Posts: 14
Location: Fullerton, CA. USA & Florianopolis, SC Brazil

PostPosted: Tue Mar 01, 2011 16:02    Post subject: Going from Tomato to DD-WRT Reply with quote
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.

Can I run the same scripts in DD-WRT that I run in Tomato, is the syntax the same?

Thanks for any help you can provide.
Sponsor
bsdaiwa
DD-WRT Novice


Joined: 07 Mar 2010
Posts: 14
Location: Fullerton, CA. USA & Florianopolis, SC Brazil

PostPosted: Fri Apr 08, 2011 13:43    Post subject: Reply with quote
Gave up, staying with Tomato because I couldn't get anyone to help me.
Thanks
LLigetfa
DD-WRT User


Joined: 23 Oct 2007
Posts: 406

PostPosted: Fri Apr 08, 2011 13:58    Post subject: Reply with quote
There are minor differences in the syntax of scripts but it should be trivial to fix. I switched from Tomato to dd-wrt and adapted my scripts.
_________________
WHR-HP-G54 running DD-WRT v24 VPN build 14896
bsdaiwa
DD-WRT Novice


Joined: 07 Mar 2010
Posts: 14
Location: Fullerton, CA. USA & Florianopolis, SC Brazil

PostPosted: Fri Apr 08, 2011 14:13    Post subject: Reply with quote
LLigetfa, thanks for replying. Since DD-WRT handles scripts in a different manor my first problem was trying to figure out where and how to install them.
My scripts in Tomato are placed in the following locations:

Init - two scripts (one for one setting up a vlan so I can view my modem that is on a different subnet and the second for establishing a way for me to use WOL)

Firewall - one script (used for access to my modem on the vlan)

WAN Up - one script (used to setup ad blocking)

I was not sure how and even where to enter those scripts and whether the syntax was the same.

Can you help?

Thanks very much.
LLigetfa
DD-WRT User


Joined: 23 Oct 2007
Posts: 406

PostPosted: Fri Apr 08, 2011 14:23    Post subject: Reply with quote
The "where" part is Administration > Commands.

It was years ago that I left Tomato so my memory is fading. I think Init in Tomato is Startup in dd-wrt.

My Startup script:
ifconfig vlan1:1 169.254.1.2 netmask 255.255.255.252 broadcast 169.254.1.255

_________________
WHR-HP-G54 running DD-WRT v24 VPN build 14896
bsdaiwa
DD-WRT Novice


Joined: 07 Mar 2010
Posts: 14
Location: Fullerton, CA. USA & Florianopolis, SC Brazil

PostPosted: Fri Apr 08, 2011 14:43    Post subject: Reply with quote
Here are my Init scripts:
#Assign an address to vlan1 port in different subnet
sleep 10
ip addr add 192.168.0.13/24 dev vlan1 brd +
#Setup WOL Broadcast Address
ip neigh change 192.168.122.254 lladdr ff:ff:ff:ff:ff:ff nud permanent dev br0
ip neigh add 192.168.122.254 lladdr ff:ff:ff:ff:ff:ff nud permanent dev br0

My Firewall script:
#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

My WAN Up script:
#logger WAN UP Script Executing
sleep 5
test -s /tmp/dlhosts
if [ $? == 1 ] ; then
echo -e "#!/bin/sh\nwget -O - http://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 http://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"

Any suggestions?
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum