Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Virtual private networks
»
OpenVPN dhcp-option DNS not working
« previous
next »
Print
Pages: [
1
]
Author
Topic: OpenVPN dhcp-option DNS not working (Read 2939 times)
bazbaz
Jr. Member
Posts: 53
Karma: 2
OpenVPN dhcp-option DNS not working
«
on:
September 19, 2023, 04:03:34 pm »
Hi,
I have an OpenVPN access server to allow road warriors to establish a dialup VPN, validating credentials via LDAP+MFA.
All work well: tunnel is up and traffic is ok.
The only problem is that I need to assign an internal DNS Server resolver to connected clients. So I specified server's IP in instance settings, and in log I can find "SENT CONTROL []: 'PUSH_REPLY,register-dns,[.....]dhcp-option DNS 10.77.3.2,dhcp-option NTP 10.77.3.2[....]".
But this does not work, and client still is using only DNS servers it has before to start VPN. Any idea? I tried both with old "servers" settings and new "instances".
The client is OpenVPN Connect on Windows 11
Logged
newsense
Hero Member
Posts: 1037
Karma: 77
Re: OpenVPN dhcp-option DNS not working
«
Reply #1 on:
September 19, 2023, 04:24:41 pm »
Have a port forward on the VPN interface redirecting all DNS queries to your chosen resolver.
Logged
bazbaz
Jr. Member
Posts: 53
Karma: 2
Re: OpenVPN dhcp-option DNS not working
«
Reply #2 on:
September 19, 2023, 05:09:15 pm »
the problem is not on the firewall: if try manually to
Quote
nslookup
server x.x.x.x
mydomain.local
where x.x.x.x is the IP behind the tunnel, it works.
However, after many other tests, I discovered that "it work but I don't know why". If I run nslookup, I see that it points to local DNS server as resolver, and cannot solve internal names from DNS behind the VPN.
If I perform a "ping mydomain.local".. it works.
ipconfig /all does not reports the DNS server assigned by the VPN
so.. it works but I cannot understand why and how
Logged
meschmesch
Full Member
Posts: 184
Karma: 5
Re: OpenVPN dhcp-option DNS not working
«
Reply #3 on:
September 20, 2023, 02:56:55 pm »
add
Code:
[Select]
block-outside-dns
to your client.ovpn
Logged
bazbaz
Jr. Member
Posts: 53
Karma: 2
Re: OpenVPN dhcp-option DNS not working
«
Reply #4 on:
September 25, 2023, 09:28:24 am »
strange: it reports "unknown/unsupported options" when I try to connect
Logged
meschmesch
Full Member
Posts: 184
Karma: 5
Re: OpenVPN dhcp-option DNS not working
«
Reply #5 on:
September 25, 2023, 03:40:27 pm »
The client should be able to use it (I assume the client is so outdated). Irrespective make sure you indicate the correct DNS server in the server settings. In my case since I'm using adguard I additionally have a port forwarding that forwards any DNS requests originating from OpenVPN and not directed to the indicated DNS Server to the correct (internal) DNS server.
Logged
bazbaz
Jr. Member
Posts: 53
Karma: 2
Re: OpenVPN dhcp-option DNS not working
«
Reply #6 on:
September 25, 2023, 04:12:35 pm »
but your "ipconfig /all" and "nslookup" report the IP address of DNS server you assign from the VPN setting?
Logged
meschmesch
Full Member
Posts: 184
Karma: 5
Re: OpenVPN dhcp-option DNS not working
«
Reply #7 on:
September 25, 2023, 05:29:38 pm »
YES!
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Virtual private networks
»
OpenVPN dhcp-option DNS not working