You are not logged in.
I created file with this commands inside:
#!/bin/bash
ip route add 10.13.58.0/24 dev ppp0
ip route add 10.13.57.0/24 dev ppp0
ip route add 10.13.56.0/24 dev ppp0
ip route add 10.13.54.0/24 dev ppp0
ip route add 192.168.76.0/24 dev ppp0
and named it: vpn-routes and saved in my home folder, when i start it using command:
sudo ./vpn-routes it doesnt create new routes.
What I am doing wrong? thanks
Offline
Show the error messages. We're not psychic.
Offline
When I execute command:
ip route add 10.13.58.0/24 dev ppp0
which is inside that script, then I can ping that ip from my pc, but when I just execute script(where is that route) I cant ping ip from the network 10.13.58.0/24
Offline
Useful debugging command:
route -n
Or:
ip route list
Offline
[r-c@r-c-laptop ~]$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
10.13.58.0 0.0.0.0 255.255.255.0 U 0 0 0 ppp0
192.168.0.0 0.0.0.0 255.255.255.0 U 2 0 0 eth0
192.168.44.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
213.151.203.22 192.168.0.1 255.255.255.255 UGH 0 0 0 eth0
Offline
ips from that script are not there...
Offline
It should be perfectly possible to do it that way I think. Do the routes exist if you enter the commands manually one by one?
If so, perhaps try to put some pauses between each command. So something among the lines of...
#!/bin/bash
ip route add 10.13.58.0/24 dev ppp0
sleep 1
ip route add 10.13.57.0/24 dev ppp0
sleep 1
ip route add 10.13.56.0/24 dev ppp0
sleep 1
ip route add 10.13.54.0/24 dev ppp0
sleep 1
ip route add 192.168.76.0/24 dev ppp0
Burninate!
Offline
It should be perfectly possible to do it that way I think. Do the routes exist if you enter the commands manually one by one?
If so, perhaps try to put some pauses between each command. So something among the lines of...
#!/bin/bash ip route add 10.13.58.0/24 dev ppp0 sleep 1 (...)
No, that's neither a fix, nor a good workaround. It would suggest that the kernel/network driver, or something else fails to do proper locking at some place.
I can run a loop to create multiple routes quickly one after another, and it works, too.
The initally pasted script works for me. Though I had to s/ppp0/eth0/ sicne I have no ppp0
Last edited by Blµb (2012-03-25 17:41:18)
You know you're paranoid when you start thinking random letters while typing a password.
A good post about vim
Python has no multithreading.
Offline