方案之一當然首選局域網管理軟件,但是企事業單位往往遭遇投資的瓶頸。如果單位在這方面預算較少,或者有較高水平的網絡管理技術人員,也可以通過一些網絡方面的設置達到封堵QQ游戲的目的。本文試列舉幾種簡單易行的方法,與眾網友共同探討。
一、利用路由器封端口
禁止某些端口實現如下:
Access-list 102 deny tcp any any range 6881 6890
access-list 102 deny tcp any range 6881 6890 any
access-list 102 permit ip any any
下面是幾種即時通信軟件及P2P下載軟件的默認端口,僅供參考。
qq直播:端口 13000-14000的udp 端口;
迅雷:端口3077 3076 ;
電騾:端口4662,4661,4242 ;
酷狗:端口:7000,3318;
比特精靈:端口16881;
PPlive網絡電視:端口UDP 4004,TCP 8008。(端口如果沒有說明,均為tcp)
這種方法有其局限性,一是現在有的bt軟件,封鎖后會自動改端口;二是某些BT下載軟件的announce端口用8000、8080這樣的其他服務端口,如果封鎖,其他網絡應用就有可能不正常。
二、利用IP過濾規則
利用添加IP規則,攔截以下IP的端口,實現禁止辦公網絡內禁止聊天。
以下是常用的聊天工具的服務器 href="http://server.it168.com/" target=_blank>服務器IP以及端口,
QQ 所使用的Port: TCP 8000---8001;443;UDP 8000—1429;
QQ所用到的IP地址有:
218.17.209.23 ; 218.17.217.106; 218.18.95.135; 218.18.95.153 ;218.18.95.163
218.18.95.165; 218.18.95.219 ; 218.18.95.220; 218.18.95.221 ;218.18.95.227
218.18.95.181 ; 218.18.95.182 ;218.18.95.183 ;218.18.95.188 ;218.18.95.189
218.18.95.162 ; 218.17.217.106; 211.162.63.24; 219.133.38.9
61.144.238.15; 61.172.249.133; 61.172.249.134
MSN 所用到的地址有:(Port:TCP 1863)
207.46.106.2; 207.46.106.30; 207.46.110.100; 207.46.107.23; 207.46.106.12;
207.46.107.65; 207.46.78.94; 207.68.172.246; 207.46.104.20;
207.46.106.32; 207.46.108.20; 207.46.107.24; 207.46.107.86; 207.46.106.197;
207.46.106.42 ; 207.46.104.20 ;207.46.106.19 ;207.46.110.254
65.54.194.117 ; 64.4.33.7; 64.4.32.7; 65.54.183.195; 65.54.183.192;
65.54.194.118;203.89.193.30; 207.46.110.26 ; 207.46.110.24 ; 207.46.110.18
210.51.190.110;
需要注意的是,隨著即時通信軟件的發展,各提供商可能會改變上述IP。
三、用NBAR網絡應用識別
NBAR是一種動態能在四到七層尋找協議的技術,它不但能做到普通ACL能做到那樣控制靜態的TCP UDP的報,也能做到控制一般ACLs不能做到動態的端口的那些協議(如BT)之類.
以下是以思科路由器為例的配置過程:
#show runn
得到關于BT的部分是
class-map match-all bittorrent
match protocol bittorrent
!
policy-map bittorrent-policy
class bittorrent
drop
!
interface GigabitEthernet0/2
description CONNECT INSIDE
ip address 192.168.168.1 255.255.255.252 secondary
ip address 192.168.21.1 255.255.255.0
ip nat inside
service-policy input bittorrent-policy
service-policy output bittorrent-policy
duplex full
speed 1000
media-type rj45
no negotiation auto
對于eMule,最新version2.0的包括了emule,同樣可以:
ip nbar pdlm bittorrent.pdlm
ip nbar pdlm eDonkey.pdlm
class-map match-any bittorrent
match protocol bittorrent
match protocol edonkey
!
!
policy-map bittorrent-policy
class bittorrent
drop
!
這樣的話,Emule也能K掉了。