[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Réglage du réseau (suite)



Suite de mes aventures...

J'ai créé un fichier /etc/systemd/system/openvpn@.service.d/override.conf : 

[Unit]
Description=OpenVPN connection to %i
After=network.target

[Service]
ExecStart=
ExecStart=/usr/sbin/openvpn --daemon ovpn-%i --status /run/openvpn/%i.status 10 --config /etc/openvpn/client/%i.conf --auth-user-pass /etc/openvpn/auth/hma.auth
WorkingDirectory=/etc/openvpn

(le ExecStart en double me vient d'une lecture de StackExchange : pour
cette option précisément, il est nécessaire de vider la commande par
défaut avant de lui substituer une autre.)

Lorsque je lance la commande ci-dessus en ligne de commande (en
remplaçant %i par HMA, HMA.conf étant un lien symbolique vers celui des
fichiers de configuration fournis par HMA que je souhaite utiliser), 
tout se passe bien, je crée bien le tunnel qui va bien, et mon adresse 
IP par défaut est modifiée.

Par contre, quand je lance le script avec 'sudo systemctl start
openvpn@HMA', j'obtiens ça dans les logs (journalctl -f) :

juil. 11 19:16:41 Gaston sudo[14057]:     nico : TTY=pts/1 ; PWD=/etc/systemd ; USER=root ; COMMAND=/bin/systemctl start openvpn@HMA
juil. 11 19:16:41 Gaston sudo[14057]: pam_unix(sudo:session): session opened for user root by (uid=0)
juil. 11 19:16:41 Gaston systemd[1]: Starting OpenVPN connection to HMA...
juil. 11 19:16:41 Gaston ovpn-HMA[14060]: OpenVPN 2.4.0 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Jun 22 2017
juil. 11 19:16:41 Gaston systemd[1]: openvpn@HMA.service: PID file /run/openvpn/HMA.pid not readable (yet?) after start: No such file or directory
juil. 11 19:16:41 Gaston ovpn-HMA[14060]: library versions: OpenSSL 1.0.2l  25 May 2017, LZO 2.08
juil. 11 19:16:41 Gaston ovpn-HMA[14061]: TCP/UDP: Preserving recently used remote address: [AF_INET]5.62.38.12:553
juil. 11 19:16:41 Gaston ovpn-HMA[14061]: Socket Buffers: R=[212992->212992] S=[212992->212992]
juil. 11 19:16:41 Gaston ovpn-HMA[14061]: UDP link local: (not bound)
juil. 11 19:16:41 Gaston ovpn-HMA[14061]: UDP link remote: [AF_INET]5.62.38.12:553
juil. 11 19:16:41 Gaston ovpn-HMA[14061]: TLS: Initial packet from [AF_INET]5.62.38.12:553, sid=81f68ebc aa7f9a1c
juil. 11 19:16:41 Gaston ovpn-HMA[14061]: WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
juil. 11 19:16:41 Gaston ovpn-HMA[14061]: VERIFY OK: depth=1, C=UK, ST=London, L=London, O=Privax Ltd, OU=HMA Pro VPN, CN=hidemyass.com, emailAddress=info@privax.com
juil. 11 19:16:41 Gaston ovpn-HMA[14061]: VERIFY OK: nsCertType=SERVER
juil. 11 19:16:41 Gaston ovpn-HMA[14061]: VERIFY OK: depth=0, C=UK, ST=London, L=London, O=Privax Ltd, OU=HMA Pro VPN, CN=server, emailAddress=info@privax.com
juil. 11 19:16:41 Gaston ovpn-HMA[14061]: Control Channel: TLSv1.2, cipher TLSv1/SSLv3 DHE-RSA-AES256-GCM-SHA384, 2048 bit RSA
juil. 11 19:16:41 Gaston ovpn-HMA[14061]: [server] Peer Connection Initiated with [AF_INET]5.62.38.12:553
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: PUSH: Received control message: 'PUSH_REPLY,dhcp-option DNS 100.120.0.1,redirect-gateway def1,ping 9,ping-restart 30,explicit-exit-notify 1,route-gateway 100.120.248.1,topology subnet,redirect-gateway def1,ifconfig-ipv6 2001:db8:123::2/64 2001:db8:123::1,route-ipv6 2000::/3 2001:db8:123::1,explicit-exit-notify 2,ifconfig 100.120.248.193 255.255.252.0'
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: Option 'explicit-exit-notify' in [PUSH-OPTIONS]:5 is ignored by previous <connection> blocks
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: Option 'explicit-exit-notify' in [PUSH-OPTIONS]:11 is ignored by previous <connection> blocks
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: OPTIONS IMPORT: timers and/or timeouts modified
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: OPTIONS IMPORT: explicit notify parm(s) modified
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: OPTIONS IMPORT: --ifconfig/up options modified
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: OPTIONS IMPORT: route options modified
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: OPTIONS IMPORT: route-related options modified
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: Data Channel Encrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: Data Channel Decrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: ROUTE_GATEWAY 192.168.10.1/255.255.255.0 IFACE=enp3s0 HWADDR=44:8a:5b:99:7e:e1
juil. 11 19:16:42 Gaston systemd-networkd[426]: tun0: Gained carrier
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: GDG6: remote_host_ipv6=n/a
juil. 11 19:16:42 Gaston systemd-timesyncd[637]: Network configuration changed, trying to establish connection.
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: ROUTE6: default_gateway=UNDEF
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: TUN/TAP device tun0 opened
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: TUN/TAP TX queue length set to 100
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: do_ifconfig, tt->did_ifconfig_ipv6_setup=1
juil. 11 19:16:42 Gaston systemd-networkd[426]: tun0: Gained IPv6LL
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: /sbin/ip link set dev tun0 up mtu 1500
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: /sbin/ip addr add dev tun0 100.120.248.193/22 broadcast 100.120.251.255
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: /sbin/ip -6 addr add 2001:db8:123::2/64 dev tun0
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: /sbin/ip route add 5.62.38.12/32 via 192.168.10.1
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: ERROR: Linux route add command failed: external program exited with error status: 2
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: /sbin/ip route add 0.0.0.0/1 via 100.120.248.1
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: /sbin/ip route add 128.0.0.0/1 via 100.120.248.1
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: add_route_ipv6(2000::/3 -> 2001:db8:123::1 metric 1) dev tun0
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: /sbin/ip -6 route add 2000::/3 dev tun0 metric 1
juil. 11 19:16:42 Gaston ovpn-HMA[14061]: Initialization Sequence Completed
juil. 11 19:16:43 Gaston systemd-timesyncd[637]: Synchronized to time server 195.43.74.123:123 (0.debian.pool.ntp.org).
juil. 11 19:17:01 Gaston CRON[14081]: pam_unix(cron:session): session opened for user root by (uid=0)
juil. 11 19:17:01 Gaston CRON[14082]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
juil. 11 19:17:01 Gaston CRON[14081]: pam_unix(cron:session): session closed for user root
juil. 11 19:18:11 Gaston systemd[1]: openvpn@HMA.service: Start operation timed out. Terminating.
juil. 11 19:18:11 Gaston systemd[1]: openvpn@HMA.service: Killing process 14061 (openvpn) with signal SIGKILL.
juil. 11 19:18:11 Gaston systemd-networkd[426]: tun0: Lost carrier
juil. 11 19:18:11 Gaston systemd-timesyncd[637]: Network configuration changed, trying to establish connection.
juil. 11 19:18:11 Gaston systemd[1]: Failed to start OpenVPN connection to HMA.
juil. 11 19:18:11 Gaston systemd[1]: openvpn@HMA.service: Unit entered failed state.
juil. 11 19:18:11 Gaston systemd[1]: openvpn@HMA.service: Failed with result 'timeout'.
juil. 11 19:18:11 Gaston sudo[14057]: pam_unix(sudo:session): session closed for user root
juil. 11 19:18:11 Gaston systemd-timesyncd[637]: Synchronized to time server 195.43.74.123:123 (0.debian.pool.ntp.org).

donc un timeout, d'ailleurs, je ne récupère pas la main sur la ligne de
commande avant l'échec. Et là, je craque un petit peu : c'est quoi, le 
problème, docteur ?

Mes promesses de reconnaissance éternelle (ou à long terme pour les non 
croyants) tiennent toujours :-)

\bye

-- 

Nicolas FRANCOIS                      |  /\ 
http://nicolas.francois.free.fr       | |__|
				      X--/\\
We are the Micro$oft.		        _\_V
Resistance is futile.		    
You will be assimilated.         darthvader penguin

Attachment: pgpIpUlJRI2AW.pgp
Description: Signature digitale OpenPGP


Reply to: