第一種是常用的封端口的方法:
呵呵,常用的命令如下:
禁止∶
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
這種方法有其局限性,一是現在有的bt軟件,再封鎖后會自動改端口二是我仔細研究過好幾個BT下載軟件,它們現在的announce端口現在已經用8000、8080的說,如果連這個也封,那網絡使用就有可能不正常(我這樣做過,呵呵,后來N 多人打電話找我,嚇得我馬上DEL 掉了)
第二種方法:就是用NBAR(Network-Based Application Recognition )網絡應用識別NBAR是一種動態能在四到七層尋找協議的技術,它不但能做到普通ACL能做到那樣控制靜態的TCP UDP 的報,也能做到控制一般ACLs不能做到動態的端口的那些協議(如BT)之類。
An external Packet Description Language Module(PDLM)的文件用來擴展NBAR識別的協議。(具體我也翻譯不出來,只看了個大概),
我就說說過程:1 、到http://www.cisco.com/pcgi-bin/tablebuild.pl/pdlm下載bittorrent.pdlm ,(要CCO 的)
2 、放到TFTP,然后用copy tftp disk2 (大多數應該是flash )
#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 掉了,呵呵!


