要求:配置telnet服务器并通过xinetd实现以下访问控制功能

1. telnet服务服务器的最大连接数是20个

2. 若每秒的telnet请求达到4个,则服务自动停止1分钟

3. 只允许来自trust.com域和192.168.0.0/24这个网络的主机访问你的telnet服务器

4. 拒绝192.168.0.100和bad.trust.com这两台主机访问你的telnet服务器

5. 允许以上的客户端在9:00-11:00 13:00-15:00访问telnet服务器

6. 允许每个客户端最多同时有2个telnet联系到服务器

 

实验环境:

1. WindowsXP主机,IP=192.168.0.2

2. Redhat Linux5虚拟机,IP=192.168.0.1

[root@localhost ~]# cat /etc/hosts

127.0.0.1 localhost.localdomain localhost

192.168.0.1 ns.trust.com ns

192.168.0.2 bad.trust.com bad

 

解决问题:

[root@localhost ~]# vi /etc/xinetd.d/telnet

instances = 20

cps = 4 60

only_from = 192.168.0.0/24 .trust.com

no_access = 192.168.0.1 bad.trust.com

access_times = 9:00-11:00 13:00-15:00

per_source = 2

 

[root@localhost ~]# service xinetd restart

(责任编辑:A6)

本站文章仅代表作者观点,本站仅传递信息,并不表示赞同或反对.转载本站点内容时请注明来自-Linux伊甸园。如不注明,将根据《互联网著作权行政保护办法》追究其相应法律责任。

--------------------next---------------------