LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1563|回复: 16

为什么连不上telnet??

[复制链接]
发表于 2004-8-25 18:13:47 | 显示全部楼层 |阅读模式
我已经把/etc/xinetd.d/telnet里的disable=yes,改成no了,本机可以telnet上,为什么在远程就不可以???是不是要设置什么别的地方??
发表于 2004-8-25 18:20:43 | 显示全部楼层
check the file /etc/hosts.deny or other net config
发表于 2004-8-25 18:39:59 | 显示全部楼层
AMD-K6下面这个文件是做什么用的啊
请您用你说语言解释一下吧
谢谢您了

/etc/hosts.deny
发表于 2004-8-25 19:18:27 | 显示全部楼层
最初由 txkss 发表
AMD-K6下面这个文件是做什么用的啊
请您用你说语言解释一下吧
谢谢您了

/etc/hosts.deny


/etc/hosts.deny 定义禁止访问本机的主机


就是里面的所记录的主机和IP都不能访问你的主机。我想是不是这个原因?以前我犯过这样的错误。

关于其他的文件兄弟可以参考这个:

http://www.linuxsir.cn/forum.php?mod=viewthread&tid=131580
 楼主| 发表于 2004-8-25 19:26:33 | 显示全部楼层
我的/etc/hosts.deny和//etc/hosts.allow里都是空的阿...
发表于 2004-8-25 19:37:02 | 显示全部楼层
cat /etc/services|grep 25  看一看telnet的端口是否被封掉
chkconfig --list telnet   看看它的运行级别是否有问题
ntsysv  选中telnet


兄弟试一下吧
发表于 2004-8-25 19:38:22 | 显示全部楼层
我用的是 Slack ,所以我并不用 xinetd 的,我用的是 inetd ,我下面把我的 inetd.conf 贴出来,也许能对兄弟有一点点的用处:

# See "man 8 inetd" for more information.
#
# If you make changes to this file, either reboot your machine or send the
# inetd a HUP signal:
# Do a "ps x" as root and look up the pid of inetd. Then do a
# "kill -HUP <pid of inetd>".
# The inetd will re-read this file whenever it gets that signal.
#
# <service_name> <sock_type> <proto> <flags> <user> <server_path> <args>
#
# The first 4 services are really only used for debugging purposes, so
# we comment them out since they can otherwise be used for some nasty
# denial-of-service attacks.  If you need them, uncomment them.
# echo           stream        tcp        nowait        root        internal
# echo           dgram        udp        wait        root        internal
# discard        stream        tcp        nowait        root        internal
# discard        dgram        udp        wait        root        internal
# daytime        stream        tcp        nowait        root        internal
# daytime        dgram        udp        wait        root        internal
# chargen        stream        tcp        nowait        root        internal
# chargen        dgram        udp        wait        root        internal
#time        stream        tcp        nowait        root        internal
#time        dgram        udp        wait        root        internal
#
# These are standard services:
#
# File Transfer Protocol (FTP) server:
#ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  proftpd
#
# Telnet server:
telnet        stream  tcp     nowait  root    /usr/sbin/tcpd        in.telnetd
#
# The comsat daemon notifies the user of new mail when biff is set to y:
#comsat        dgram   udp     wait    root    /usr/sbin/tcpd  in.comsat
#
# Shell, login, exec and talk are BSD protocols
#
#shell        stream        tcp        nowait        root        /usr/sbin/tcpd        in.rshd -L
#login        stream        tcp        nowait        root        /usr/sbin/tcpd        in.rlogind
# exec        stream        tcp        nowait        root        /usr/sbin/tcpd        in.rexecd
# talk        dgram        udp        wait        root        /usr/sbin/tcpd        in.talkd
#ntalk        dgram        udp        wait        root        /usr/sbin/tcpd        in.talkd
#
# To use the talk daemons from KDE, comment the talk and ntalk lines above
# and uncomment the ones below:
# talk    dgram   udp     wait    root    /usr/sbin/tcpd  /opt/kde/bin/kotalkd
# ntalk   dgram   udp     wait    root    /usr/sbin/tcpd  /opt/kde/bin/ktalkd
#
# Kerberos authenticated services
#
# klogin        stream        tcp        nowait        root        /usr/sbin/tcpd        rlogind -k
# eklogin        stream        tcp        nowait        root        /usr/sbin/tcpd        rlogind -k -x
# kshell        stream        tcp        nowait        root        /usr/sbin/tcpd        rshd -k
#
# Services run ONLY on the Kerberos server
#
# krbupdate        stream        tcp        nowait        root        /usr/sbin/tcpd        registerd
# kpasswd        stream        tcp        nowait        root        /usr/sbin/tcpd        kpasswdd
#
# POP and IMAP mail servers
#
# Post Office Protocol version 3 (POP3) server:
#pop3    stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/popa3d
# Internet Message Access Protocol (IMAP) server:
#imap2   stream  tcp     nowait  root    /usr/sbin/tcpd  imapd
#
# The Internet Unix to Unix copy (UUCP) service:
# uucp        stream        tcp        nowait        uucp        /usr/sbin/tcpd        /usr/lib/uucp/uucico        -l
#
# Tftp service is provided primarily for booting.  Most sites
# run this only on machines acting as "boot servers."
# tftp        dgram        udp        wait        nobody        /usr/sbin/tcpd        in.tftpd
# bootps        dgram        udp        wait        root        /usr/sbin/bootpd        bootpd
#
# Finger, systat and netstat give out user information which may be
# valuable to potential "system crackers."  Many sites choose to disable
# some or all of these services to improve security.
# Try "telnet localhost systat" and "telnet localhost netstat" to see that
# information yourself!
#finger        stream        tcp        nowait        nobody        /usr/sbin/tcpd        in.fingerd -u
# systat        stream        tcp        nowait        nobody        /usr/sbin/tcpd        /bin/ps        -auwwx
# netstat        stream        tcp        nowait        root        /usr/sbin/tcpd        /bin/netstat        -a
#
# Ident service is used for net authentication
# Since we start identd as nobody, it can't write a .pid file in /var/run, so tell it
# to use /dev/null.  This is of little importance unless you run identd as a
# standalone daemon anyway.
#auth        stream        tcp        wait        nobody        /usr/sbin/in.identd        in.identd -P/dev/null
#
# These are to start Samba, an smb server that can export filesystems to
# Pathworks, Lanmanager for DOS, Windows for Workgroups, Windows95, Lanmanager
# for Windows, Lanmanager for OS/2, Windows NT, etc.  
# If you're running smbd and nmbd as daemons in /etc/rc.d/rc.samba, then you
# shouldn't uncomment these lines.
#netbios-ssn    stream  tcp     nowait  root    /usr/sbin/smbd  smbd
#netbios-ns     dgram   udp     wait    root    /usr/sbin/nmbd  nmbd
#
#Samba Web Administration Tool:
swat           stream  tcp     nowait.400 root /usr/sbin/swat  swat
#
# Sun-RPC based services.
# <service name/version><sock_type><rpc/prot><flags><user><server><args>
# rstatd/1-3        dgram        rpc/udp        wait        root        /usr/sbin/tcpd        rpc.rstatd
# rusersd/2-3        dgram        rpc/udp        wait        root        /usr/sbin/tcpd        rpc.rusersd
# walld/1        dgram        rpc/udp        wait        root        /usr/sbin/tcpd        rpc.rwalld
#
# End of inetd.conf.
发表于 2004-8-25 19:40:07 | 显示全部楼层
其中相应的 telnet 是这句:

telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd


xinetd 我不怎么的了解,所以我也不清楚是什么问题。
发表于 2004-8-26 10:49:27 | 显示全部楼层
关掉iptables
service iptables stop
chkconfig --del iptables
发表于 2004-9-4 11:28:42 | 显示全部楼层
我也遇到同样的问题了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表