一、将本机的 DNS 配置为 8.8.8.8 ,用 nslookup (还可以使用 host、dig)验证
# 修改配置文件
# vim /etc/resolv.conf
# 在文件的后加入一行 nameserver 8.8.8.8
# 用 nslookup 验证
# nslookup 192.168.237.128
Server: 192.168.237.2
Address: 192.168.237.2#53
二、检测 22 端口是否可以连接
1、安装 nmpa 工具,用 nmap 查看
# sudo yum install nmap
[D@Demon ~]$ nmap localhost -p 22
Starting Nmap 5.51 ( //nmap.org ) at 2016-01-16 11:14 CST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.0010s latency).
Other addresses for localhost (not scanned): 127.0.0.1
PORT STATE SERVICE
22/tcp open ssh
Nmap done: 1 IP address (1 host up) scanned in 0.08 seconds