Pb connexion OpenVPN client Windows vers serveur WRT54G

Post new topic   Reply to topic    DD-WRT Forum Index -> Questions générales
Author Message
FredX17
DD-WRT Novice


Joined: 29 Jun 2010
Posts: 3

PostPosted: Tue Jun 29, 2010 16:47    Post subject: Pb connexion OpenVPN client Windows vers serveur WRT54G Reply with quote
Bonjour à tous,

Je m'adresse à vous car ça fait pas mal de temps que j'essaie de connecter un client OpenVPN qui tourne sous Windows vers un serveur OpenVPN qui tourne sur DD-WRT (WRT54G v1.1).

Je parviens à monter le tunnel VPN (qui s'appuie sur le port 443 TCP), mais je ne parviens pas à pinguer l'adresse IP du LAN de mon routeur, à partir du client...

Je vous mets le schéma en attachement.

Voici mes fichiers de conf :

Sur le serveur (WRT54G) :
dev tun0
proto tcp-server
port 443
keepalive 15 60
daemon
verb 3
comp-lzo
client-to-client
duplicate-cn

tls-server
dh /tmp/openvpn/dh.pem
ca /tmp/openvpn/ca.crt
cert /tmp/openvpn/cert.pem
key /tmp/openvpn/key.pem

push "route 192.168.1.0 255.255.255.0"
server 192.168.2.0 255.255.255.0

Sur le client :
client
dev tun0
proto tcp-client
remote 10.112.234.171 443
ns-cert-type server
resolv-retry infinite
nobind
persist-key
persist-tun
comp-lzo
float
verb 3
route-method exe
route-delay 2

ca ca.crt
cert client1.crt
key client1.key

Le firewall du routeur WRT54G est désactivé, donc je ne pense pas que ce soit un pb d'iptable... Et idem côté PC, le firewall Windows est arrêté...

Voila... S'il vous manque des infos pour m'aider, dites-moi, je n'ai peut être pas été clair...

A+

Fred


Last edited by FredX17 on Wed Jun 30, 2010 10:59; edited 5 times in total
Sponsor
hugodu13
DD-WRT User


Joined: 08 Apr 2009
Posts: 238

PostPosted: Tue Jun 29, 2010 17:43    Post subject: Reply with quote
salut, tu as lu ceci ?

http://openvpn.net/index.php/open-source/documentation/howto.html#scope

enjoy Wink
FredX17
DD-WRT Novice


Joined: 29 Jun 2010
Posts: 3

PostPosted: Wed Jun 30, 2010 7:38    Post subject: Reply with quote
Slt,

C'est bon, ça fonctionne maintenant... J'ai modifié mes iptables (ajout des 2 dernières lignes) :
iptables -I INPUT 1 -p tcp --dport 443 -j ACCEPT
iptables -I FORWARD 1 --source 192.168.2.0/24 -j ACCEPT
iptables -I FORWARD -i br0 -o tun0 -j ACCEPT
iptables -I FORWARD -i tun0 -o br0 -j ACCEPT
iptables -A INPUT -i tun+ -j ACCEPT
iptables -A FORWARD -i tun+ -j ACCEPT


Puis supprimé la ligne "duplicate-cn" dans mon fichier de conf sur le serveur.

Depuis le client, je pingue maintenant les 2 interfaces du routeur (tun0 192.168.2.1 et br0 192.168.1.1).

A+
FredX17
DD-WRT Novice


Joined: 29 Jun 2010
Posts: 3

PostPosted: Wed Jun 30, 2010 10:52    Post subject: Reply with quote
J'ai un nouveau pb... j'essaie maintenant de passer par un proxy (SQUID) pour me connecter sur le serveur OpenVPN du routeur, mais ça ne passe pas... en attachement le schéma modifié.

Ma conf du fichier .ovpn sur le client :

client
dev tun0
proto tcp-client
remote 10.112.234.171 443
http-proxy 10.112.234.150 8080 "c:\\Program Files\\OpenVPN\\config\\proxy.txt" basic
http-proxy-timeout 15
ns-cert-type server
resolv-retry infinite
nobind
persist-key
persist-tun
comp-lzo
float
verb 3
route-method exe
route-delay 2

ca ca.crt
cert client1.crt
key client1.key

Et les erreurs dans la log :

Wed Jun 30 12:40:16 2010 OpenVPN 2.0.9 Win32-MinGW [SSL] [LZO] built on Oct 1 2006
Wed Jun 30 12:40:16 2010 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port.
Wed Jun 30 12:40:16 2010 LZO compression initialized
Wed Jun 30 12:40:16 2010 Control Channel MTU parms [ L:1544 D:140 EF:40 EB:0 ET:0 EL:0 ]
Wed Jun 30 12:40:16 2010 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ]
Wed Jun 30 12:40:17 2010 Local Options hash (VER=V4): '69109d17'
Wed Jun 30 12:40:17 2010 Expected Remote Options hash (VER=V4): 'c0103fa8'
Wed Jun 30 12:40:17 2010 Attempting to establish TCP connection with 10.112.234.150:8080
Wed Jun 30 12:40:17 2010 TCP connection established with 10.112.234.150:8080
Wed Jun 30 12:40:17 2010 Send to HTTP proxy: 'CONNECT 10.112.234.171:443 HTTP/1.0'
Wed Jun 30 12:40:17 2010 Attempting Basic Proxy-Authorization
Wed Jun 30 12:40:33 2010 recv_line: TCP port read timeout expired
Wed Jun 30 12:40:33 2010 TCP/UDP: Closing socket
Wed Jun 30 12:40:33 2010 SIGTERM[soft,init_instance] received, process exiting

J'ai cherché sur le net, j'ai vu pas mal de messages avec le même genre de pb, mais je n'ai pas trouvé la solution... Quelqu'un a une idée ?

Fred
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Questions générales All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum