Having trouble on the last steps of my raspberry pi OVPN Config. It keeps giving me the above error and so far I've tried:
- Changing to TCP
- Reinstalling OVPN
- Re-creating the keys/ certs
- Rebooting OVPN
- Tweaking IP tables
I've got a feeling it has something to do with iptables but I'm not terribly familiar with them. I essentially used the iptables commands from this post:
https://arashmilani.com/post?id=53
not sure if these are completely correct or not. Would love some input on that.
When I changed to TCP it gave me this error:
Attempting to establish TCP connection with [AF_INET]***.**.**.***:1194 [nonblock]
Sun Aug 07 23:37:14 2016 TCP: connect to [AF_INET]***.**.**.***:1194 failed, will try again in 5 seconds: Connection timed out (WSAETIMEDOUT)
I have the ports forwarded on 1194 on my router. Firewall exceptions for OVPN on my client.
Oddly enough, when I'm on the local network it attempts to connect with the "connection reset by peer" error. However, when I change the network to outside local it just sits there then eventually says "RECONNECTING,tls-error".
Running out of ideas at this point
Server.conf
local 192.168.0.29
dev tun
proto tcp
port 1194
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/server.crt
key /etc/openvpn/easy-rsa/keys/server.key
dh /etc/openvpn/easy-rsa/keys/dh1024.pem
server 10.8.0.0 255.255.255.0
# server and remote endpoints
ifconfig 10.8.0.1 10.8.0.2
# Add route to Client routing table for the OpenVPN Server
push "route 10.8.0.1 255.255.255.255"
# Add route to Client routing table for the OPenVPN Subnet
push "route 10.8.0.0 255.255.255.0"
# your local subnet
push "route 192.168.0.29 255.255.255.0"
# Set your primary domain name server address to Google DNS 8.8.8.8
push "dhcp-option DNS 8.8.8.8"
# Override the Client default gateway by using 0.0.0.0/1 and
# 128.0.0.0/1 rather than 0.0.0.0/0. This has the benefit of
# overriding but not wiping out the original default gateway.
push "redirect-gateway def1"
client-to-client
duplicate-cn
keepalive 10 120
tls-auth /etc/openvpn/easy-rsa/keys/ta.key 0
cipher AES-128-CBC
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status /var/log/openvpn-status.log 20
log /var/log/openvpn.log
verb 5
Client.conf
client
dev tun
proto udp
remote ***.**.**.*** 1194
resolv-retry infinite
nobind
persist-key
persist-tun
mute-replay-warnings
ns-cert-type server
key-direction 1
cipher AES-128-CBC
comp-lzo
verb 5
mute 20
Client log
Mon Aug 08 00:08:12 2016 us=400975 Current Parameter Settings:
Mon Aug 08 00:08:12 2016 us=401975 config = 'crash.ovpn'
Mon Aug 08 00:08:12 2016 us=401975 mode = 0
Mon Aug 08 00:08:12 2016 us=401975 show_ciphers = DISABLED
Mon Aug 08 00:08:12 2016 us=401975 show_digests = DISABLED
Mon Aug 08 00:08:12 2016 us=401975 show_engines = DISABLED
Mon Aug 08 00:08:12 2016 us=401975 genkey = DISABLED
Mon Aug 08 00:08:12 2016 us=401975 key_pass_file = '[UNDEF]'
Mon Aug 08 00:08:12 2016 us=401975 show_tls_ciphers = DISABLED
Mon Aug 08 00:08:12 2016 us=401975 Connection profiles [default]:
Mon Aug 08 00:08:12 2016 us=401975 proto = udp
Mon Aug 08 00:08:12 2016 us=401975 local = '[UNDEF]'
Mon Aug 08 00:08:12 2016 us=401975 local_port = 0
Mon Aug 08 00:08:12 2016 us=401975 remote = '***.**.**.***'
Mon Aug 08 00:08:12 2016 us=401975 remote_port = 1194
Mon Aug 08 00:08:12 2016 us=401975 remote_float = DISABLED
Mon Aug 08 00:08:12 2016 us=401975 bind_defined = DISABLED
Mon Aug 08 00:08:12 2016 us=401975 bind_local = DISABLED
Mon Aug 08 00:08:12 2016 us=401975 connect_retry_seconds = 5
Mon Aug 08 00:08:12 2016 us=401975 connect_timeout = 10
Mon Aug 08 00:08:12 2016 us=401975 NOTE: --mute triggered...
Mon Aug 08 00:08:12 2016 us=401975 268 variation(s) on previous 20 message(s) suppressed by --mute
Mon Aug 08 00:08:12 2016 us=401975 OpenVPN 2.3.11 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11] [IPv6] built on May 10 2016
Mon Aug 08 00:08:12 2016 us=401975 Windows version 6.1 (Windows 7) 64bit
Mon Aug 08 00:08:12 2016 us=401975 library versions: OpenSSL 1.0.1t 3 May 2016, LZO 2.09
Enter Management Password:
Mon Aug 08 00:08:12 2016 us=402975 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25340
Mon Aug 08 00:08:12 2016 us=402975 Need hold release from management interface, waiting...
Mon Aug 08 00:08:12 2016 us=895003 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25340
Mon Aug 08 00:08:12 2016 us=995009 MANAGEMENT: CMD 'state on'
Mon Aug 08 00:08:12 2016 us=995009 MANAGEMENT: CMD 'log all on'
Mon Aug 08 00:08:13 2016 us=7010 MANAGEMENT: CMD 'hold off'
Mon Aug 08 00:08:13 2016 us=8010 MANAGEMENT: CMD 'hold release'
Mon Aug 08 00:08:15 2016 us=143132 MANAGEMENT: CMD 'password [...]'
Mon Aug 08 00:08:15 2016 us=143132 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Mon Aug 08 00:08:15 2016 us=143132 Control Channel Authentication: tls-auth using INLINE static key file
Mon Aug 08 00:08:15 2016 us=143132 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Mon Aug 08 00:08:15 2016 us=143132 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Mon Aug 08 00:08:15 2016 us=143132 LZO compression initialized
Mon Aug 08 00:08:15 2016 us=143132 Control Channel MTU parms [ L:1558 D:1184 EF:66 EB:0 ET:0 EL:3 ]
Mon Aug 08 00:08:15 2016 us=143132 Socket Buffers: R=[8192->8192] S=[8192->8192]
Mon Aug 08 00:08:15 2016 us=143132 Data Channel MTU parms [ L:1558 D:1450 EF:58 EB:143 ET:0 EL:3 AF:3/1 ]
Mon Aug 08 00:08:15 2016 us=143132 Local Options String: 'V4,dev-type tun,link-mtu 1558,tun-mtu 1500,proto UDPv4,comp-lzo,keydir 1,cipher AES-128-CBC,auth SHA1,keysize 128,tls-auth,key-method 2,tls-client'
Mon Aug 08 00:08:15 2016 us=143132 Expected Remote Options String: 'V4,dev-type tun,link-mtu 1558,tun-mtu 1500,proto UDPv4,comp-lzo,keydir 0,cipher AES-128-CBC,auth SHA1,keysize 128,tls-auth,key-method 2,tls-server'
Mon Aug 08 00:08:15 2016 us=143132 Local Options hash (VER=V4): '272f1b58'
Mon Aug 08 00:08:15 2016 us=143132 Expected Remote Options hash (VER=V4): 'a2e63101'
Mon Aug 08 00:08:15 2016 us=143132 UDPv4 link local: [undef]
Mon Aug 08 00:08:15 2016 us=143132 UDPv4 link remote: [AF_INET]***.**.**.***:1194
Mon Aug 08 00:08:15 2016 us=143132 MANAGEMENT: >STATE:1470640095,WAIT,,,
Mon Aug 08 00:08:15 2016 us=144132 read UDPv4: Connection reset by peer (WSAECONNRESET) (code=10054)
Mon Aug 08 00:08:17 2016 us=338257 read UDPv4: Connection reset by peer (WSAECONNRESET) (code=10054)
Mon Aug 08 00:08:21 2016 us=726508 read UDPv4: Connection reset by peer (WSAECONNRESET) (code=10054)
Mon Aug 08 00:08:24 2016 us=606673 TCP/UDP: Closing socket
Mon Aug 08 00:08:24 2016 us=606673 SIGTERM[hard,] received, process exiting
Mon Aug 08 00:08:24 2016 us=606673 MANAGEMENT: >STATE:1470640104,EXITING,SIGTERM,,