[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Google
 
Web openvpn.net

[Openvpn-users] /etc/init.d/openvpn does not work, manual is OK


  • Subject: [Openvpn-users] /etc/init.d/openvpn does not work, manual is OK
  • From: "David Balazic" <David.Balazic@xxxxxxxxxxxxxxxxxx>
  • Date: Thu, 20 Sep 2007 19:12:36 +0200

Hi!
I've been using an OpenVPN client setup for months with success and now I decided to start it automatically during startup.
I copied the config file to /etc/openvpn/tun1.conf and the used key file also :  /etc/openvpn/key
If I now start it with " /etc/init.d/openvpn start", it works fine.
But if I reboot, it connects to the VPN server, but does not set the routes (I have "route-gateway 10.4.0.1" and
"redirect-gateway def1" in the config file).
 
The last lines after boot are :
NET: Registered protocol familiy 10
lo: Disabled Privacy Extensions
IPv6 over IPv4 tunneling driver
eth1: no IPv6 routers present
 
Could they be related ?
 
The machine is a vmware virtual (guest) and is running debian 4.0 fully up to date.
rc2.d has following nonstandard items :
K08vmware-tools
S19vmware-tools
K19hplip
K20bittorrent
K21gdm

correct route (when I run/restart openvpn manually  : /etc/init.d/openvpn restart ) :
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
xx.157.yy.37   192.168.209.2   255.255.255.255 UGH   0      0        0 eth1
10.4.0.1        0.0.0.0         255.255.255.255 UH    0      0        0 tun1
192.168.209.0   0.0.0.0         255.255.255.0   U     0      0        0 eth1
0.0.0.0         10.4.0.1        128.0.0.0       UG    0      0        0 tun1
128.0.0.0       10.4.0.1        128.0.0.0       UG    0      0        0 tun1
0.0.0.0         192.168.209.2   0.0.0.0         UG    0      0        0 eth1
 
bad route (after boot) :
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.4.0.1        0.0.0.0         255.255.255.255 UH    0      0        0 tun1
192.168.209.0   0.0.0.0         255.255.255.0   U     0      0        0 eth1
0.0.0.0         192.168.209.2   0.0.0.0         UG    0      0        0 eth1

cat /etc/openvpn/tun1.conf
 
remote my_server.dyndns.org 1234
dev tun1
ifconfig 10.4.0.2 10.4.0.1
route-gateway 10.4.0.1
redirect-gateway def1
ping 10
ping-restart 60
verb 1
mute 5
cipher none
secret key 0
 
Regards,
David