Convert Small script from dD-WRT to tomato

2 posts / 0 new
Last post
yomen9
yomen9's picture
Convert Small script from dD-WRT to tomato
Hi guys!
 
I just switch firmware from dd-wrt to Tomato because of a software issue I wasn't able to fix on the DD-WRT.
 
Now this particular issue is solved with the Tomato firmware!
 
Only thing is that I want to run a startup script that I was running on DD-WRT, but the script won't seem to work with Tomato and I have no idea how to convert it!
 
Here is the script, if anyone can help me convert it, it will be so much appreciated!
 
/usr/sbin/ip addr add 24.37.249.84/29 dev vlan1 /usr/sbin/iptables -t nat -I POSTROUTING 1 -p all -s 192.168.1.152-j SNAT --to 24.37.249.84 /usr/sbin/iptables -t nat -A PREROUTING -p tcp -d 24.37.249.84 --dport 80 -j DNAT --to-destination 192.168.1.152 /usr/sbin/iptables -I FORWARD -p tcp -d 192.168.1.152 --dport 80 -j ACCEPT
 
 
I think the error may be caused by the SNAT part, but I'm really not sure!
 
 
Thank you so much for any help!
Have nice day
yomen9
yomen9's picture
 

 

The code wasn't clear and I didn't found where to edit my post :

 

/usr/sbin/ip addr add 24.37.249.84/29 dev vlan1

/usr/sbin/iptables -t nat -I POSTROUTING 1 -p all -s 192.168.1.152-j SNAT --to 24.37.249.84

/usr/sbin/iptables -t nat -A PREROUTING -p tcp -d 24.37.249.84 --dport 80 -j DNAT --to-destination 192.168.1.152

/usr/sbin/iptables -I FORWARD -p tcp -d 192.168.1.152 --dport 80 -j ACCEPT