OpenVPN and local DNS (not Turris Omnia)

I’m using the following setup:

Network:           192.168.0.0/24
Turris Omnia:      192.168.0.1        (no DNS, DHCP-Option "6,192.168.0.2")
DNS-Server:        192.168.0.2        (Raspberry Pi, dnsmasq)

OpenVPN network:   172.16.1.0/24

If I now connect a device over VPN, the gateway (Turris Omnia, 172.16.1.1) from the VPN network is specified as DNS:

172.16.1.1

But that doesn’t take my local DNS into account! At the moment, there is no DNS at all.

How can I get my local DNS (192.168.1.2) to be used instead of the VPN gateway (172.16.1.1)? He’s on another network. I’m a little at a loss right now.

I’m grateful for tips.

In /etc/config/openvpn you can set the server manually:
list push 'dhcp-option DNS 192.168.0.2'

2 Likes

Exactly what I was looking for. Thank you.