telnet到RedHat Linux失败原因、解决方法


当前第2页 返回上一页

1

<br>

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

1

<br>

Chain RH-Lokkit-0-50-INPUT (2 references)
target prot opt source destination
ACCEPT udp -- 192.168.1.1 anywhere udp spt:domain dpts:1025:65535
ACCEPT tcp -- anywhere anywhere tcp dpt:smtp flags:SYN,RST,ACK/SYN
ACCEPT tcp -- anywhere anywhere tcp dpt:http flags:SYN,RST,ACK/SYN
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp flags:SYN,RST,ACK/SYN
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh flags:SYN,RST,ACK/SYN
ACCEPT tcp -- anywhere anywhere tcp dpt:telnet flags:SYN,RST,ACK/SYN
ACCEPT udp -- anywhere anywhere udp spts:bootps:bootpc dpts:bootps:bootpc
ACCEPT udp -- anywhere anywhere udp spts:bootps:bootpc dpts:bootps:bootpc
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
REJECT tcp -- anywhere anywhere tcp dpts:0:1023 flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT tcp -- anywhere anywhere tcp dpt:nfs flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp dpts:0:1023 reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp dpt:nfs reject-with icmp-port-unreachable
REJECT tcp -- anywhere anywhere tcp dpts:x11:6009 flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT tcp -- anywhere anywhere tcp dpt:xfs flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable

表示未关闭,如果防火墙已关闭,则不需要在/etc/sysconfig/iptables配置文件中添加:-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 23 --syn -j ACCEPT。

关闭防火墙:service iptables stop (重启后失效:防火墙开机自动启动)

启动防火墙:service iptables start

重启防火墙:service iptables restart

禁止防火墙开机自动启动:chkconfig iptables off

5.默认情况下Linux不允许root用户以telnet方式登录Linux主机,若要允许root用户登录可采用以下3中方法:

(1)修改/etc/pam.d/login配置文件

RedHat Linux对于远程登录的限制体现在/etc/pam.d/login文件中,把限制内容注释即可。

1

2

3

4

5

6

7

[root@vm-rhel root]# cat /etc/pam.d/login#%PAM-1.0auth       required    pam_securetty.so

auth       required    pam_stack.so service=system-auth

#auth       required    pam_nologin.so

account    required    pam_stack.so service=system-auth

password   required    pam_stack.so service=system-auth

session    required    pam_stack.so service=system-auth

session    optional    pam_console.so

(2)移除/etc/securetty文件夹

验证规则设置在/etc/securetty文件中,该文件定义了root用户只能在tty1-tty6的终端上记录,删除该文件或将其改名即可避开验证规则从而实现root用户以telnet方式远程登录Linux主机。

1

[root@vm-rhel root]# mv /etc/securetty /etc/securetty.bak

(3)先用普通用户登录,然后切换到root用户

1

2

3

[bboss@vm-rhel bboss]$ su root

Password:

[root@vm-rhel bboss]#

以上就是telnet到RedHat Linux失败原因、解决方法的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

linux是什么文件

linux截取命令是什么?

关闭linux系统端口的三种方法

deb格式和rpm格式是什么?

linux如何查看是否已安装gcc

centos和linux的区别是什么

自学linux要多长时间

linux中文件无法被root修改

查看linux系统版本可以使用什么命令

常用的linux命令

更多相关阅读请进入《redhat》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...