| 1 | = **Pushing DNS servers to clients** #pushdns-top |
| 2 | |
| 3 | ---- |
| 4 | |
| 5 | This page describes how to use pushed DNS servers in the client. |
| 6 | |
| 7 | **Contents:** |
| 8 | 1. [#pushdns-nix Using pushed DNS servers with a Linux client] [[br]] |
| 9 | 1. [#pushdns-win Using pushed DNS servers with a Windows client] [[br]] |
| 10 | |
| 11 | ---- |
| 12 | |
| 13 | == Using pushed DNS servers with a Linux client #pushdns-nix |
| 14 | |
| 15 | Linux must use an external script to update the DNS servers in `/etc/resolve.conf` |
| 16 | |
| 17 | Most Distro OpenVPN packages include `/etc/openvpn/update-resolv-conf` script. [[br]] |
| 18 | Source: https://github.com/alfredopalhares/openvpn-update-resolv-conf |
| 19 | |
| 20 | Call the script by adding this to your client config file: |
| 21 | |
| 22 | {{{ |
| 23 | script-security 2 |
| 24 | up /etc/openvpn/update-resolv-conf |
| 25 | down /etc/openvpn/update-resolv-conf |
| 26 | }}} |
| 27 | |
| 28 | ---- |
| 29 | |
| 30 | == Using pushed DNS servers with a Linux client #pushdns-win |
| 31 | |
| 32 | Windows uses the OpenVPN built-in DHCP server to update the TAP adapter's DNS servers and no additional steps are required. |
| 33 | |
| 34 | You need to use `--block-outside-dns` to prevent Windows from using the system's default DNS servers (Preventing DNS leaks). |
| 35 | |
| 36 | ---- |
| 37 | |
| 38 | == Additional notes #pushdns-top |
| 39 | |
| 40 | TODO |
| 41 | |
| 42 | ---- |
| 43 | |
| 44 | Pushing DNS servers to clients -- [#pushdns-top return to top] |
| 45 | |
| 46 | ---- |
| 47 | |