Using https://github.com/angristan/openvpn-install i have installed openvpn on AWS Lightsail Instance (Ubuntu 18.04 LTS). My server config file is as follows:
port 33434
proto udp
dev tun
user nobody
group nogroup
persist-key
persist-tun
keepalive 10 120
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
push "redirect-gateway def1 bypass-dhcp"
dh dh.pem
tls-auth tls-auth.key 0
crl-verify crl.pem
ca ca.crt
cert server_VYtknmf1PC80WpTG.crt
key server_VYtknmf1PC80WpTG.key
auth SHA512
cipher AES-256-CBC
ncp-ciphers AES-256-CBC
tls-server
client-config-dir /etc/openvpn/ccd
status /var/log/openvpn/status.log
verb 3
And my client.ovpn is as follows:
client
proto udp
explicit-exit-notify
remote 35.173.69.115 33434
dev tun
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
verify-x509-name server_VYtknmf1PC80WpTG name
auth SHA512
auth-nocache
cipher AES-256-CBC
tls-client
setenv opt block-outside-dns # Prevent Windows 10 DNS leak
verb 3
I have added port '33434' UDP in Firewall rule of AWS instance.
I added a new profile in VPN Client section of the asus router and uploaded the client.ovpn file. And clicked activate and get follow message in the log.
May 15 22:29:43 vpnclient1[17419]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
May 15 22:29:43 vpnclient1[17419]: Socket Buffers: R=[122880->122880] S=[122880->122880]
May 15 22:29:43 vpnclient1[17419]: UDPv4 link local: [undef]
May 15 22:29:43 vpnclient1[17419]: UDPv4 link remote: [AF_INET]35.173.69.115:33434
May 15 22:29:43 vpnclient1[17419]: TLS: Initial packet from [AF_INET]35.173.69.115:33434, sid=61d9df2d 1f97bdd0
May 15 22:30:02 rc_service: service 17718:notify_rc restart_letsencrypt
May 15 22:30:43 vpnclient1[17419]: TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
May 15 22:30:43 vpnclient1[17419]: TLS Error: TLS handshake failed
May 15 22:30:43 vpnclient1[17419]: SIGUSR1[soft,tls-error] received, process restarting
May 15 22:30:43 vpnclient1[17419]: Restart pause, 2 second(s)
Please suggest how to fix the issue. Thank you.