Linux Mint 19本地DNS解析问题 [英] Linux Mint 19 Local DNS resolution problem

查看:71
本文介绍了Linux Mint 19本地DNS解析问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Ubuntu一段时间后,我安装了 Linux Mint 19

I installed Linux Mint 19 after using Ubuntu for a while,

我有一个带有子域的本地域,我可以ping mydomain.local

I a have a local domain with subdomains, I can ping mydomain.local

但是我无法ping或访问带有其名称的子域,

but I can't ping or access my subdomains with their names,

我的DNS服务器IP = 10.0.0.4

my DNS server IP = 10.0.0.4

这是由 resolvconf 生成的我的/etc/resolv.conf :

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.

nameserver 10.0.0.4

这是我的/run/systemd/resolve/stub-resolv.conf :

# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 10.0.0.4

请帮助我.

推荐答案

我发现了问题,它在文件/etc/nsswitch.conf 中:

I found the problem, it was in the file /etc/nsswitch.conf in the line :

hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname

在" [NOTFOUND = return] "部分之后标记" dns ",这就是为什么DNS解析不能正确进行的原因,完成是将"dns"移到"[NOTFOUND = return]"部分之前,现在一切都很好.

remark the "dns" is after the "[NOTFOUND=return]" part, so that is why the DNS resolution is not going correctly, so what I have done is moving "dns" before "[NOTFOUND=return]" part, and everything is good now.

这篇关于Linux Mint 19本地DNS解析问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆