Openvpn not setting DNS server

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
jcarter
Posts: 2
Joined: Thu Jan 05, 2023 4:35 pm

Openvpn not setting DNS server

Post by jcarter » Thu Jan 05, 2023 4:48 pm

New Softether setup after I gave up on openvpn community and getting radius working.

Softether Windows Ver 441 build 9782
Secure nat enabled. Gateway removed and routes added so all traffic is not sent down VPN.

Softether client works perfectly.
L2TP works perfectly.
Decided to activate OpenVPN for some users that already use OpenVPN or new android folks.
Connection work, routing works, but the DNS server is not being sent.

Here is what the log shows for that OpenVPN connection. It looks like it is sending it but it is not getting set on the client. (ios or windows have been tried)


2023-01-05 11:25:47.278 [HUB "FWHUB"] Session "SID-SECURENAT-1": The DHCP server of host "5E-AA-AA-F4-11-4E" (192.168.30.1) on this session allocated, for host "SID-Juser-[OPENVPN_L3]-16" on another session "CA-11-22-33-FD-F4", the new IP address 192.168.30.13.
2023-01-05 11:25:47.278 OpenVPN Session 12 (117.111.22.81:3724 -> 172.16.1.12:1194) Channel 0: The channel becomes the established state.
2023-01-05 11:25:47.278 OpenVPN Session 12 (117.111.22.81:3724 -> 172.16.1.12:1194) Channel 0: The IP address and other network information parameters are set successfully. IP Address of Client: 192.168.30.13, Subnet Mask: 255.255.255.0, Default Gateway: , DNS Server 1: 192.168.30.1, DNS Server 2: , WINS Server 1: , WINS Server 2:
2023-01-05 11:25:47.278 OpenVPN Session 12 (117.111.22.81:3724 -> 172.16.1.12:1194) Channel 0: The full strings replied: "PUSH_REPLY,ping 3,ping-restart 10,ifconfig 192.168.30.13 192.168.30.14,dhcp-option DOMAIN company.com,dhcp-option DNS 192.168.30.1,route 172.16.0.0 255.255.0.0 vpn_gateway"

shakibamoshiri
Posts: 285
Joined: Wed Dec 28, 2022 9:10 pm

Re: Openvpn not setting DNS server

Post by shakibamoshiri » Thu Jan 05, 2023 11:42 pm

I do not think this is correct
Connection work, routing works, but the DNS server is not being sent.
Not just SE server, but any other VPN servers, it is the client feature (responsibility) to set custom DNS offered by a VPN server.
When the server and client are matched (part of the sample product) it works, but for other clients there is no guarantee.

for the sake of this, now I tested OpenVPN on Android while SE server DNS configuration is 8.8.8.8, the OpenVPN logs show

Code: Select all

...
[dhcp-option]  |DNS| |8.8.8.8|
...
Also checking it with "dig" command on Termux showed

Code: Select all

...
SERVER 8.8.8.8#53 (8.8.8.8)
...
So this OpenVPN client for Android can understand and set options form a server.

jcarter
Posts: 2
Joined: Thu Jan 05, 2023 4:35 pm

Re: Openvpn not setting DNS server

Post by jcarter » Fri Jan 06, 2023 6:16 am

Apologies for the typo; that should have said that DNS was not SET. It was being sent but the client was not using the information to set the DNS.

I sat down last night. I noticed that I was using OpenVPN connect client so I removed that because the two of those act differently with the same OVPN config file. So I removed that, and installed the community edition version. I then re-generated the ovpn from SE just in case there were any changes. I modified the DNS name in the OVPN, imported it into the Windows 11 machine, and it connected and set DNS properly. So it is working now with proper routing and DNS using the OpenVPN community client.

Post Reply