OpenVPN ne démarre pas au démarrage du serveur [CLOSED]

Artica se doit de gérer aussi le VPN, ici toutes les discussions concernant l'administration du serveur OpenVPN

OpenVPN ne démarre pas au démarrage du serveur [CLOSED]

New postby guidtz » Thu Apr 08, 2010 12:21 pm

Bonjour,

j'ai un problème avec OpenVPN qui ne démarre pas au démarrage du serveur et quand je le démarre à la main voici les logs :
...Starting......: OpenVPN tunnel type...: "tun"...
Starting......: OpenVPN ressources....: /usr/share/doc/openvpn/examples/easy-rsa/2.0...
Starting......: OpenVPN version.......: 2.1_rc11...
Starting......: OpenVPN server config.: /etc/openvpn/server.conf
StStarting......: OpenVPN building settings for SRVEPNCELLIER...
Starting......: OpenVPN linked to eth1 (192.168.7.1)...
Starting......: OpenVPN IP adding default route "192.168.7.0 255.255.255.0"
Starting......: OpenVPN IP pool from 10.8.0.2 to 10.8.0.254 mask:255.255.255.0
Starting......: OpenVPN IP bind 192.168.1.101
Starting......: OpenVPN building settings done.
Starting......: OpenVPN cleaning iptables 0 rules
arting......: OpenVPN IP Forwarding is enabled
Starting......: OpenVPN server verify key "SRVEPNCELLIER.key" in /etc/artica-postfix/openvpn/keys directory
Starting......: OpenVPN Bridged is not set, change to tun
Starting......: OpenVPN Failed

Slts
guidtz
 
Posts: 2007
Joined: Sat Jan 17, 2009 3:08 am
Location: Vendée
Artica servers number: 3
Linux System: Debian
Technical skills: A Linux System Administrator

Re: OpenVPN ne démarre pas au démarrage du serveur

New postby admin » Thu Apr 08, 2010 4:22 pm

quelle est la sortie de /etc/init.d/artica-postfix restart openvpn --verbose
User avatar
admin
Site Admin
 
Posts: 11946
Joined: Wed Oct 17, 2007 7:59 am
Location: France

Re: OpenVPN ne démarre pas au démarrage du serveur

New postby guidtz » Thu Apr 08, 2010 7:34 pm

srvepncellier:~# /etc/init.d/artica-postfix restart openvpn --verbose
cpulimit():: cpu limitation to 55% for PID 5730
Shutdown openvpn daemon...
Stopping OpenVPN......................: Success
Stopping OpenVPN......................: Success
Stopping OpenVPN clients..............: stopped
cpulimit():: cpu limitation to 55% for PID 5966
/bin/cp /etc/artica-postfix/settings/Daemons/ArticaOpenVPNServerSettings /etc/openvpn/server.conf >/tmp/artica-install-d9d55600c1a2336f0ab2f2df1a0aefa9-00000.tmp 2>&1
Starting......: OpenVPN tunnel type...: "tun"...
Starting......: OpenVPN tunnel type...: "tun"...
Starting......: OpenVPN ressources....: /usr/share/doc/openvpn/examples/easy-rsa/2.0...
Starting......: OpenVPN ressources....: /usr/share/doc/openvpn/examples/easy-rsa/2.0...
Starting......: OpenVPN version.......: 2.1_rc11...
Starting......: OpenVPN version.......: 2.1_rc11...
Starting......: OpenVPN server config.: /etc/openvpn/server.conf
Starting......: OpenVPN server config.: /etc/openvpn/server.conf
loading /tmp/ip_forward
found 1
Starting......: OpenVPN IP Forwarding is enabled
Starting......: OpenVPN IP Forwarding is enabled
Starting......: OpenVPN server verify key "SRVEPNCELLIER.key" in /etc/artica-postfix/openvpn/keys directory
Starting......: OpenVPN server verify key "SRVEPNCELLIER.key" in /etc/artica-postfix/openvpn/keys directory
Starting......: OpenVPN Bridged is not set, change to tun
Starting......: OpenVPN Bridged is not set, change to tun
Starting......: OpenVPN building settings for SRVEPNCELLIER...
Starting......: OpenVPN linked to eth1 (192.168.7.1)...
Starting......: OpenVPN IP adding default route "192.168.7.0 255.255.255.0"
Starting......: OpenVPN IP pool from 10.8.0.2 to 10.8.0.254 mask:255.255.255.0
Starting......: OpenVPN IP bind 192.168.1.101
Starting......: OpenVPN building settings done.
/usr/sbin/openvpn --port 1194 --dev tun --server 10.8.0.0 255.255.255.0 --comp-lzo --local 192.168.1.101 --ca /etc/artica-postfix/openvpn/keys/ca.crt --dh /etc/artica-postfix/openvpn/keys/dh1024.pem --key /etc/artica-postfix/openvpn/keys/SRVEPNCELLIER.key --cert /etc/artica-postfix/openvpn/keys/SRVEPNCELLIER.crt --ifconfig-pool-persist /etc/artica-postfix/openvpn/ipp.txt --push "route 192.168.7.0 255.255.255.0" --client-to-client --verb 5 --daemon --writepid /var/run/openvpn/openvpn-server.pid --log /var/log/openvpn/openvpn.log >/tmp/artica-install-e90bb1994b8c9dc1abbb3bd2fd49a1a4-00000.tmp 2>&1
Starting......: OpenVPN Failed
Starting......: OpenVPN Failed
Starting......: OpenVPN cleaning iptables 0 rules
guidtz
 
Posts: 2007
Joined: Sat Jan 17, 2009 3:08 am
Location: Vendée
Artica servers number: 3
Linux System: Debian
Technical skills: A Linux System Administrator

Re: OpenVPN ne démarre pas au démarrage du serveur

New postby admin » Thu Apr 08, 2010 9:35 pm

pendant que artica-postfix démarre que vois-tu dans le syslog ?
User avatar
admin
Site Admin
 
Posts: 11946
Joined: Wed Oct 17, 2007 7:59 am
Location: France

Re: OpenVPN ne démarre pas au démarrage du serveur

New postby guidtz » Fri Apr 09, 2010 7:07 am

Voici ce que j'ai dans les logs ce matin :
Apr 9 08:59:00 srvepncellier ovpn-cmdline[2730]: Options error: Unrecognized option or missing parameter(s) in /etc/openvpn/cmdline.conf:2: ica-postfix/openvpn/keys/SRVEPNCELLIER.crt (2.1_rc11)
Apr 9 08:59:00 srvepncellier ovpn-cmdline[2730]: Use --help for more information.
Apr 9 08:59:14 srvepncellier artica-install[3343]: Starting......: OpenVPN IP Forwarding is enabled
Apr 9 09:00:04 srvepncellier artica-install[5942]: Starting......: OpenVPN IP Forwarding is enabled

voici ce que j'ai dans le fichier /etc/openvpn/cmdline.conf :
--port 1194 --dev tun --server 10.8.0.0 255.255.255.0 --comp-lzo --local 192.168.1.101 --ca /etc/artica-postfix/openvpn/keys/ca.crt --dh /etc/artica-postfix/openvpn/keys/dh1024.pem --key /etc/artica-postfix/openvpn/keys/SRVEPNCELLIER.key --cert /e tc/artica-postfix/openvpn/keys/SRVEPNCELLIER.crt --ifconfig-pool-persist /etc/artica-postfix/openvpn/ipp.txt --push "route 192.168.7.0 255.255.255.0" --client-to-client --verb 5 --daemon --writepid /var/run/openvpn/openvpn-server.pid --log /var/log/ openvpn/openvpn.log

srvepncellier:~# ls -la /etc/artica-postfix/openvpn/keys/SRVEPNCELLIER.crt
-rw------- 1 root root 4200 avr 8 11:34 /etc/artica-postfix/openvpn/keys/SRVEPNCELLIER.crt

Les logs d'Openvpn :
Fri Apr 9 09:00:04 2010 us=454121 OpenVPN 2.1_rc11 x86_64-pc-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] built on Sep 18 2008
Fri Apr 9 09:00:04 2010 us=454187 WARNING: --keepalive option is missing from server config
Fri Apr 9 09:00:04 2010 us=454257 NOTE: your local LAN uses the extremely common subnet address 192.168.0.x or 192.168.1.x. Be aware that this might create routing conflicts if you connect to the VPN server from public locations such as internet cafes that use the same subnet.
Fri Apr 9 09:00:04 2010 us=456706 Diffie-Hellman initialized with 1024 bit key
Fri Apr 9 09:00:04 2010 us=457158 /usr/bin/openssl-vulnkey -q -b 1024 -m <modulus omitted>
Fri Apr 9 09:00:04 2010 us=534257 TLS-Auth MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Fri Apr 9 09:00:04 2010 us=534340 TCP/UDP: Socket bind failed on local address 192.168.1.101:1194: Address already in use
Fri Apr 9 09:00:04 2010 us=534357 Exiting

Vois tu le pourquoi du comment ?

Slts
guidtz
 
Posts: 2007
Joined: Sat Jan 17, 2009 3:08 am
Location: Vendée
Artica servers number: 3
Linux System: Debian
Technical skills: A Linux System Administrator

Re: OpenVPN ne démarre pas au démarrage du serveur

New postby admin » Fri Apr 09, 2010 7:11 am

je vois ca :

"TCP/UDP: Socket bind failed on local address 192.168.1.101:1194: Address already in use"

fais ps -aux|grep openvpn
User avatar
admin
Site Admin
 
Posts: 11946
Joined: Wed Oct 17, 2007 7:59 am
Location: France

Re: OpenVPN ne démarre pas au démarrage du serveur

New postby guidtz » Fri Apr 09, 2010 7:17 am

root 2747 0.0 0.0 21176 1136 ? Ss 08:59 0:00 /usr/sbin/openvpn --writepid /var/run/openvpn.server.pid --daemon ovpn-server --cd /etc/openvpn --config /etc/openvpn/server.conf
root 14133 0.0 0.0 7240 856 pts/0 R+ 09:14 0:00 grep openvpn

et j'ai ça pour les ports :
srvepncellier:~# netstat -upnl | grep 1194
udp 0 0 192.168.1.101:1194 0.0.0.0:* 2747/openvpn

Et pourtant :
Open VPN: Arrêté
version: 2.1_rc11
guidtz
 
Posts: 2007
Joined: Sat Jan 17, 2009 3:08 am
Location: Vendée
Artica servers number: 3
Linux System: Debian
Technical skills: A Linux System Administrator

Re: OpenVPN ne démarre pas au démarrage du serveur

New postby admin » Fri Apr 09, 2010 8:25 am

j'ai l'impression qu'il s'agit d'un openvpn monté par un script init.d
User avatar
admin
Site Admin
 
Posts: 11946
Joined: Wed Oct 17, 2007 7:59 am
Location: France

Re: OpenVPN ne démarre pas au démarrage du serveur

New postby guidtz » Fri Apr 09, 2010 8:30 am

J'ai rien installé de plus, j'ai activé le VPN avec l'interface d'Artica via "Configuration du serveur OpenVPN"
guidtz
 
Posts: 2007
Joined: Sat Jan 17, 2009 3:08 am
Location: Vendée
Artica servers number: 3
Linux System: Debian
Technical skills: A Linux System Administrator

Re: OpenVPN ne démarre pas au démarrage du serveur

New postby admin » Fri Apr 09, 2010 3:27 pm

ya moyen de se connecter ?
User avatar
admin
Site Admin
 
Posts: 11946
Joined: Wed Oct 17, 2007 7:59 am
Location: France

Next

Return to OpenVPN

Who is online

Users browsing this forum: No registered users and 1 guest

cron