路由器需要做的上网行为管理
热12已有 1322 次阅读 2011-06-30 18:471、限制访问部分网站(QQ空间、土豆等)
ip inspect name web http java-list 5 urlfilter
ip urlfilter allow-mode on
ip urlfilter exclusive-domain deny .youku.com
ip urlfilter exclusive-domain deny .tudou.com
ip urlfilter exclusive-domain deny .qzone.qq.com
ip urlfilter exclusive-domain deny home.pengyou.com
ip urlfilter exclusive-domain deny .video.sina.com.cn
//如果要删除一条,就要清除缓存:clear ip urlfilter cache all
inter g0/0
ip inspect web in
问题:无法做到针对某些主机不进行限制。
2、限制下载上传速度(200K)
可以实现,但是最好在三层交换机上做,减轻路由器的负担。
一、在路由器上限
inter g0/0
access-list 111 deny ip host 192.168.10.66 any //这台主机不限速
access-list 111 permit ip 192.168.0.0 0.0.255.255 any
rate-limit input access-group 111 2000000 40000 60000 conform-action transmit exceed-action drop
问题:限制后,PING g0/0这个端口的IP就会掉包。
二、在三层交换机上限
access-list 100 permit ip any 192.168.0.0 0.0.255.255 //下载
access-list 101 permit ip 192.168.0.0 0.0.255.255 any //上传
!
class-map match-all up
match access-group 101
class-map match-all down
match access-group 100
!
policy-map wan_up
class up
police 2000000 bps 200000 byte conform-action transmit exceed-action drop
trust dscp
policy-map wan_down
class down
police 2000000 bps 200000 byte conform-action transmit exceed-action drop
trust dscp
!
inter range f0/1 //连接内网的接口,限制上传
service-policy input wan_up
inter f0/8 //连接2921路由器的接口,限制下载
service-policy input wan_down
3、P2P限制
class-map match-any p2p
description any p2p
match protocol gnutella //网络文件交换软件
match protocol kazaa2 //世界顶级 P2P 软件
match protocol fasttrack //半分布式P2P系统
match protocol pcanywhere //远程控制软件
match protocol novadigm //设备性能管理软件
match protocol cuseeme //世界第一个可视网聊室站点
match protocol bittorrent //内容分发协议(BT)
match protocol edonkey //电驴
match protocol sap-pgm
match protocol sap-app
match protocol sap-msg
match protocol winmx //点对点(Peer to Peer)档案分享软件
问题:不知道是哪个协议限制了QQ的远程协助,用户要求用QQ远程……
4、游戏限制(QQ游戏)
access-list 2 deny host 58.60.9.41
access-list 2 deny host 58.60.9.62
access-list 2 deny host 58.60.9.63
access-list 2 deny host 58.60.9.64
access-list 2 deny host 58.60.11.31
……
inter g0/1
ip access-group 2 out
问题:这个功能是使用禁止访问QQ游戏服务器的IP地址的方法,如有新的QQ游戏服务器IP,需及时添加。
5、部分电脑不允许访问外网(192.168.18.35)
access-list 1 deny 192.168.18.35 0.0.255.255
access-list 1 permit 192.168.0.0 0.0.255.255
//列表1是NAT的访问控制列表
6、部分电脑不受以上限制(192.168.10.66)
问题:这个只能对其不限制速度,其他都会受到限制。







发表评论 评论 (16 个评论)
是IOS咩?
不过貌似思科的应用防火墙也没有很符合国内要求的功能捏~~