Hi.
I want to setup my VPS as OpenVPN server.
Here's my server config:
port 15368
proto tcp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
server 10.8.43.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
keepalive 10 120
cipher AES-256-CBC
persist-key
persist-tun
status openvpn-status.log
verb 3
And my client config:
client
dev tun
proto tcp
remote x.x.x.x 15368
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client1.crt
key client1.key
remote-cert-tls server
tls-auth ta.key 1
cipher AES-256-CBC
verb 3
My computer is behind a NAT Router. The network address is 192.168.0.x. I have open port 15368 on server and client.
The problem is when I am trying to connect the connection is resetting every 5 seconds:
Mon Jul 03 07:28:13 2017 TCP/UDP: Preserving recently used remote address: [AF_INET]x.x.x.x:15368
Mon Jul 03 07:28:13 2017 Socket Buffers: R=[8192->8192] S=[8192->8192]
Mon Jul 03 07:28:13 2017 Attempting to establish TCP connection with [AF_INET]x.x.x.x:15368 [nonblock]
Mon Jul 03 07:28:13 2017 MANAGEMENT: >STATE:1499092093,TCP_CONNECT,,,,,,
Mon Jul 03 07:28:14 2017 TCP connection established with [AF_INET]x.x.x.x:15368
Mon Jul 03 07:28:14 2017 TCP_CLIENT link local: (not bound)
Mon Jul 03 07:28:14 2017 TCP_CLIENT link remote: [AF_INET]x.x.x.x:15368
Mon Jul 03 07:28:14 2017 MANAGEMENT: >STATE:1499092094,WAIT,,,,,,
Mon Jul 03 07:28:15 2017 Connection reset, restarting [-1]
Mon Jul 03 07:28:15 2017 SIGUSR1[soft,connection-reset] received, process restarting
Mon Jul 03 07:28:15 2017 MANAGEMENT: >STATE:1499092095,RECONNECTING,connection-reset,,,,,
Can someone please help me solve this issue?
Thanks.