Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2722 connectés 

  FORUM HardWare.fr
  Systèmes & Réseaux Pro
  Réseaux

  OPENVPN - Problème de routage

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

OPENVPN - Problème de routage

n°149524
bodbod
Planquez vous, bodbod arrive..
Posté le 21-10-2017 à 12:05:42  profilanswer
 

Bonjour à tous,
 
Je me permet de vous solliciter pour un problème de routage dans la petite entreprise de mon beau frère.
 
Actuellement, il a un logiciel client/serveur qui fonctionne sur le réseau local.
Le but, est de pouvoir s'y connecter a distance.
 
J'ai donc installé OpenVPN sur le serveur, configuré le tout et cela a fonctionné (je pouvais naviguer sur le serveur).
 
Puis pour prévoir les conflits d'IP, j'ai passé le LAN en 192.168.5.x (plutôt que 192.168.1.x)
Depuis, je n'arrive plus a pinger les machines côté serveur (peut être un coïncidence :D )
 
OpenVPN se connecte bien mais après je n'arrive pas a joindre le réseau en face.
J'arrive a pinger 10.8.0.6 mais c'est tout.
 
Pouvez vous m'aiguiller sur mon problème ?
 
Merci.
 
Infos:
Livebox pro v3
PC serveur en 192.168.5.2
OpenVPN en 10.8.0.1
Client en 192.168.0.x et 10.8.0.6
 
Config serveur :

port 1723
proto udp
dev tun
ca "C:\\[...]ca.crt"
cert "C:\\[...]Serveur.crt"
key "C:\\[...]Serveur.key"
dh "C:\\[...]dh4096.pem"
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "route 192.168.5.0 255.255.255.0"
;push "dhcp-option WINS 10.8.0.1" (m'avais permis d’appeler le serveur par son nom lors de mes premiers tests)
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3


Client :

client
dev tun
proto udp
remote xxxxx.dtdns.net 1723
resolv-retry infinite
nobind
persist-key
persist-tun
ca "D:\\[...]\\ca.crt"
cert "D:\\[...].crt"
key "D:\\[...].key"
ns-cert-type server
comp-lzo
verb 3


Table routage :

IPv4 Table de routage
===========================================================================
Itinéraires actifs :
Destination réseau    Masque réseau  Adr. passerelle   Adr. interface Métrique
          0.0.0.0          0.0.0.0    192.168.0.254     192.168.0.15     25
         10.8.0.1  255.255.255.255         10.8.0.5         10.8.0.6     30
         10.8.0.4  255.255.255.252         On-link          10.8.0.6    286
         10.8.0.6  255.255.255.255         On-link          10.8.0.6    286
         10.8.0.7  255.255.255.255         On-link          10.8.0.6    286
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
      192.168.0.0    255.255.255.0         On-link      192.168.0.15    281
     192.168.0.15  255.255.255.255         On-link      192.168.0.15    281
    192.168.0.255  255.255.255.255         On-link      192.168.0.15    281
      192.168.5.0    255.255.255.0         10.8.0.5         10.8.0.6     30
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
        224.0.0.0        240.0.0.0         On-link          10.8.0.6    286
        224.0.0.0        240.0.0.0         On-link      192.168.0.15    281
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  255.255.255.255  255.255.255.255         On-link          10.8.0.6    286
  255.255.255.255  255.255.255.255         On-link      192.168.0.15    281
===========================================================================


---------------
http://www.menuiseriemerceron.fr - http://www.atlantiquecoloration.fr
mood
Publicité
Posté le 21-10-2017 à 12:05:42  profilanswer
 

n°149592
rip7474
Posté le 25-10-2017 à 21:56:30  profilanswer
 

Salut,
Pourquoi dans la table de routage as-tu la passerelle 10.8.0.5 pour atteindre le réseau 192.168.5.0 ?
 
 192.168.5.0    255.255.255.0         10.8.0.5         10.8.0.6     30

n°149593
bodbod
Planquez vous, bodbod arrive..
Posté le 25-10-2017 à 22:42:43  profilanswer
 

rip7474 a écrit :

Salut,
Pourquoi dans la table de routage as-tu la passerelle 10.8.0.5 pour atteindre le réseau 192.168.5.0 ?
 
 192.168.5.0    255.255.255.0         10.8.0.5         10.8.0.6     30

Bonjour rip7474,
Je ne sais pas d'ou vient l'adresse *.5
Elle doit être gérée par OpenVPN.

n°149613
rip7474
Posté le 26-10-2017 à 15:15:52  profilanswer
 

Salut,
Sur la page suivante, regarde la section qui commence par "First we need to be sure that IP forwarding is enabled. Very often this is disabled by default."
 
https://community.openvpn.net/openv [...] AndRouting

n°149621
bodbod
Planquez vous, bodbod arrive..
Posté le 27-10-2017 à 09:29:46  profilanswer
 

Bonjour,
Les 2  machines sont sous windows.
Serveur : Win8.1
Client : testé en Win10 et XP
 
A partir de ton article, j'ai trouvé l'équivalent windows
J'ai donc activé sur le serveur via la clé : HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\Tcpip\Parameters\IPEnableRouter
Le service de routage lui est bien en automatique et démarré.
 
Mais pas mieux
 
Je ne sais pas si ca peut aider
 
Client :

Fri Oct 27 08:54:53 2017 OpenVPN 2.2.2 Win32-MSVC++ [SSL] [LZO2] [PKCS11] built on Dec 15 2011
Fri Oct 27 08:54:53 2017 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Fri Oct 27 08:54:53 2017 LZO compression initialized
Fri Oct 27 08:54:53 2017 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Fri Oct 27 08:54:53 2017 Socket Buffers: R=[65536->65536] S=[65536->65536]
Fri Oct 27 08:54:55 2017 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Fri Oct 27 08:54:55 2017 Local Options hash (VER=V4): '41690919'
Fri Oct 27 08:54:55 2017 Expected Remote Options hash (VER=V4): '530fdded'
Fri Oct 27 08:54:55 2017 UDPv4 link local: [undef]
Fri Oct 27 08:54:55 2017 UDPv4 link remote: 1.2.3.4:1723
Fri Oct 27 08:54:56 2017 TLS: Initial packet from 1.2.3.4:1723, sid=151b9d9a c9890818
Fri Oct 27 08:54:56 2017 VERIFY OK: depth=1, /C=FR/ST=44/L=LaMar/O=OpenVPN/OU=MeMer/CN=FabMer/name=MeMer/emailAddress=a.b@c.com
Fri Oct 27 08:54:56 2017 VERIFY OK: nsCertType=SERVER
Fri Oct 27 08:54:56 2017 VERIFY OK: depth=0, /C=FR/ST=44/L=LaMar/O=OpenVPN/OU=MeMer/CN=serveur/name=MeMer/emailAddress=a.b@c.com
Fri Oct 27 08:55:01 2017 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Fri Oct 27 08:55:01 2017 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Fri Oct 27 08:55:01 2017 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Fri Oct 27 08:55:01 2017 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Fri Oct 27 08:55:01 2017 Control Channel: TLSv1, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-SHA, 4096 bit RSA
Fri Oct 27 08:55:01 2017 [serveur] Peer Connection Initiated with 1.2.3.4:1723
Fri Oct 27 08:55:03 2017 SENT CONTROL [serveur]: 'PUSH_REQUEST' (status=1)
Fri Oct 27 08:55:04 2017 PUSH: Received control message: 'PUSH_REPLY,route 192.168.5.0 255.255.255.0,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5'
Fri Oct 27 08:55:04 2017 OPTIONS IMPORT: timers and/or timeouts modified
Fri Oct 27 08:55:04 2017 OPTIONS IMPORT: --ifconfig/up options modified
Fri Oct 27 08:55:04 2017 OPTIONS IMPORT: route options modified
Fri Oct 27 08:55:04 2017 ROUTE default_gateway=192.168.0.254
Fri Oct 27 08:55:04 2017 TAP-WIN32 device [Ethernet 2] opened: \\.\Global\{A88DA3F8-4A82-4A28-82E4-CFDFD31D612B}.tap
Fri Oct 27 08:55:04 2017 TAP-Win32 Driver Version 9.9  
Fri Oct 27 08:55:04 2017 TAP-Win32 MTU=1500
Fri Oct 27 08:55:04 2017 Notified TAP-Win32 driver to set a DHCP IP/netmask of 10.8.0.6/255.255.255.252 on interface {A88DA3F8-4A82-4A28-82E4-CFDFD31D612B} [DHCP-serv: 10.8.0.5, lease-time: 31536000]
Fri Oct 27 08:55:04 2017 Successful ARP Flush on interface [11] {A88DA3F8-4A82-4A28-82E4-CFDFD31D612B}
Fri Oct 27 08:55:09 2017 TEST ROUTES: 2/2 succeeded len=2 ret=1 a=0 u/d=up
Fri Oct 27 08:55:09 2017 C:\WINDOWS\system32\route.exe ADD 192.168.5.0 MASK 255.255.255.0 10.8.0.5
Fri Oct 27 08:55:09 2017 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=30 and dwForwardType=4
Fri Oct 27 08:55:09 2017 Route addition via IPAPI succeeded [adaptive]
Fri Oct 27 08:55:09 2017 C:\WINDOWS\system32\route.exe ADD 10.8.0.1 MASK 255.255.255.255 10.8.0.5
Fri Oct 27 08:55:09 2017 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=30 and dwForwardType=4
Fri Oct 27 08:55:09 2017 Route addition via IPAPI succeeded [adaptive]
Fri Oct 27 08:55:09 2017 Initialization Sequence Completed


 
Serveur :

Fri Oct 27 09:14:46 2017 OpenVPN 2.4.3 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] built on Jul 14 2017
Fri Oct 27 09:14:46 2017 Windows version 6.2 (Windows 8 or greater) 64bit
Fri Oct 27 09:14:46 2017 library versions: OpenSSL 1.0.2l  25 May 2017, LZO 2.10
Fri Oct 27 09:14:46 2017 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25344
Fri Oct 27 09:14:46 2017 Need hold release from management interface, waiting...
Fri Oct 27 09:14:46 2017 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25344
Fri Oct 27 09:14:46 2017 MANAGEMENT: CMD 'state on'
Fri Oct 27 09:14:46 2017 MANAGEMENT: CMD 'log all on'
Fri Oct 27 09:14:46 2017 MANAGEMENT: CMD 'echo all on'
Fri Oct 27 09:14:46 2017 MANAGEMENT: CMD 'hold off'
Fri Oct 27 09:14:46 2017 MANAGEMENT: CMD 'hold release'
Fri Oct 27 09:14:47 2017 Diffie-Hellman initialized with 4096 bit key
Fri Oct 27 09:14:47 2017 interactive service msg_channel=0
Fri Oct 27 09:14:47 2017 ROUTE_GATEWAY 192.168.5.1/255.255.255.0 I=3 HWADDR=f8:0f:41:b0:4d:ab
Fri Oct 27 09:14:47 2017 open_tun
Fri Oct 27 09:14:47 2017 TAP-WIN32 device [Ethernet 2] opened: \\.\Global\{51E7DECF-2563-49C7-A243-4F8AAEE82602}.tap
Fri Oct 27 09:14:47 2017 TAP-Windows Driver Version 9.21  
Fri Oct 27 09:14:47 2017 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.8.0.1/255.255.255.252 on interface {51E7DECF-2563-49C7-A243-4F8AAEE82602} [DHCP-serv: 10.8.0.2, lease-time: 31536000]
Fri Oct 27 09:14:47 2017 Sleeping for 10 seconds...
Fri Oct 27 09:14:57 2017 Successful ARP Flush on interface [16] {51E7DECF-2563-49C7-A243-4F8AAEE82602}
Fri Oct 27 09:14:57 2017 do_ifconfig, tt->did_ifconfig_ipv6_setup=0
Fri Oct 27 09:14:57 2017 MANAGEMENT: >STATE:1509088497,ASSIGN_IP,,10.8.0.1,,,,
Fri Oct 27 09:14:57 2017 MANAGEMENT: >STATE:1509088497,ADD_ROUTES,,,,,,
Fri Oct 27 09:14:57 2017 C:\Windows\system32\route.exe ADD 10.8.0.0 MASK 255.255.255.0 10.8.0.2
Fri Oct 27 09:14:57 2017 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=20 and dwForwardType=4
Fri Oct 27 09:14:57 2017 Route addition via IPAPI succeeded [adaptive]
Fri Oct 27 09:14:57 2017 Could not determine IPv4/IPv6 protocol. Using AF_INET6
Fri Oct 27 09:14:57 2017 Socket Buffers: R=[65536->65536] S=[65536->65536]
Fri Oct 27 09:14:57 2017 setsockopt(IPV6_V6ONLY=0)
Fri Oct 27 09:14:57 2017 UDPv6 link local (bound): [AF_INET6][undef]:1723
Fri Oct 27 09:14:57 2017 UDPv6 link remote: [AF_UNSPEC]
Fri Oct 27 09:14:57 2017 MULTI: multi_init called, r=256 v=256
Fri Oct 27 09:14:57 2017 IFCONFIG POOL: base=10.8.0.4 size=62, ipv6=0
Fri Oct 27 09:14:57 2017 ifconfig_pool_read(), in='DELL,10.8.0.4', TODO: IPv6
Fri Oct 27 09:14:57 2017 succeeded -> ifconfig_pool_set()
Fri Oct 27 09:14:57 2017 IFCONFIG POOL LIST
Fri Oct 27 09:14:57 2017 DELL,10.8.0.4
Fri Oct 27 09:14:57 2017 Initialization Sequence Completed
Fri Oct 27 09:14:57 2017 MANAGEMENT: >STATE:1509088497,CONNECTED,SUCCESS,10.8.0.1,,,,
Fri Oct 27 09:15:07 2017 91.161.20.10 TLS: Initial packet from [AF_INET6]::ffff:91.161.20.10:43095, sid=b76b6bcb f7602aad
Fri Oct 27 09:15:13 2017 91.161.20.10 VERIFY OK: depth=1, C=FR, ST=44, L=LaMar, O=OpenVPN, OU=MeMer, CN=FabMer, name=MeMer, emailAddress=a.b@c.com
Fri Oct 27 09:15:13 2017 91.161.20.10 VERIFY OK: depth=0, C=FR, ST=44, L=LaMar, O=OpenVPN, OU=MeMer, CN=DELL, name=MeMer, emailAddress=a.b@c.com
Fri Oct 27 09:15:14 2017 91.161.20.10 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Fri Oct 27 09:15:14 2017 91.161.20.10 WARNING: INSECURE cipher with block size less than 128 bit (64 bit).  This allows attacks like SWEET32.  Mitigate by using a --cipher with a larger block size (e.g. AES-256-CBC).
Fri Oct 27 09:15:14 2017 91.161.20.10 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Fri Oct 27 09:15:14 2017 91.161.20.10 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Fri Oct 27 09:15:14 2017 91.161.20.10 WARNING: INSECURE cipher with block size less than 128 bit (64 bit).  This allows attacks like SWEET32.  Mitigate by using a --cipher with a larger block size (e.g. AES-256-CBC).
Fri Oct 27 09:15:14 2017 91.161.20.10 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Fri Oct 27 09:15:14 2017 91.161.20.10 WARNING: cipher with small block size in use, reducing reneg-bytes to 64MB to mitigate SWEET32 attacks.
Fri Oct 27 09:15:14 2017 91.161.20.10 Control Channel: TLSv1, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-SHA, 4096 bit RSA
Fri Oct 27 09:15:14 2017 91.161.20.10 [DELL] Peer Connection Initiated with [AF_INET6]::ffff:91.161.20.10:43095
Fri Oct 27 09:15:14 2017 DELL/91.161.20.10 MULTI_sva: pool returned IPv4=10.8.0.6, IPv6=(Not enabled)
Fri Oct 27 09:15:14 2017 DELL/91.161.20.10 MULTI: Learn: 10.8.0.6 -> DELL/91.161.20.10
Fri Oct 27 09:15:14 2017 DELL/91.161.20.10 MULTI: primary virtual IP for DELL/91.161.20.10: 10.8.0.6
Fri Oct 27 09:15:17 2017 DELL/91.161.20.10 PUSH: Received control message: 'PUSH_REQUEST'
Fri Oct 27 09:15:17 2017 DELL/91.161.20.10 SENT CONTROL [DELL]: 'PUSH_REPLY,route 192.168.5.0 255.255.255.0,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5' (status=1)


Message édité par bodbod le 27-10-2017 à 09:30:55

---------------
http://www.menuiseriemerceron.fr - http://www.atlantiquecoloration.fr
n°149638
bodbod
Planquez vous, bodbod arrive..
Posté le 30-10-2017 à 17:52:21  profilanswer
 

Bonjour,
Je viens de trouver le problème.
C’était le pare feu windows côté serveur  :sweat:  
Je n'avais pas revérifié car je pensais vraiment l'avoir désactivé.
Donc je peux bien naviguer sur le réseau maintenant.
Merci.


Message édité par bodbod le 30-10-2017 à 18:18:17

---------------
http://www.menuiseriemerceron.fr - http://www.atlantiquecoloration.fr

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Systèmes & Réseaux Pro
  Réseaux

  OPENVPN - Problème de routage

 

Sujets relatifs
Problème de sauvegarde d'une VM avec VeeamNVR Airvision - problème
Urgent : OpenVpn sur edgerouteurcomment eliminer le probleme connect a smart card
Problème pour joindre un 2° QNAP au domaine LDAPProbleme reseau/bureau a distance
[résolu]Problème agrégation de ports entre switch Netgear et NASProbleme Installation Acces 2010
résolu --MDT - problème de déploiementOpenVPN et problème de routage !
Plus de sujets relatifs à : OPENVPN - Problème de routage


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR