Ovpn to softehter get wrong dhcp netmask and gateway

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
stoner_ggwin
Posts: 2
Joined: Tue Nov 10, 2020 7:24 am

Ovpn to softehter get wrong dhcp netmask and gateway

Post by stoner_ggwin » Tue Nov 10, 2020 7:48 am

Dear all, i have question on softether server with secureNAT enabled.

It is all fine with windows client when connecting the virtual hub,
but use openvpn client or tunnel blick with .ovpn config, there has a problem.

SecureNAT didn't give me the correct gateway,

secureNAT dhcp range 192.168.131.10 ~ 192.168.131.100 , mask 255.255.255.0,
and i am not using default gateway option on it. cause i only want to push one route to user through softether virtual interface,
and the softether virtual interface setting is 192.168.131.1

When using softether client for windows is correct i can reach 192.168.131.1 or my env network from dhcp ip address,
but ovpn client only get wrong dhcp netmask and wrong gateway ip (192.168.131.21 255.255.255.252 gateway=192.168.131.22)

Could someone tell me , has the same problem as me , or kindly provide some troubleshoot point, many thanks.



here is my .ovpn file , i am surely that i have connect my softether server very well

dev tun
proto tcp
remote vpn247365014.v4.softether.net 19545
cipher AES-128-CBC
auth SHA1
resolv-retry infinite
nobind
persist-key
persist-tun
client
verb 3
auth-user-pass
<ca> ... </ca>
<cert> ... </cert>
<key> ... </key>

and below is my ovpn connect log

2020/11/10 下午3:35:33 SetupClient: signaling tun destroy event
⏎2020/11/10 下午3:35:33 EVENT: DISCONNECTED ⏎2020/11/10 下午3:38:28 OpenVPN core 3.git::662eae9a win x86_64 64-bit built on Oct 27 2020 12:49:07
⏎2020/11/10 下午3:38:28 Frame=512/2048/512 mssfix-ctrl=1250
⏎2020/11/10 下午3:38:28 UNUSED OPTIONS
5 [resolv-retry] [infinite]
6 [nobind]
7 [persist-key]
8 [persist-tun]
10 [verb] [3]
⏎2020/11/10 下午3:38:28 EVENT: RESOLVE ⏎2020/11/10 下午3:38:28 EVENT: WAIT ⏎2020/11/10 下午3:38:28 WinCommandAgent: transmitting bypass route to 18.177.113.113
{
"host" : "18.177.113.113",
"ipv6" : false
}

⏎2020/11/10 下午3:38:29 Connecting to [vpn247365014.v4.softether.net]:19545 (18.177.113.113) via TCPv4
⏎2020/11/10 下午3:38:29 EVENT: CONNECTING ⏎2020/11/10 下午3:38:29 Tunnel Options:V4,dev-type tun,link-mtu 1559,tun-mtu 1500,proto TCPv4_CLIENT,cipher AES-128-CBC,auth SHA1,keysize 128,key-method 2,tls-client
⏎2020/11/10 下午3:38:29 Creds: Username/Password
⏎2020/11/10 下午3:38:29 Peer Info:
IV_VER=3.git::662eae9a
IV_PLAT=win
IV_NCP=2
IV_TCPNL=1
IV_PROTO=2
IV_GUI_VER=OCWindows_3.2.2-1455
IV_SSO=openurl

⏎2020/11/10 下午3:38:29 SSL Handshake: CN=vpn247365014.softether.net, TLSv1, cipher SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
⏎2020/11/10 下午3:38:29 Session is ACTIVE
⏎2020/11/10 下午3:38:29 Sending PUSH_REQUEST to server...
⏎2020/11/10 下午3:38:29 EVENT: GET_CONFIG ⏎2020/11/10 下午3:38:30 Sending PUSH_REQUEST to server...
⏎2020/11/10 下午3:38:32 Sending PUSH_REQUEST to server...
⏎2020/11/10 下午3:38:35 Sending PUSH_REQUEST to server...
⏎2020/11/10 下午3:38:38 Sending PUSH_REQUEST to server...
⏎2020/11/10 下午3:38:38 OPTIONS:
0 [ping] [3]
1 [ping-restart] [10]
2 [ifconfig] [192.168.131.21] [192.168.131.22]
3 [route] [10.0.42.0] [255.255.255.0] [vpn_gateway]
4 [route] [192.168.131.0] [255.255.255.0] [vpn_gateway]

⏎2020/11/10 下午3:38:38 PROTOCOL OPTIONS:
cipher: AES-128-CBC
digest: SHA1
compress: NONE
peer ID: -1
⏎2020/11/10 下午3:38:38 CAPTURED OPTIONS:
Session Name: vpn247365014.v4.softether.net
Layer: OSI_LAYER_3
Remote Address: 18.177.113.113
Tunnel Addresses:
192.168.131.21/30 -> 192.168.131.22 [net30]
Reroute Gateway: IPv4=0 IPv6=0 flags=[ IPv4 ]
Block IPv6: no
Add Routes:
10.0.42.0/24
192.168.131.0/24
Exclude Routes:
DNS Servers:
Search Domains:

⏎2020/11/10 下午3:38:38 EVENT: ASSIGN_IP ⏎2020/11/10 下午3:38:38 SetupClient: transmitting tun setup list to \\.\pipe\agent_ovpnconnect
{
"confirm_event" : "880c000000000000",
"destroy_event" : "4c0b000000000000",
"tun" :
{
"adapter_domain_suffix" : "",
"add_routes" :
[
{
"address" : "10.0.42.0",
"gateway" : "",
"ipv6" : false,
"metric" : -1,
"net30" : false,
"prefix_length" : 24
},
{
"address" : "192.168.131.0",
"gateway" : "",
"ipv6" : false,
"metric" : -1,
"net30" : false,
"prefix_length" : 24
}
],
"block_ipv6" : false,
"layer" : 3,
"mtu" : 0,
"remote_address" :
{
"address" : "18.177.113.113",
"ipv6" : false
},
"reroute_gw" :
{
"flags" : 256,
"ipv4" : false,
"ipv6" : false
},
"route_metric_default" : -1,
"session_name" : "vpn247365014.v4.softether.net",
"tunnel_address_index_ipv4" : 0,
"tunnel_address_index_ipv6" : -1,
"tunnel_addresses" :
[
{
"address" : "192.168.131.21",
"gateway" : "192.168.131.22",
"ipv6" : false,
"metric" : -1,
"net30" : true,
"prefix_length" : 30
}
]
},
"wintun" : false
}
POST np://[\\.\pipe\agent_ovpnconnect]/tun-setup : 200 OK
TAP ADAPTERS:
guid='{322A9D80-168B-45FF-94DD-FC46C9091EE1}' index=69 name='區域連線'
Open TAP device "區域連線" PATH="\\.\Global\{322A9D80-168B-45FF-94DD-FC46C9091EE1}.tap" SUCCEEDED
TAP-Windows Driver Version 9.24
ActionDeleteAllRoutesOnInterface iface_index=69
netsh interface ip set interface 69 metric=1
確定。
netsh interface ip set address 69 static 192.168.131.21 255.255.255.252 gateway=192.168.131.22 store=active
IPHelper: add route 10.0.42.0/24 69 192.168.131.22 metric=-1
IPHelper: add route 192.168.131.0/24 69 192.168.131.22 metric=-1
ipconfig /flushdns
Windows IP 設定
成功清除 DNS 解讀器快取。
TAP handle: f80f000000000000
⏎2020/11/10 下午3:38:38 Connected via TUN_WIN
⏎2020/11/10 下午3:38:38 EVENT: CONNECTED stoner@vpn247365014.v4.softether.net:19545 (18.177.113.113) via /TCPv4 on TUN_WIN/192.168.131.21/ gw=[192.168.131.22/]⏎

Post Reply