Openvpn auto connect on windows startup boot.

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
jahanzeb8816
OpenVpn Newbie
Posts: 2
Joined: Thu Jan 04, 2024 9:31 am

Openvpn auto connect on windows startup boot.

Post by jahanzeb8816 » Thu Jan 04, 2024 10:07 am

I am facing an issue, i have setup open vpn server on pfsense 2.6.0, setup on dual Wan interface, working on both but the issue is that when wan 1 goes down it does not reconnect automatically or switched automatically.


dev tun
persist-tun
persist-key
ncp-ciphers AES-256-GCM:AES-128-GCM:AES-256-CBC
cipher AES-256-CBC
auth SHA256
tls-client
client
resolv-retry infinite

nobind
verify-x509-name "Server1_Cert" name
auth-user-pass
pkcs12 shapar-firewall-UDP4-1194-testing.p12
tls-auth shapar-firewall-UDP4-1194-testing-tls.key 1
remote-cert-tls server
explicit-exit-notify
remote-random
remote 58.65.211.22 1194 udp
remote 110.93.226.45 1194 udp



see this below, remote server 58.65.211.22 connected and initialization sequence completed but when i down this server it should be reconnect on 110.93.226.45 but in this case it does not reconnect. what i am missing in the configuration file.

Thu Jan 04 12:10:23 2024 UDP link remote: [AF_INET]58.65.211.22:1194
Thu Jan 04 12:10:24 2024 [Server1_Cert] Peer Connection Initiated with [AF_INET]58.65.211.22:1194
Thu Jan 04 12:10:25 2024 open_tun
Thu Jan 04 12:10:25 2024 TAP-WIN32 device [Local Area Connection] opened: \\.\Global\{0AD39E8A-84F6-4706-B8C8-356D1EC49691}.tap
Thu Jan 04 12:10:25 2024 Set TAP-Windows TUN subnet mode network/local/netmask = 10.10.20.0/10.10.20.2/255.255.255.0 [SUCCEEDED]
Thu Jan 04 12:10:25 2024 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.10.20.2/255.255.255.0 on interface {0AD39E8A-84F6-4706-B8C8-356D1EC49691} [DHCP-serv: 10.10.20.254, lease-time: 31536000]
Thu Jan 04 12:10:25 2024 Successful ARP Flush on interface [10] {0AD39E8A-84F6-4706-B8C8-356D1EC49691}
Thu Jan 04 12:10:30 2024 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Thu Jan 04 12:10:30 2024 Initialization Sequence Completed
Thu Jan 04 12:11:40 2024 [Server1_Cert] Inactivity timeout (--ping-restart), restarting
Thu Jan 04 12:11:40 2024 SIGUSR1[soft,ping-restart] received, process restarting
Thu Jan 04 12:11:45 2024 TCP/UDP: Preserving recently used remote address: [AF_INET]58.65.211.22:1194
Thu Jan 04 12:11:45 2024 UDP link local: (not bound)
Thu Jan 04 12:11:45 2024 UDP link remote: [AF_INET]58.65.211.22:1194
Thu Jan 04 12:12:45 2024 [UNDEF] Inactivity timeout (--ping-restart), restarting
Thu Jan 04 12:12:45 2024 SIGUSR1[soft,ping-restart] received, process restarting
Thu Jan 04 12:12:50 2024 TCP/UDP: Preserving recently used remote address: [AF_INET]110.93.226.45:1194
Thu Jan 04 12:12:50 2024 UDP link local: (not bound)
Thu Jan 04 12:12:50 2024 UDP link remote: [AF_INET]110.93.226.45:1194
Thu Jan 04 12:13:51 2024 [UNDEF] Inactivity timeout (--ping-restart), restarting
Thu Jan 04 12:13:51 2024 SIGUSR1[soft,ping-restart] received, process restarting
Thu Jan 04 12:13:56 2024 TCP/UDP: Preserving recently used remote address: [AF_INET]58.65.211.22:1194
Thu Jan 04 12:13:56 2024 UDP link local: (not bound)
Thu Jan 04 12:13:56 2024 UDP link remote: [AF_INET]58.65.211.22:1194

never-stop-learning
OpenVPN User
Posts: 39
Joined: Sat Oct 02, 2021 3:57 pm

Re: Openvpn auto connect on windows startup boot.

Post by never-stop-learning » Fri Jan 26, 2024 2:01 pm

hey, when you remove the line remote 58.65.211.22 1194 udp, are you able to connect directly?

Post Reply