= **Pushing DNS servers to clients** #pushdns-top ---- This page describes how to use pushed DNS servers in the client. **Contents:** 1. [#pushdns-nix Using pushed DNS servers with a Linux client] [[br]] 1. [#pushdns-win Using pushed DNS servers with a Windows client] [[br]] 1. [#pushdns-add Additional notes] [[br]] ---- == Using pushed DNS servers with a Linux client #pushdns-nix Linux must use an external script to update the DNS servers in `/etc/resolve.conf` Most Distro OpenVPN packages include `/etc/openvpn/update-resolv-conf` script. [[br]] Source: https://github.com/alfredopalhares/openvpn-update-resolv-conf Call the script by adding this to your client config file: {{{ script-security 2 up /etc/openvpn/update-resolv-conf down /etc/openvpn/update-resolv-conf }}} ---- == Using pushed DNS servers with a Windows client #pushdns-win * OpenVPN 2.4 Windows uses the OpenVPN built-in DHCP server to update the TAP adapter's DNS servers and no additional steps are required. This does require that the client is run using the [https://community.openvpn.net/openvpn/wiki/OpenVPN-GUI-New OpenVPN-GUI] and that the OpenVPN `InteractiveService` for Windows is started. To prevent DNS leaks at the client use `--block-outside-dns`. * OpenVPN 2.3 Windows uses the OpenVPN built-in DHCP server to update the TAP adapter's DNS servers and no additional steps are required. This does require that the client is run as an administrator user. This version does not support `--block-outside-dns` ---- == Additional notes #pushdns-add TODO: * systemd-resolvd ---- Pushing DNS servers to clients -- [#pushdns-top return to top] ----