|
![]() | 作者: X-Man [ivory]
![]() |
登录 |
MANDRAKE 8.2下的TELNET服务不是系统默认打开的,请问怎么打开它,还有如何配置它.谢谢!!! |
地主 发表时间: 06/17 20:57 |
![]() | 回复: X-Man [ivory] ![]() |
登录 |
知道的请说啊~~~谢谢!! |
B1层 发表时间: 06/18 17:28 |
![]() | 回复: X-Man [ivory] ![]() |
登录 |
真的是没有人知道啊还是不想理我啊?? |
B2层 发表时间: 06/19 16:43 |
![]() | 回复: NetDemon [netdemon] ![]() |
登录 |
不是inetd.conf 就是 xinetd.conf inetd.conf没什么好说的 把 21前面 的#去掉了重起进程就行xinetd.conf 就有点麻烦 xinetd的默认配置文件是/etc/xinetd.conf,它看起来尽管和老版本的/etc/inetd.conf完全不同,其实只是 以一个脚本的形式将inetd中每一行指定的服务扩展为一个/etc/xinetd.d/下的配置文件。其格式为: service service-name { Socket_type = xxx; //TCP/IP socket type,such as stream,dgram,raw,.... protocol = xxx; //服务使用的协议 Server = xxx; //服务daemon的完整路径 Server_args = xxx; //服务的参数 Port = xxx; //指定服务的端口号 Wait = xxx; //是否阻塞服务,即单线程或多线程 User = xxx; //服务进程的uid Group = xxx; //gid REUSE = xxx; //可重用标志 Disabled = yes/no; //是否禁用 ...... } 我们以ftp和telnet为例,说明配置过程。 在/etc/xinetd.d目录下,编辑ftp和telnet ftp如下: service proftpd { disable = no port = 21 socket_type = stream protocol = tcp user = root server = /usr/local/sbin/in.proftpd wait = no } telnet如下: Service telnetd { disable = no port = 23 Socket_type=stream protocol=tcp wait=tcp user=root server=/usr/sbin/in.telnetd } 然后,重新启动服务 #/etc/rc.d/init.d/xinetd restart 或:#killall -HUP xinetd 这时候,telnet localhost和ftp localhost都应该没有问题了。 但是,从局域网内的其他机器仍然可能使用不了ftp和telnet服务。原来还有一个地方需要设置, 就是ipchains,它具有firewall和路由的功能。 #vi /etc/sysconfig/ipchains,大家发现什么了? # Firewall configuration written by lokkit # Manual customization of this file is not recommended. # Note: ifup-post will punch the current nameservers through the # firewall; such entries will *not* be listed here. :input ACCEPT :forward ACCEPT :output ACCEPT -A input -s 0/0 -d 0/0 -i lo -j ACCEPT -A input -p tcp -s 0/0 -d 0/0 0:1023 -y -j REJECT //******** -A input -p tcp -s 0/0 -d 0/0 2049 -y -j REJECT -A input -p udp -s 0/0 -d 0/0 0:1023 -j REJECT //******** -A input -p udp -s 0/0 -d 0/0 2049 -j REJECT -A input -p tcp -s 0/0 -d 0/0 6000:6009 -y -j REJECT -A input -p tcp -s 0/0 -d 0/0 7100 -y -j REJECT 没错,出于安全,ipchains把0-1023端口的入口全部封闭了。所以必须将它们打开。 将其中我加了//********标记的行中的REJECT修改为ACCEPT, 然后重新启动机器,一切OK. 其他的服务,如rlogin,talk等和上述配置基本相同,大家自己去摸索吧。不过,如果要更深入的了解, 可还要下一番工夫了。 :) [此贴被 NetDemon(netdemon) 在 6月20日5时15分 编辑过] |
B3层 发表时间: 6/20 5:29 |
![]() | 回复: TomyChen [tomychen] ![]() |
登录 |
嘻嘻。。。老大漏了一点! 现在几乎都已经用xinetd了 操作如下: #vi /etc/xinetd.d/telnet 代码: 然后呢把 它改成 代码: 就是把 disable = yes 改成no. 还有如果启动防火墙的话最好关上(我用的是redhat)。 然后 #killall -HUP xinetd 重启xinetd 或者 #/etc/init.d/xinetd restart |
B4层 发表时间: 06/20 09:22 |
|
20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon
粤ICP备05087286号