OPNsense Forum

English Forums => Virtual private networks => Topic started by: Pete5 on September 15, 2025, 07:03:41 AM

Title: OpenVPN clients can't resolve local domains
Post by: Pete5 on September 15, 2025, 07:03:41 AM
Hi everyone,
i configured a OpenVPN instance according these guides.
https://docs.opnsense.org/manual/how-tos/sslvpn_instance_roadwarrior.html
https://www.zenarmor.com/docs/de/netzwerksicherheitstutorials/wie-richtet-man-openvpn-mit-mfa-auf-opnsense-ein

The connection works fine, the OpenVPN clients can connect to the internet and local hosts by IP address.

It would be great if the OpenVPN clients would be able to connect to local hosts by the domain name like nas.mydomain.de.
I use unbound as DNS for my local network.
If i set unbound DNS server as DNS in the configuration of the OpenVPN instance then it works, but the connection to the internet not anymore.

Any ideas to realize this?

Kind regards Pete
Title: Re: OpenVPN clients can't resolve local domains
Post by: keeka on September 15, 2025, 10:48:54 AM
Push appropriate DNS servers to the ovpn client. At the bottom of the server instance config page.
You may also need to you push the necessary routes to reach that dns server (under 'Local network' on the same page).
Title: Re: OpenVPN clients can't resolve local domains
Post by: Pete5 on September 15, 2025, 03:54:33 PM
Unbound is running on my opnsense which has the IP 192.168.1.1
The IP values are for instance only!

OpenVPN is set as follows

Local Network: 192.168.1.0/24
DNS Servers: 192.168.1.1

With these values DNS is working for the LAN, but not for  the internet connection.

Do I have to set the IPs for the DNS Servers of my ISP as well?