大网数据广告活动
服务器运维问答

OpenVPN Default DNS on Windows Clients

· 52CE 我爱测

I have set up an OpenVPN Server on a Debian9 device so that my company can reach our server infrastructure from the outside. I'd like them to use hostnames to reach the servers so I've set up Bind9 as an internal DNS. I've modifi…

问题原文

原帖链接 · Ror · CC BY-SA 4.0

I have set up an OpenVPN Server on a Debian9 device so that my company can reach our server infrastructure from the outside. I'd like them to use hostnames to reach the servers so I've set up Bind9 as an internal DNS. I've modified OpenVPN's server.conf so that the DNS and Domain are pushed to client :

push "dhcp-option DNS X.X.X.X"
push "dhcp-option DOMAIN mydomain.com"

I have no problems pinging hostnames and FQDN on a Linux client, however, on Windows, I can only ping the FQDN. If I do a ipconfig /all on the Windows client, I can see that the DNS suffix mydomain.com is affected to the right NIC. Running a nslookup shows me that the DNS in use is my computer's default and not the one provided by the OpenVPN server so my guess is that my computer only searches the hostname on the default DNS.

已采纳解答

原帖链接 · Kate · CC BY-SA 4.0

Which client version are you using ? The options available vary depending on the version as you can see here: OpenVPN - Using DNS servers pushed to clients

This is just a hunch but I would try adding this option in the client config file: register-dns (source)

Optionally: block-outside-dns (used to prevent DNS leaks)

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-03-02)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。