如何關(guān)閉企業(yè)所有IPv6通道?
從IPv4轉(zhuǎn)換到IPv6的技術(shù)其實(shí)主要是隧道技術(shù)的應(yīng)用;這是一項(xiàng)將IPv6數(shù)據(jù)包裝入IPv4數(shù)據(jù)包的技術(shù),因此這樣的數(shù)據(jù)包可以在僅限IPv4的網(wǎng)絡(luò)中進(jìn)行傳輸。這些隧道也可以用于企業(yè)網(wǎng)絡(luò)中(如穿越一些不支持IPv6的傳統(tǒng)網(wǎng)絡(luò)設(shè)備)。
當(dāng)然,網(wǎng)絡(luò)運(yùn)營(yíng)商和安全團(tuán)隊(duì)對(duì)并不贊成這樣的提議。主要的原因是隧道技術(shù)可以將真正的IPv6數(shù)據(jù)包以及網(wǎng)絡(luò)流分析器給出的與之相關(guān)的4層及以上的信息,還有安全ACL,QoS設(shè)置等統(tǒng)統(tǒng)隱藏起來(lái)。有傳言稱(chēng),使用IPv6 in IPv4的隧道技術(shù)作為一種控制方法會(huì)導(dǎo)致僵尸網(wǎng)絡(luò)。簡(jiǎn)而言之,企業(yè)網(wǎng)絡(luò)中,如果這樣的通道不是刻意為之,那么就應(yīng)該將其關(guān)閉。(注意:上面的表述僅限于企業(yè)網(wǎng)絡(luò),因?yàn)閭€(gè)人用戶(hù)可能非常樂(lè)意將其操作系統(tǒng)連接至IPv6網(wǎng)絡(luò)。)
所以,對(duì)于網(wǎng)管而言,最根本的問(wèn)題在于是否能阻止所有通道。
就一些6to4或ISATAP通道來(lái)說(shuō),要回答這個(gè)問(wèn)題并不難:只需用訪問(wèn)控制列表(ACL)阻止所有41協(xié)議即可,如:
- access-list deny 41 any any
另一種通道是Teredo,它需要依賴(lài)UDP封裝技術(shù)。Teredo使用的默認(rèn)端口是3544.或許有人想使用如下的訪問(wèn)控制列表來(lái)解決:
- access-list deny udp any any eq 3544
- access-list deny udp any eq 3544 any
但是,上面的訪問(wèn)控制列表會(huì)被恰好需要使用3544端口的普通數(shù)據(jù)包錯(cuò)誤攔截。此外,不法用戶(hù)也可以改變UDP.這種情況下,思科Flexible Pattern Matching的功能和靈活性就有了用武之地:FPM可以根據(jù)指定的偏移量來(lái)檢查任意數(shù)據(jù)包,且要在***平臺(tái)的軟件中完成;也就是說(shuō),F(xiàn)PM只在合適的位置使用。找出Teredo數(shù)據(jù)包的技巧就是要搜索所有UDP數(shù)據(jù)包,目的是獲取所有以2001::/32開(kāi)頭的Teredo IPv6地址;請(qǐng)注意,此處我們使用的是/32,而不是/16,實(shí)際上,應(yīng)該是2001:0::/32.還要對(duì)IP數(shù)據(jù)做進(jìn)一步的檢查。
完整的FPM配置如下:
- class-map type stack match-all cm-ip-udp
- match field IP protocol eq 17 next UDP
- class-map type access-control match-all cm-teredo1
- match start udp payload-start offset 0 size 1 eq 0x60 mask 15
- match start udp payload-start offset 8 size 4 eq 0x20010000
- class-map type access-control match-all cm-teredo2
- match start udp payload-start offset 0 size 1 eq 0x60 mask 15
- match start udp payload-start offset 24 size 4 eq 0x20010000
- policy-map type access-control pm-teredo
- class cm-teredo1
- drop
- class cm-teredo2
- drop
- policy-map type access-control pm-udp-teredo
- class cm-ip-udp
- service-policy pm-teredo
***一個(gè)步驟是將這一服務(wù)策略應(yīng)用到界面:
- interface GigabitEthernet1/36
- service-policy type access-control in pm-udp-teredo
***,要請(qǐng)大家注意,另一種阻止所有通道的方法是指定所有網(wǎng)絡(luò)主機(jī)上的配置以禁用通道。當(dāng)然,這僅適用于企業(yè)網(wǎng)絡(luò)。例如,在使用Vista系統(tǒng)的電腦中可以使用如下命令:
- netsh interface 6to4 set state state=disabled undoonstop=disabled
- netsh interface isatap set state state=disabled
- netsh interface teredo set state type=disabled