Ah, I see. I did some digging about user-scripts (something about saving them in the jffs partition, etc etc)... but I am completely clueless about this. (
https://github.com/RMerl/asuswrt-merlin/wiki/User-scripts)
Is there any website/wiki/forum post that I can look at to learn?
EDIT:
So I have all my JFFS partition set up, along with Telnet and SSH on my router. I can access the partition with WinSCP and create files (I have created services-start) in the scripts folder without a problem.
My "services-start" looks like this:
Code:
#!/bin/sh
sh /jffs/scripts/route_vpn.sh&
The part I am confused about is how to script a route. I have the following (and i know it is wrong, so any help would be appreciated!)
My route_vpn.sh looks like this:
Code:
#!/bin/sh
ip route add 190.93.249.164 via 192.168.0.1
Then I changed the file's permission to be executable, and rebooted the router. However, it doesn't work (not a big surprise since I am 99% sure that my route_vpn.sh coding is wrong).
Could someone tell me what the format would be for this type of a script?
Thanks
EDIT2:
So I got the static routing to work. I switced to firewall-start and use a different coding format. However, it seems like CIDR is not working. If I add a specific IP (say 123.123.123.5), then the routing
works. However, if I want a range using CIDR notation (e.g. 123.123.123.1 to 123.123.123.10), then its not working. The code, using CIDR notation is the following:
Code:
#!/bin/sh
route add 123.123.123.1/32 gw 192.168.0.1
route add 123.123.123.2/31 gw 192.168.0.1
route add 123.123.123.4/30 gw 192.168.0.1
route add 123.123.123.8/31 gw 192.168.0.1
route add 123.123.123.10/32 gw 192.168.0.1
But this isn't working. Is there anything I am doing wrong with the CIDR notation?