1

I've got a computer with OpenVPN server behind the NAT. When I try to connect to it from client side and I got following error:

read UDPv4: Connection reset by peer (WSAECONNRESET) (code=10054)

I've configured forwarding for 1194 port in my router for both TCP and UDP. Here is config file for server:

port 1194

proto udp

dev tun

ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/server.crt
key /etc/openvpn/easy-rsa/keys/server.key  # This file should be kept secret

dh dh2048.pem

server 10.8.0.0 255.255.255.0

ifconfig-pool-persist ipp.txt

keepalive 10 120

comp-lzo

persist-key
persist-tun

status openvpn-status.log

verb 3

And here are my client's configuration:

client

dev tun

proto udp


remote XXX.XXX.XXX.XXX 1194

resolv-retry infinite

nobind

persist-key
persist-tun

ca ca.crt
cert my-laptop.crt
key my-laptop.key

ns-cert-type server

comp-lzo

verb 3

I've tried to follow this Quick Start tutorial but for some reason it didn't help me to start quickly.

3 Answers 3

1

Check your certificates - (Use OpenSSL to do this). I've seen this error when trying to use a malformed certificate and/or key.

If your certificates are fine - try switching to TCP and see if that helps.

1
  • Can't figure out how to check certificates but tried switching to TCP and it didn't help. Oct 8, 2013 at 9:55
0

I've seen the same WSAECONNREST error with a OpenVPN Windows client that was trying to connect to localhost (127.0.0.1).

This happened because the pfSense-based OpenVPN server was configured to listen on the localhost interface, and that was the default server IP given in the Client Export wizard.

0

Old question, I know, but posting this answer as a possibility in hopes it helps others who got here via Google...

Be sure to check your firewall settings, both in the operating system's stock firewall (e.g. Windows Firewall) and any third-party anti-virus or anti-malware software you may be running.

For example, on a Windows machine I was working on, I discovered Avast (even the free version) has network and application shields that will block OpenVPN communications, causing OpenVPN to report this exact error in the logs.

Adding OpenVPN executables to an exceptions list in Avast solved the problem. I would suspect that other such anti-malware applications would have a similar exceptions or whitelist feature.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .