logo Debian Debian Debian-France Debian-Facile Debian-fr.org Forum-Debian.fr Debian ? Communautés logo inclusivité

Debian-facile

Bienvenue sur Debian-Facile, site d'aide pour les nouveaux utilisateurs de Debian.

Vous n'êtes pas identifié(e).

#1 18-10-2017 17:05:57

ragamatrix
Membre
Distrib. : Debian buster/sid
Noyau : Linux 4.16.0-2-amd64
(G)UI : ...::o p e n b o x::...
Inscription : 12-07-2016

openvpn

Bonjour,

J'essaie de monter un vpn mais je rencontre des erreurs (j'ai suivi cette doc: https://debian-facile.org/doc:reseau:vp … le-serveur) :
Pour lancer le serveur je fais: openvpn /etc/openvpn/server.conf et j'obtiens:

root@debian:/etc/openvpn/easy-rsa# openvpn /etc/openvpn/server.conf
Wed Oct 18 16:33:00 2017 WARNING: cannot stat file 'ta.key': No such file or directory (errno=2)
Options error: --tls-auth fails with 'ta.key': No such file or directory
Options error: Please correct these errors.
Use --help for more information.
 



ou avec un fichier credentials:

root@debian:/etc/openvpn/easy-rsa# openvpn /etc/openvpn/credentials
Wed Oct 18 16:35:26 2017 WARNING: file '/etc/openvpn/credentials' is group or others accessible
Wed Oct 18 16:35:26 2017 OpenVPN 2.4.3 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Jun 30 2017
Wed Oct 18 16:35:26 2017 library versions: OpenSSL 1.0.2l  25 May 2017, LZO 2.08
Wed Oct 18 16:35:26 2017 WARNING: --ns-cert-type is DEPRECATED.  Use --remote-cert-tls instead.
Wed Oct 18 16:35:26 2017 TCP/UDP: Preserving recently used remote address: [AF_INET]212.129.2.185:1194
Wed Oct 18 16:35:26 2017 UDP link local: (not bound)
Wed Oct 18 16:35:26 2017 UDP link remote: [AF_INET]212.129.2.185:1194
Wed Oct 18 16:35:26 2017 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Wed Oct 18 16:35:26 2017 VERIFY OK: depth=1, C=GB, ST=LN, L=London, O=vpnsvc, OU=vpnsvc, CN=vpnsvc.com, name=vpnsvc, emailAddress=noc@vpnsvc.com
Wed Oct 18 16:35:26 2017 VERIFY OK: nsCertType=SERVER
Wed Oct 18 16:35:26 2017 VERIFY OK: depth=0, C=GB, ST=LN, L=London, O=vpnsvc, OU=vpnsvc, CN=vpnsvc, name=vpnsvc, emailAddress=noc@vpnsvc.com
Wed Oct 18 16:35:27 2017 Control Channel: TLSv1.2, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA
Wed Oct 18 16:35:27 2017 [vpnsvc] Peer Connection Initiated with [AF_INET]212.129.2.185:1194
Wed Oct 18 16:35:28 2017 AUTH: Received control message: AUTH_FAILED
Wed Oct 18 16:35:28 2017 SIGTERM[soft,auth-failure] received, process exiting
 



Je ne comprends pas plus la doc à la fin de configuration de serveur. Dans le fichier credentials je ne sais pas oú ajouter  l'identifiant et le mot de passe

Dernière modification par ragamatrix (18-10-2017 17:09:34)

Hors ligne

#2 18-10-2017 21:29:45

sogal
Black Metal Modo
Lieu : Nord Isère
Distrib. : openSUSE Leap 42.3
Noyau : Linux 4.4.76
(G)UI : GNOME
Inscription : 09-05-2013
Site Web

Re : openvpn

Pour ta 1ère erreur, tu as dans ta conf une directive "--tls-auth" qui cherche un fichier de clé ta.key qu'il ne trouve pas. Indique le chemin complet de cette clé ou place la dans le même dossier que server.conf.

1485418338.png Hello IT ! Have you tried turning it off and on again ?

Hors ligne

#3 19-10-2017 07:43:52

ragamatrix
Membre
Distrib. : Debian buster/sid
Noyau : Linux 4.16.0-2-amd64
(G)UI : ...::o p e n b o x::...
Inscription : 12-07-2016

Re : openvpn

Merci sogal, je n'ai pas trouvé ce fichier, j'ai donc commenté la ligne concernée. Je crois que ce n'était pas non plus la bonne solution.

root@debian:/home/raphix# openvpn /etc/openvpn/server.conf
Thu Oct 19 08:37:29 2017 OpenVPN 2.4.3 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Jun 30 2017
Thu Oct 19 08:37:29 2017 library versions: OpenSSL 1.0.2l  25 May 2017, LZO 2.08
Thu Oct 19 08:37:29 2017 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.
Thu Oct 19 08:37:29 2017 Diffie-Hellman initialized with 2048 bit key
Thu Oct 19 08:37:29 2017 ROUTE_GATEWAY 192.168.0.1/255.255.255.0 IFACE=eth0 HWADDR=d0:50:99:76:8f:06
Thu Oct 19 08:37:29 2017 TUN/TAP device tun1 opened
Thu Oct 19 08:37:29 2017 TUN/TAP TX queue length set to 100
Thu Oct 19 08:37:29 2017 do_ifconfig, tt->did_ifconfig_ipv6_setup=0
Thu Oct 19 08:37:29 2017 /sbin/ip link set dev tun1 up mtu 1500
Thu Oct 19 08:37:29 2017 /sbin/ip addr add dev tun1 local 10.8.0.1 peer 10.8.0.2
Thu Oct 19 08:37:29 2017 /sbin/ip route add 10.8.0.0/24 via 10.8.0.2
RTNETLINK answers: File exists
Thu Oct 19 08:37:29 2017 ERROR: Linux route add command failed: external program exited with error status: 2
Thu Oct 19 08:37:29 2017 Could not determine IPv4/IPv6 protocol. Using AF_INET
Thu Oct 19 08:37:29 2017 Socket Buffers: R=[212992->212992] S=[212992->212992]
Thu Oct 19 08:37:29 2017 TCP/UDP: Socket bind failed on local address [AF_INET][undef]:1194: Address already in use
Thu Oct 19 08:37:29 2017 Exiting due to fatal error
Thu Oct 19 08:37:29 2017 Closing TUN/TAP interface
Thu Oct 19 08:37:29 2017 /sbin/ip addr del dev tun1 local 10.8.0.1 peer 10.8.0.2
root@debian:/home/raphix# service openvpn stop
root@debian:/home/raphix#
 

Hors ligne

Pied de page des forums