Tout ce qui concerne internet
Répondre

Openvpn : impossible d'activer le client

#1Messageil y a 7 ans

Mon hébergeur, très sympa, me propose un vpn dans son plan.
Sauf que...
Impossible d'y accéder que ce soit en lt2p ou en openvpn.
Je cherche du coup les questions et avis d'un expert !

Openvpn : impossible d'activer le client

#2Messageil y a 7 ans

Salut,

Pour la connexion en openvpn ton hébergeur de donne quoi comme fichiers de configuration ?

Fichier .ovpn et fichier .ca ou .crt ?

Quel est le nom de l'hébergeur ?

Openvpn : impossible d'activer le client

#3Messageil y a 7 ans

Un .ovpn que j'ai vérifié avec lui.
Je me suis demandé si ce n'était pas un souci de firewall ou de box.
J'ai passé un

sudo ufw allow 1194
mais ça n'a rien changé
De mon côté j'ai installé openvpn et networkmanager-openvpn

Openvpn : impossible d'activer le client

#4Messageil y a 7 ans

fais une capture de ta page de config dans networkmanager, en masquant les passerelles et login.

Openvpn : impossible d'activer le client

#5Messageil y a 7 ans

Ce n'est pas très verbeux !

Image

(je trouve curieux que les mdp et secret que j'ai bien saisis restent blanc, y compris quand je coche "afficher"

Le fichier .opvn :

###############################################################################
# OpenVPN 2.0 Sample Configuration File
# !!! YOU HAVE TO REVIEW IT BEFORE USE AND MODIFY IT AS NECESSARY !!!
#
# However, before you try it, you should review the descriptions of the file
# to determine the necessity to modify to suitable for your real environment.
# If necessary, you have to modify a little adequately on the file.
# For example, the IP address or the hostname as a destination VPN Server
# should be confirmed.
#
# Note that to use OpenVPN 2.0, you have to put the certification file of
# the destination VPN Server on the OpenVPN Client computer when you use this
# config file. Please refer the below descriptions carefully.


###############################################################################
# Specify the type of the layer of the VPN connection.
#
# To connect to the VPN Server as a "Remote-Access VPN Client PC",
#  specify 'dev tun'. (Layer-3 IP Routing Mode)
#
# To connect to the VPN Server as a bridging equipment of "Site-to-Site VPN",
#  specify 'dev tap'. (Layer-2 Ethernet Bridgine Mode)

dev tun


###############################################################################
# Specify the underlying protocol beyond the Internet.
# Note that this setting must be correspond with the listening setting on
# the VPN Server.
#
# Specify either 'proto tcp' or 'proto udp'.

proto udp


###############################################################################
# The destination hostname / IP address, and port number of
# the target VPN Server.
#
# You have to specify as 'remote <HOSTNAME> <PORT>'. You can also
# specify the IP address instead of the hostname.
#
# Note that the auto-generated below hostname are a "auto-detected
# IP address" of the VPN Server. You have to confirm the correctness
# beforehand.
#
# When you want to connect to the VPN Server by using TCP protocol,
# the port number of the destination TCP port should be same as one of
# the available TCP listeners on the VPN Server.
#
# When you use UDP protocol, the port number must same as the configuration
# setting of "OpenVPN Server Compatible Function" on the VPN Server.

# Note: The below hostname is came from the Dynamic DNS Client function
#       which is running on the VPN Server. If you don't want to use
#       the Dynamic DNS hostname, replace it to either IP address or
#       other domain's hostname.

remote vpn.trucmachin.net 1194


###############################################################################
# The HTTP/HTTPS proxy setting.
#
# Only if you have to use the Internet via a proxy, uncomment the below
# two lines and specify the proxy address and the port number.
# In the case of using proxy-authentication, refer the OpenVPN manual.

;http-proxy-retry
;http-proxy [proxy server] [proxy port]


###############################################################################
# The encryption and authentication algorithm.
#
# Default setting is good. Modify it as you prefer.
# When you specify an unsupported algorithm, the error will occur.
#
# The supported algorithms are as follows:
#  cipher: [NULL-CIPHER] NULL AES-128-CBC AES-192-CBC AES-256-CBC BF-CBC
#          CAST-CBC CAST5-CBC DES-CBC DES-EDE-CBC DES-EDE3-CBC DESX-CBC
#          RC2-40-CBC RC2-64-CBC RC2-CBC
#  auth:   SHA SHA1 MD5 MD4 RMD160

cipher AES-128-CBC
auth SHA1


###############################################################################
# Other parameters necessary to connect to the VPN Server.
#
# It is not recommended to modify it unless you have a particular need.

resolv-retry infinite
nobind
persist-key
persist-tun
client
verb 3
auth-user-pass


###############################################################################
# The certificate file of the destination VPN Server.
#
# The CA certificate file is embedded in the inline format.
# You can replace this CA contents if necessary.
# Please note that if the server certificate is not a self-signed, you have to
# specify the signer's root certificate (CA) here.

<ca>
-----BEGIN CERTIFICATE-----
Lorem Ipsum et tout
-----END CERTIFICATE-----

</ca>

Openvpn : impossible d'activer le client

#6Messageil y a 7 ans

j'ai le même type de fichier que toi, avec trois hashs au lieu d'un :

<ca>
-----BEGIN CERTIFICATE-----
bla bla bla
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
bla bla bla
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN RSA PRIVATE KEY-----
bla bla bla
-----END RSA PRIVATE KEY-----
</key>

Donc j'ai du importer trois petits fichiers dans network manager :
le certificat de l'utilisateur
le certificat du CA
la clé privée

Puis je mets mon login et mon mot de passe, authentification par mot de passe avec certificat (TLS)
De plus, il faut bien décocher l'option "Mettre à disposition des autres utilisateurs" sinon ça marche pas.
Dans ton cas, tu n'as que le certificat du CA dans le .ovpn, donc tu dois avoir un bout de fichier fourni par ton fournisseur.
Je maîtrises pas, je raisonne par comparaison avec mes paramètres qui fonctionnent.

Openvpn : impossible d'activer le client

#7Messageil y a 7 ans

Merci ! Je vérifie cela avec mon hébergeur/fournisseur vpn ;)

Openvpn : impossible d'activer le client

#8Messageil y a 7 ans

..Alors.. il me dit à juste titre que la clef privée est... privée.
Donc je suis toujours scotché.

Openvpn : impossible d'activer le client

#9Messageil y a 7 ans

Je viens de me rendre compte que quoi-qu’ayant une config qui semble apparaître dans networkmanager, je n'ai pas de /etc/openvpn/client.conf : est-ce normal ?

Openvpn : impossible d'activer le client

#10Messageil y a 7 ans

Normal :

To: arch-announce@archlinux.org
Subject: [arch-announce] OpenVPN 2.4.0 update requires administrative
   interaction
Message-ID: <mailman.2.1483099201.4211.arch-announce@archlinux.org>
Content-Type: text/plain; charset="us-ascii"

The upgrade to OpenVPN 2.4.0 makes changes that are incompatible with previous
configurations. Take **special care** if you depend on VPN connectivity for
**remote access**! Administrative interaction is required:

  * Configuration is expected in sub directories now. Move your files from
`/etc/openvpn/` to `/etc/openvpn/server/` or `/etc/openvpn/client/`.

  * The plugin lookup path changed, remove extra `plugins/` from relative paths.

  * The systemd unit `openvpn@.service` was replaced with `openvpn-
client@.service` and `openvpn-server@.service`. Restart and reenable
accordingly.

This does not affect the functionality of `networkmanager`, `connman` or
`qopenvpn`.

URL: https://www.archlinux.org/news/openvpn-240-update-requires-administrative-interaction/


Donc si tu passe par un fichier à importer dans network-manager, /etc/openvpn/client ou /server reste vide.
Je reste persuadé que tu as un probleme avec le fichier du tiers authentificateur (CA) à importer dans network-manager.

Openvpn : impossible d'activer le client

#11Messageil y a 7 ans

Alors merci, tu avais raison !
Mon très sympa hébergeur s'est décarcassé et m'a fourni un .ovpn sur mesure qui a d'abord coincé car j'avais oublié le sudo avant

openvpn --config tralala.ovpn
.

Mais... https://www.dnsleaktest.com/ me dit que je ne suis que mi-transparent, ne dois-je pas aller raconter un truc (quoi ?) à mon resolv.conf ?
Et... pour le moment networkmanager coince toujours (because il n'est pas root je suppose) là que puis je faire ? me déclarer user quelque part ?
Répondre