telnet服务的安全改进(1)(4)
四、客户端访问实验
基础由于LINUX为了提高TELNET的安全性和防止未授权的用户利用TELNET的BUG
下面我们来看一下二种错误:
第一种:
- [root@linuxchao ~]# telnet 192.168.1.87
- Trying 192.168.1.87...
- telnet: connect to address 192.168.1.87: No route to host
- telnet: Unable to connect to remote host: No route to host
解决方法:这种问题防火墙没有允许telnet服务,连接被阻止,默认CentOS只允许SSH,所以进入其自定义选项,在telnet前打个勾!
第二种
- [root@test xinetd.d]# telnet 172.25.1.3
- Trying 172.25.1.3...
- Connected to 172.25.1.3 (172.25.1.3).
- Escape character is '^]'.
- getnameinfo: localhost: Success
- Temporary failure in name resolution: Illegal seek
- Connection closed by foreign host.
这一个就是/etc/hosts文件配置问题
解决方法:我在里面加两个IP地址,内容如下:
- [linuxchao@localhost ~]$ more /etc/hosts
- # Do not remove the following line, or various programs
- # that require network functionality will fail.
- 127.0.0.1localhost.localdomainlocalhost
- ::1localhost6.localdomain6localhost6
- 192.168.1.88
- 192.168.1.86
说明:因为客户机的名字不好记就没写进去,内容格式应为 127.0.0.1 pcname
总结:在使用telnet时要记得1.打开防火墙对telnet的限制2./etc/hosts对客户机的限制3.注意/etc/hosts.allow与/etc/hosts.deny两个文件
里的内容,都有可能会限制访问,这里只是局域网测试就不说多了.
评论暂时关闭