When i connect through ovpn connect client everything sets up just fine except that default gateway on the interface itself is dropping after few secs. (It's Windows 11)
right after connection:

after about 3 secs:

OVPN Connect logs:
Code: Select all
[Oct 20, 2022, 11:30:59] OpenVPN core 3.git::d3f8b18b win x86_64 64-bit built on Mar 17 2022 11:42:02
⏎[Oct 20, 2022, 11:30:59] Frame=512/2048/512 mssfix-ctrl=1250
⏎[Oct 20, 2022, 11:30:59] UNUSED OPTIONS
1 [tls-client]
6 [nobind]
⏎[Oct 20, 2022, 11:30:59] EVENT: RESOLVE ⏎[Oct 20, 2022, 11:30:59] Contacting ....:4536 via UDP
⏎[Oct 20, 2022, 11:30:59] EVENT: WAIT ⏎[Oct 20, 2022, 11:30:59] WinCommandAgent: transmitting bypass route to ....
{
"host" : "....",
"ipv6" : false
}
⏎[Oct 20, 2022, 11:30:59] Connecting to [....]:4536 (....) via UDPv4
⏎[Oct 20, 2022, 11:30:59] EVENT: CONNECTING ⏎[Oct 20, 2022, 11:30:59] Tunnel Options:V4,dev-type tun,link-mtu 1541,tun-mtu 1500,proto UDPv4,keydir 1,cipher BF-CBC,auth SHA1,keysize 128,tls-auth,key-method 2,tls-client
⏎[Oct 20, 2022, 11:30:59] Creds: UsernameEmpty/PasswordEmpty
⏎[Oct 20, 2022, 11:30:59] Peer Info:
IV_VER=3.git::d3f8b18b
IV_PLAT=win
IV_NCP=2
IV_TCPNL=1
IV_PROTO=30
IV_CIPHERS=AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305:BF-CBC
IV_AUTO_SESS=1
IV_GUI_VER=OCWindows_3.3.6-2752
IV_SSO=webauth,openurl,crtext
IV_BS64DL=1
⏎[Oct 20, 2022, 11:30:59] SSL Handshake: peer certificate: CN=server, 2048 bit RSA, cipher: TLS_AES_256_GCM_SHA384 TLSv1.3 Kx=any Au=any Enc=AESGCM(256) Mac=AEAD
⏎[Oct 20, 2022, 11:30:59] Session is ACTIVE
⏎[Oct 20, 2022, 11:30:59] EVENT: GET_CONFIG ⏎[Oct 20, 2022, 11:30:59] Sending PUSH_REQUEST to server...
⏎[Oct 20, 2022, 11:31:00] OPTIONS:
0 [route] [192.168.134.0] [255.255.255.0]
1 [route-gateway] [10.8.1.1]
2 [topology] [subnet]
3 [ping] [10]
4 [ping-restart] [60]
5 [ifconfig] [10.8.1.200] [255.255.255.0]
6 [peer-id] [0]
7 [cipher] [AES-256-GCM]
⏎[Oct 20, 2022, 11:31:00] PROTOCOL OPTIONS:
cipher: AES-256-GCM
digest: NONE
key-derivation: OpenVPN PRF
compress: NONE
peer ID: 0
control channel: tls-auth enabled
⏎[Oct 20, 2022, 11:31:00] EVENT: ASSIGN_IP ⏎[Oct 20, 2022, 11:31:00] CAPTURED OPTIONS:
Session Name: ....
Layer: OSI_LAYER_3
Remote Address: ....
Tunnel Addresses:
10.8.1.200/24 -> 10.8.1.1
Reroute Gateway: IPv4=0 IPv6=0 flags=[ IPv4 ]
Block IPv6: no
Add Routes:
192.168.134.0/24
Exclude Routes:
DNS Servers:
Search Domains:
⏎[Oct 20, 2022, 11:31:00] SetupClient: transmitting tun setup list to \\.\pipe\agent_ovpnconnect
{
"allow_local_dns_resolvers" : false,
"confirm_event" : "cc06000000000000",
"destroy_event" : "840f000000000000",
"tun" :
{
"adapter_domain_suffix" : "",
"add_routes" :
[
{
"address" : "192.168.134.0",
"gateway" : "",
"ipv6" : false,
"metric" : -1,
"net30" : false,
"prefix_length" : 24
}
],
"block_ipv6" : false,
"layer" : 3,
"mtu" : 0,
"remote_address" :
{
"address" : "....",
"ipv6" : false
},
"reroute_gw" :
{
"flags" : 256,
"ipv4" : false,
"ipv6" : false
},
"route_metric_default" : -1,
"session_name" : "....",
"tunnel_address_index_ipv4" : 0,
"tunnel_address_index_ipv6" : -1,
"tunnel_addresses" :
[
{
"address" : "10.8.1.200",
"gateway" : "10.8.1.1",
"ipv6" : false,
"metric" : -1,
"net30" : false,
"prefix_length" : 24
}
]
},
"wintun" : false
}
POST np://[\\.\pipe\agent_ovpnconnect]/tun-setup : 200 OK
TAP ADAPTERS:
guid='{DD64577F-28E2-4F7F-83B4-C92973F385C5}' index=18 name='Połączenie lokalne 2'
Open TAP device "Połączenie lokalne 2" PATH="\\.\Global\{DD64577F-28E2-4F7F-83B4-C92973F385C5}.tap" SUCCEEDED
TAP-Windows Driver Version 9.24
ActionDeleteAllRoutesOnInterface iface_index=18
netsh interface ip set interface 18 metric=1
Ok.
netsh interface ip set address 18 static 10.8.1.200 255.255.255.0 gateway=10.8.1.1 store=active
IPHelper: add route 192.168.134.0/24 18 10.8.1.1 metric=-1
ipconfig /flushdns
Windows IP Configuration
Successfully flushed the DNS Resolver Cache.
TAP: ARP flush succeeded
TAP handle: e00d000000000000
⏎[Oct 20, 2022, 11:31:00] Connected via TUN_WIN
⏎[Oct 20, 2022, 11:31:00] EVENT: CONNECTED ....:4536 (....) via /UDPv4 on TUN_WIN/10.8.1.200/ gw=[10.8.1.1/]⏎
Code: Select all
client
tls-client
dev tun
proto udp
port 4536
remote ....
nobind
key-direction 1
remote-cert-tls server
...certs...
Code: Select all
tls-server
proto udp
port 4536
dev tun0
server 10.8.1.0 255.255.255.0
ca ....
cert ....
key ....
dh ....
tls-auth .... 0
client-config-dir /etc/openvpn/tun/ccd
persist-key
persist-tun
keepalive 10 60
ping-timer-rem
ifconfig 10.8.1.1 255.255.255.0
push "route 192.168.134.0 255.255.255.0"
topology subnet
user nobody
group nogroup
status /etc/openvpn/logfiles/tun.status
log-append /etc/openvpn/logfiles/tun.log
Code: Select all
ifconfig-push 10.8.1.200 255.255.255.0
netsh command from ovpn connect logs looks perfect:
Code: Select all
netsh interface ip set address 18 static 10.8.1.200 255.255.255.0 gateway=10.8.1.1 store=active