I have setup an EOIP tunnel between two locations with DD-WRT v23 SP3 7/21/07 build... I can ping both routers via their tunnel ip's via the command line on each router but to get the PC's behind each router to pass traffic I have to manualy add a static route like below.
Main site - route add -net 192.168.1.0/24 gw 10.10.10.2
Remote site - route add -net 192.168.0.0/24 gw 10.10.10.1
I've tried adding the following in the the startup script area :
route add -net 192.168.1.0/24 gw 10.10.10.2
When i click run command it works but when i save it and reboot after the reboot the route isn't there... Anyone know how to do this... Its driving me crazy... I've also tried to add the " sleep 120 " before the route command and that didn't help either.
Thanks for you reply ... Yes I have perform my steps in exactly that order and the route still isn't there after the reboot... When I click Run commands the route is created and working so I know its not a problem with my commands... I think it might be an issue with the EOIP tunnel not being fully active when the start up script executes.
Has anyone ever use an EoIP tunnel in routed mode and not bridged mode?
Joined: 07 Jun 2006 Posts: 1488 Location: the Netherlands
Posted: Sun Sep 09, 2007 16:56 Post subject:
You should save it as firewall script, when wanup happens, the routes are reset to defaults by the firmware. The firewall script is called directly after that event.
So that should work... _________________ Firmware: DD-WRT v24-sp2 (latest available) mega
WRT320N
Well I tried it as a Firewall Script and it still did not work... All I have in for the firewall script is this
route add -net 192.168.1.0/24 gw 10.10.10.2
Should there be anything else in the script??? When I click run commands it works and i can see the route get added when i type "route" from the cli... Thanks for your help and suggestions!
Ok well I've tried everything under the sun to make a startup script add an IP route for my Eoip tunnel... I think the problem is that the tunnel is not up when the script is ran...
So i've come to the point on where I have to come up with some kind of solution... I've made a custom script from the web gui that has the following in it..
Its located in /tmp/custom.sh and this file seems to be there after every reboot.
I tried to make a cron job that would run every 5 min to keep trying to add the static route.
I put this in the cron section in the web gui but i don't see it writing anything to /tmp/crontab
from the command line if I run " /tmp/custom.sh " the route gets added so I know the script works... Does anyone know if the cron area of the gui doesn't work or do you know of a way I can manually add the cron job and have it stay put after reboot?
Thanks... I know this is a cruel way of doing this but I'm getting desperate for a solution.
Thanks for you reply ... I all ready have a script in /tmp/custom.sh that I made in the web gui under commands and custom-script. If i run the script from the command line
It will add the route and all is well but i can't get it to run as a cron job... Now i'm trying to add a cron job under Admin / Management.. I don't think the webadmin is adding the cron job. Here is what i put in for a cron job
Why not run it as a startup script with a sleep command first, for like 60 seconds, so it doesn't run until after wanup has run?
wizard1089 wrote:
Hi Redhawk,
Thanks for you reply ... I all ready have a script in /tmp/custom.sh that I made in the web gui under commands and custom-script. If i run the script from the command line
It will add the route and all is well but i can't get it to run as a cron job... Now i'm trying to add a cron job under Admin / Management.. I don't think the webadmin is adding the cron job. Here is what i put in for a cron job
I have tried making it a startup script with the sleep command before the route command but it never works... I have also tried making it a firewall startup script with no luck either
... I don't believe that its this difficult just to add a route to the system...
Does anyone know how to manually add a cron job? I can't seem to get ANY startup script or CRON job to run...