Local DNS resolving

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
OpenVpn Newbie
Posts: 1
Joined: Mon Feb 26, 2024 2:44 pm

Local DNS resolving

Post by GDR » Mon Feb 26, 2024 3:28 pm


I've been asked to make a POC for using OpenVPN with Ubiquiti for remote users.
There are a few routes that need to go through the VPN.
And, each user must still be able to access his own (Home) network and DNS (not company side) for resolving IP to hostnames. (requirement).
With DNS, I'm not referring to internet DNS like ; ; but something like 192.168.x.y / 172.16.x.y / 10.x.y.z on het home network of the remote user.
I also disabled "redirect-gateway def1" so local (home) IP is reachable.

My current ovpn file configuration:

Code: Select all

dev tun
proto tcp
resolv-retry infinite

# Downgrade privileges after initialization (non-Windows only)
user nobody
group nogroup


remote-cert-tls server
cipher AES-256-CBC
verb 3

auth SHA1
key-direction 1

reneg-sec 0

#redirect-gateway def1
route x.y.z.0

... cert info ...
What line/rule must I add so that both Server DNS and local (Home/remote user) both are available? This as each remote users' network can be/is configured differently. All systems or either Mac or Windows.

So far, I'm able to reach the network(s) on the remote site (server/office), and I'm able to ping my local (home) network (ex my personal printer), but the DNS hostname of my printer can't be resolved as only the remote VPN DNS server is listed.

Thanks for the help.


Post Reply