Bonjour tout le monde,
j'ai un souci de configuration vpn avec mon synology ds214+ connecté à mon routeur d-link dsr-250n.
Pour résumer j'ai connecté mon synology sur mon réseau vpn distant (configuration client). Tout fonctionne à merveille, la configuration de mon openvpn s'est fait sans problème: depuis le synology (en ssh) je peux atteindre toutes les machines de mon vpn.
Le souci vient du fait que je veux que mes ordinateurs locaux (192.168.1.0/24) aient accès à mon réseau vpn 10.9.0.0/24 voir à 10.9.1.0/24.
Je vous préviens je suis une bille en réseau, donc je vais faire du mieux que je peux pour décrire mon souci:
le réseau local: 192.168.1.0/24
le routeur: 192.168.1.1
le synology: 192.168.1.116
le réseau distant via vpn: 10.9.0.0/24
le serveur vpn distant via vpn: 10.9.0.1
une machine locale qui aimerait accéder à 10.9.0.1 (et le reste): 192.168.1.101
ma paire de connection vpn: 10.9.0.11 (distant) et 10.9.0.12 (local)
* Pour se faire j'ai créé une route statique sur mon routeur d-link:
-> 10.9.0.0 255.255.255.0 getway 192.168.1.116
* J'ai aussi créé une route statique sur mon synology lors de l'initialisation de la connexion vpn (j'ai trouvé ca sur un forum):
-> 10.9.0.0 255.255.255.0 getway 10.9.0.11
=> lorsque je fais un ping de 10.9.0.12 depuis 192.168.1.101 ca fonctionne, mais pas 10.9.0.1
=> lorsque je fais un traceroute de 10.9.0.1 depuis 192.168.1.101 ca tourne en rond:
root@strapdev:/# traceroute 10.9.0.1
traceroute to 10.9.0.1 (10.9.0.1), 30 hops max, 60 byte packets
1 NEOLEDGE_LAN (192.168.1.1) 0.953 ms 1.255 ms 1.250 ms
2 Synology.local (192.168.1.116) 2.027 ms 2.023 ms 2.079 ms
3 * * *
4 * * *
...
# Voici ma table de routage du routeur (192.168.1.1):
D-Link DSR> util system_check display_IPV4_routingtable
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
127.0.0.1 127.0.0.1 255.255.255.255 UGH 1 0 0 lo
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 bdg1
192.168.1.0 192.168.1.1 255.255.255.0 UG 1 0 0 bdg1
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 bdgWAN1
192.168.0.0 192.168.0.50 255.255.255.0 UG 1 0 0 bdgWAN1
10.9.0.0 192.168.1.116 255.255.255.0 UG 15 0 0 bdg1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.0.254 0.0.0.0 UG 0 0 0 bdgWAN1
# Voici ma table de routage du synology (102.168.1.116):
root@Synology:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default NEOLEDGE_LAN 0.0.0.0 UG 0 0 0 eth0
10.9.0.0 10.9.0.11 255.255.255.0 UG 0 0 0 tun0
10.9.0.11 * 255.255.255.255 UH 0 0 0 tun0
10.9.1.0 10.9.0.11 255.255.255.0 UG 0 0 0 tun0
10.9.33.0 10.9.0.11 255.255.255.0 UG 0 0 0 tun0
37.59.##.## NEOLEDGE_LAN 255.255.255.255 UGH 0 0 0 eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
192.168.1.1 * 255.255.255.255 UH 0 0 0 eth0
Je me demande si le problème ne viendrait pas de ma configuration openvpn. Voici mon fichier (ip publique marqué):
##############################################
# Sample client-side OpenVPN 2.0 config file #
# for connecting to multi-client server. #
# #
# This configuration can be used by multiple #
# clients, however each client should have #
# its own cert and key files. #
# #
# On Windows, you might want to rename this #
# file so it has a .ovpn extension #
##############################################
client
dev tun
# Windows needs the TAP-Win32 adapter name
# from the Network Connections panel
# if you have more than one. On XP SP2,
# you may need to disable the firewall
# for the TAP adapter.
;dev-node MyTap
# Are we connecting to a TCP or
# UDP server? Use the same setting as
# on the server.
;proto tcp
proto udp
# The hostname/IP and port of the server.
# You can have multiple remote entries
# to load balance between the servers.
# -> *.* j ai caché l'ip public du vpn
remote 37.59.*.* 1194
# Choose a random host from the remote
# list for load-balancing. Otherwise
# try hosts in the order specified.
;remote-random
# Keep trying indefinitely to resolve the
# host name of the OpenVPN server. Very useful
# on machines which are not permanently connected
# to the internet such as laptops.
resolv-retry infinite
# Most clients don't need to bind to
# a specific local port number.
nobind
# Downgrade privileges after initialization (non-Windows only)
;user nobody
;group nogroup
# Try to preserve some state across restarts.
persist-key
persist-tun
# If you are connecting through an
# HTTP proxy to reach the actual OpenVPN
# server, put the proxy server/IP and
# port number here. See the man page
# if your proxy server requires
# authentication.
;http-proxy-retry # retry on connection failures
;http-proxy [proxy server] [proxy port #]
# Wireless networks often produce a lot
# of duplicate packets. Set this flag
# to silence duplicate packet warnings.
;mute-replay-warnings
# SSL/TLS parms.
# See the server config file for more
# description. It's best to use
# a separate .crt/.key file pair
# for each client. A single ca
# file can be used for all clients.
ca ca.crt
cert rdna.crt
key rdna.key
# Verify server certificate by checking
# that the certicate has the nsCertType
# field set to "server". This is an
# important precaution to protect against
# a potential attack discussed here:
# http://openvpn.net/howto.html#mitm
#
# To use this feature, you will need to generate
# your server certificates with the nsCertType
# field set to "server". The build-key-server
# script in the easy-rsa folder will do this.
ns-cert-type server
# If a tls-auth key is used on the server
# then every client must also have the key.
tls-auth ta.key 1
# Select a cryptographic cipher.
# If the cipher option is used on the server
# then you must also specify it here.
;cipher x
# Enable compression on the VPN link.
# Don't enable this unless it is also
# enabled in the server config file.
comp-lzo
# Set log file verbosity.
verb 3
# Silence repeating messages
;mute 20
Merci beaucoup pour vos réponses, ca m'éviterais d'avoir à installer une connexion vpn sur chaque ordinateur de mon réseau local.