我们正在使用 Ubuntu 16.04 上的 Bind 服务器。
我们无法卷曲因为DNS解析但是平和nslookup正在从 Ubuntu16.04 客户端工作。
客户 - ping
:
root@app-01:~# ping -c1 nightly.dev.project
PING nightly.dev.project (10.110.2.1) 56(84) bytes of data.
64 bytes from 10.110.2.1: icmp_seq=1 ttl=64 time=1.03 ms
--- nightly.dev.project ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.036/1.036/1.036/0.000 ms
客户 - nslookup
:
root@app-01:~# nslookup nightly.dev.project
Server: 10.110.1.3
Address: 10.110.1.3#53
Name: nightly.dev.project
Address: 10.110.2.1
客户 - curl
:
root@app-01:~# curl -kv nightly.dev.project
* Rebuilt URL to: nightly.dev.project/
* Trying 10.10.10.24...
* Connected to proxy.dev.com (10.10.10.24) port 8080 (#0)
> GET http://nightly.dev.project/ HTTP/1.1
> Host: nightly.dev.project
> User-Agent: curl/7.47.0
> Accept: */*
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 404 Not Found
< Cache-Control: no-cache
< Pragma: no-cache
< Content-Type: text/html; charset=utf-8
< Proxy-Connection: Keep-Alive
< Connection: Keep-Alive
< Content-Length: 1082
<
<HTML><HEAD>
<TITLE>Network Error</TITLE>
</HEAD>
<BODY>
<FONT face="Helvetica">
<big><strong></strong></big><BR>
</FONT>
<blockquote>
<TABLE border=0 cellPadding=1 width="80%">
<TR><TD>
<FONT face="Helvetica">
<big>Network Error (dns_unresolved_hostname)</big>
<BR>
客户 - /etc/resolvconf/resolv.conf.d/head
:
nameserver 10.110.1.3
nameserver 10.110.1.2
search dev.project
客户 - /etc/nsswitch
:
#hosts: files mdns4_minimal [NOTFOUND=return] dns
hosts: dns files
networks: files
BIND 服务器- /etc/bind/named.conf.options
:
options {
#dnssec-validation auto;
dnssec-validation no;
dnssec-enable no;
allow-recursion { any; };
allow-recursion-on { any; };
allow-query { any; };
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};
答案1
事实证明,代理proxy.dev.com
无法解析 DNS 记录。
希望这个答案能够帮助遇到这种特殊情况的人 - 所有客户端配置和 DNS 机器都正确,但代理不正确。