Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am having a little problem, I am using a VPN (with openvpn), and it starts auto when the server starts, the problem is that every time I have to set something like this

route add -net 10.108.**.** netmask 255.255.255.192 gw 10.108.**.**

If I make a ifconfig its the eth0 and eth1 and lo and tap0

tap0      
Link encap:Ethernet  HWaddr 1a:ad:6b:69:3c:83
inet addr:10.108.24.253  Bcast:10.108.24.255  Mask:255.255.255.0
inet6 addr: fe80::18ad:6bff:fe69:3c83/64 Scope:Link
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:481 errors:0 dropped:0 overruns:0 frame:0
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100

and I dont understand why doesnt work, at my interfaces I have

up route add -net 10.108.**.0 netmask 255.255.255.** gw 10.108.**.1
down route del -net 10.108.**.0 netmask 255.255.255.** gw 10.108.**.1

So, I have to write this

route add -net 10.108.*.0 netmask 255.255.255.** gw 10.108.**.1

Any idea of what could be???

(I use Debian6)

share|improve this question
1  
What type of VPN are you running? Is 10.108.**.1 on the other side of the VPN? –  Zoredache Feb 22 '13 at 1:33
    
yes, that is the other side of the vpn –  user156355 Feb 22 '13 at 16:28

1 Answer 1

up vote 4 down vote accepted

I suspect you are having an issue relating to timing. I suspect the VPN link isn't fully established when your route statements are being run. If I were you, I would look really closely at the VPN tool you are using, and use the functionality within the VPN to update your routes once the connection has been established.

share|improve this answer
    
yes, I think its that too, any way I can solve this problem? –  user156355 Feb 22 '13 at 16:28
    
Like I said, set the route in the VPN. Since you haven't said what vpn you are using I can't really sat much more. –  Zoredache Feb 22 '13 at 19:30
    
Thanks, I am using openvpn, I solved it thanks for your answer, making and post-up of my network –  user156355 Feb 22 '13 at 23:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.