# Pritunl VPN DNS-Search Domain configuration

**URL:** https://forum.pritunl.com/t/pritunl-vpn-dns-search-domain-configuration/1285
**Category:** Pritunl VPN
**Created:** [August 4, 2023, 12:50pm UTC](https://forum.pritunl.com/t/pritunl-vpn-dns-search-domain-configuration/1285 "2023-08-04T12:50:59Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![mwefer](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/m/6de8d8/32.png) [@mwefer](https://forum.pritunl.com/u/mwefer)
#### Post date: [August 4, 2023, 12:50pm UTC](https://forum.pritunl.com/t/pritunl-vpn-dns-search-domain-configuration/1285/1 "2023-08-04T12:50:59Z")

</div>

Hello everybody,

i´m new to pritunl and like to setup an OpenVPN-Server with pritunl. I´m quite astonished by the ease of use and the support for 2FA for OpenVPN.

However, one small problem occured during OpenVPN-Configuration. This might be an edge case:

We have three different DNS-Search domains within our network (domain1.tld, domain2.tld, domain3.tld) - these settings are not correctly pushed to the OpenVPN-Client.

If i click under “Add Server” → “DNS Search Domain” this is what happens when the client connects:

- If i configure just one Domain (domain1.tld), the client is able to resolve dns queries for domain1.tld. So this works as expected. Under Windows the ip configuration shows under “connection-specific DNS suffix” the domain1.tld.
- If i configure all three domains (domain1.tld,domain2.tld,domain3.tld) the client is just able to resolve dns queries for “domain2.tld” - Under Windows the ip configuration shows under “connection-specific DNS suffix” the domain2.tld.

 ![pritunl_domain_config](https://forum-static.pritunl.com/original/1X/f2b214c5be1cc20af08ec091d15a7470d25e6e65.jpeg)

DNS-Resolution is possible with using FQDN-Queries, but this is not very user friendly.

An example for my vpn server configuration is attached as screenshot.

Any help on this issue is highly appreciated.

Regards,  
mwefer

---

<div class="post-metadata">

### Author: ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)
#### Post date: [August 7, 2023, 3:22pm UTC](https://forum.pritunl.com/t/pritunl-vpn-dns-search-domain-configuration/1285/2 "2023-08-07T15:22:53Z")

</div>

I’m not aware of any other way to configure the DNS search domain, the server will send `push "dhcp-option DOMAIN %domain%"` for each search domain.

---

<div class="post-metadata">

### Author: ![mwefer](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/m/6de8d8/32.png) [@mwefer](https://forum.pritunl.com/u/mwefer)
#### Post date: [August 8, 2023, 8:49am UTC](https://forum.pritunl.com/t/pritunl-vpn-dns-search-domain-configuration/1285/3 "2023-08-08T08:49:45Z")

</div>

Hello,

thank you very much for clarifying how pritunl handles this option!

Regarding to the official openvpn documentation (Link: [openvpn/doc/man-sections/vpn-network-options.rst at master · OpenVPN/openvpn · GitHub](https://github.com/OpenVPN/openvpn/blob/master/doc/man-sections/vpn-network-options.rst)) this means, that one could only define a single entry for the search domain.

The documentation states for the “DOMAIN”-parameter: _Set Connection-specific DNS Suffix_

For multiple entries one would need the “DOMAIN-SEARCH” statement. The documentation states: _Add `name` to the domain search list. Repeat this option to add more entries. Up to 10 domains are supported._

Thank you for your feedback - now i know the limitations and can handle accordingly.

Regards,  
mwefer

---

<div class="post-metadata">

### Author: ![mwefer](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/m/6de8d8/32.png) [@mwefer](https://forum.pritunl.com/u/mwefer)
#### Post date: [August 8, 2023, 9:05am UTC](https://forum.pritunl.com/t/pritunl-vpn-dns-search-domain-configuration/1285/4 "2023-08-08T09:05:19Z")

</div>

Sidenote / Feedback: The command “pritunl set app.server\_search\_domain domain.tld” does not seem to work - on the cli i get the response:

_app.server\_search\_domain = “domain.tld”_  
_Successfully updated configuration. This change is stored in the database and has been applied to all hosts in the cluster._

However, even after restarting the server (not just the service, even the whole debian system) i´ll receive the old dns suffix for my client.

I need to delete the server and reinstall it with new settings.

There seems to be no way in the web server gui to reconfigure a server. Which is very, very odd. This is real downer and i can´t imagine bringing this software “in production”.

Which is sad, because it has really nice features and has been easy to setup.

---

<div class="post-metadata">

### Author: ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)
#### Post date: [August 8, 2023, 3:15pm UTC](https://forum.pritunl.com/t/pritunl-vpn-dns-search-domain-configuration/1285/5 "2023-08-08T15:15:05Z")

</div>

The CLI set command is primarily an undocumented function used for testing, it doesn’t report errors. There is no `app.server_search_domain` option. The search domain option is in the server settings that is unique to each server.

The server settings are available by clicking on the name of the server.

The `DOMAIN-SEARCH` option has been added to codebase and will be used when multiple DNS search domains are included. This change will be included in the next release.

---

<div class="post-metadata">

### Author: ![mwefer](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/m/6de8d8/32.png) [@mwefer](https://forum.pritunl.com/u/mwefer)
#### Post date: [August 9, 2023, 7:12am UTC](https://forum.pritunl.com/t/pritunl-vpn-dns-search-domain-configuration/1285/6 "2023-08-09T07:12:46Z")

</div>

Hello zach,

my bad: You´re right. Settings can be changed easily - i did not find that way to change the settings. This changes my view quite a bit. I can live with the restriction to one DNS Search Domain.

And thanks for explaining the details from the CLI management and the outlook from the roadmap.

I value your answers very much!

Regards,  
mwefer

---

<div class="post-metadata">

### Author: ![mwefer](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/m/6de8d8/32.png) [@mwefer](https://forum.pritunl.com/u/mwefer)
#### Post date: [September 27, 2023, 7:40am UTC](https://forum.pritunl.com/t/pritunl-vpn-dns-search-domain-configuration/1285/7 "2023-09-27T07:40:26Z")

</div>

Hello again,

just want to give some feedback: I just installed the version “v1.32.3660.72 dbfaf5” from the “Ubuntu Jammy unstable” repository and now the option for multiple dns suffixes is working like a charm!

Thank you so much for integrating this feature!

Regards,  
mwefer
