遇到一个telnet到Solaris失败的问题
遇到这样一个情况:两台Solaris主机A和B,不在同一个网段,属于不同的NIS域。从A主机telnet到B主机,提示
Connection closed by foreign host.
无法建立telnet连接。
但是与B主机同网段的其他机器telnet到B主机,一切正常。
B机器未设置防火墙,也没有/etc/hosts.allow、/etc/hosts.deny之类的设置。
在B主机上dmesg看到每次telnet失败时,都会报如下信息:
Nov 11 17:35:26 B inetd: warning: can't verify hostname: gethostbyname(A.domain) failed
Nov 11 17:35:26 B inetd: refused connect from 10.0.2.105 (name/address mismatch)
在B主机上执行nslookup 10.0.2.105(A主机的IP地址)
Server:cj-102206.test.com
Address:10.0.0.21
Name: A.domian
Address:10.0.2.105
前两行是用于解析的DNS服务器信息,后两行是主机A的信息。
查看/etc/resolv.conf文件,发现DNS服务器信息已配置,再查看/etc/nsswitch.conf文件,发现host一行只设置了files和nis,在这里增加上dns,如下:
hosts: files nis dns
再次回到主机A上telnet到B主机,成功。
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/80598/showart_2091068.html
页:
[1]