Insights

OpenVPN block-outside-dns: what it does and how to configure it

Learn what OpenVPN block-outside-dns does, its documented Windows scope, and how to check DNS routes and server-pushed options.

Illustration of socket safety cover with cable exit.
On this page

OpenVPN's block-outside-dns option blocks access to DNS servers outside the tunnel on supported Windows clients while connected. DNS means Domain Name System, which turns names into IP addresses. The option doesn't choose a DNS server or create its route.

In short:

What the option blocks

The setting restricts access to DNS servers outside OpenVPN. Supplying a DNS server address and giving it a working tunnel route are separate configuration tasks. Treat the directive as a DNS access restriction, not a full traffic kill switch or a DNS encryption setting.

An OpenVPN support response explains this distinction using the public DNS addresses 8.8.8.8 and 8.8.4.4. With outside DNS blocked, those servers need routes through the tunnel for resolution to work. A public DNS address alone doesn't provide that route.

Check whether your client uses it

The pfSense documentation describes this option for Windows 10 clients using OpenVPN version 2.3.9 and later. That wording describes the documentation's stated scope, not a complete current compatibility list. Check your client's documentation before relying on the directive outside that scope.

Viscosity documents an ignored-option warning when block-outside-dns appears in its advanced commands or arrives from the server. It disables the directive because it can interfere with its own DNS support. An ignored-option warning in Viscosity is therefore documented behavior, not proof that your profile is malformed.

For Viscosity, follow its Full Mode guidance. Its documentation says Full Mode prevents DNS leaks outside the VPN interface, as does Automatic when the connection routes all traffic through the tunnel. This is Viscosity-specific guidance, not a reason to expect another client to ignore the directive.

Set it up with a working DNS route

For a compatible Windows OpenVPN client, you can add the directive to the local connection profile. Edit only profiles or servers you administer, and save the original configuration so you can restore it if access breaks.

1. Choose authorized DNS servers and check their routes.

Use DNS servers authorized for this connection. Inspect the client's routing information and check that each chosen address uses the OpenVPN tunnel.

A split-tunnel policy sends only selected destinations through the tunnel. Give the DNS servers tunnel routes that fit that policy. Use a full-tunnel policy, which sends general traffic through the tunnel, only when that matches your intended design. Don't change a split-tunnel deployment to full tunnel just to restore DNS.

2. Add the directive to the active client profile.

Put this line in the Windows OpenVPN client profile you actually use. It's configuration text, not a shell command.

block-outside-dns

The option can also come from the server. Check the received server options before assuming the local profile is its only source.

3. Disconnect, reconnect and check the result.

Reconnect so the client uses the changed configuration. Review the connection log and received options, then check that names resolve and the chosen DNS addresses have tunnel routes. Successful resolution shows that names can resolve, but it doesn't prove that the queries used the tunnel.

Find why DNS fails or the block stays on

Use the active client profile, reconnect log, received server options, configured DNS addresses and routing information for these checks. Make changes only to configurations you administer, and keep the original settings for recovery.

1. Confirm which profile the client is using.

Check that the connected profile is the one you edited. Look for a local block-outside-dns directive in that profile. Editing another profile won't explain the active connection's behavior.

2. Reconnect and inspect the blocking message.

After an authorized change, disconnect and reconnect before checking the log. The OpenVPN support ticket includes the historical message Blocking outside dns using service succeeded.

That message means the client reported activating the block. It doesn't show that DNS resolution works or prove that every DNS path is covered. Exact log wording varies by client and version.

3. Find whether the server supplies the option.

Check the options received during reconnect. A server-pushed block-outside-dns directive can explain why blocking remains after you remove the local line. If it isn't in the active profile, don't assume it's disabled until you've checked the server-provided options.

4. Check how each DNS server is reached.

Compare every configured DNS address with the client's routing information. Each chosen server must be reachable through the tunnel while the block is active. If an address has no tunnel route, correct the DNS address or route under your intended routing policy.

A DNS address and a reported active block aren't enough. You should be able to explain which tunnel route reaches each chosen server.

5. Check name resolution separately.

Try resolving a name you expect the chosen DNS server to answer. A successful lookup shows that name resolution worked for that attempt. It doesn't prove the query took the tunnel, and a block-success log doesn't prove that lookups will work.

Removing the block may restore outside DNS access, but it isn't an equivalent privacy fix. Keep successful name resolution, tunnel routing and reported block activation as separate checks.

You've completed this diagnosis when you can identify the option's source and explain each DNS server's tunnel route. These checks aren't a complete DNS leak test. Remove secrets before sharing profiles or logs.

Where doxx.net fits. doxx.net is a private network that encrypts DNS lookups and blocks unwanted domains. If that's your broader goal, you can download the app as a separate step from configuring OpenVPN.

Ask an AI assistant

Share this article

Private Everywhere

Stop giving the internet everything

Keep your browsing, messages, files, and agents private.