Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1173264
  • 博文数量: 128
  • 博客积分: 10010
  • 博客等级: 上将
  • 技术积分: 4870
  • 用 户 组: 普通用户
  • 注册时间: 2007-04-19 14:28
文章分类

全部博文(128)

文章存档

2010年(2)

2009年(22)

2008年(104)

我的朋友

分类: LINUX

2008-06-11 17:43:26

RHCE实验:Linux下基于xinetd的访问控制

 
 
     要求:配置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

阅读(1126) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~