国产一级一区二区_segui88久久综合9999_97久久夜色精品国产_欧美色网一区二区

掃一掃
關(guān)注微信公眾號

Cisco路由器安全配置方案
2007-12-24   IT實驗室

一、 路由器網(wǎng)絡(luò)服務(wù)安全配置

  1 禁止CDP(Cisco Discovery Protocol)。如:Router(Config)#no cdp run Router(Config-if)# no cdp enable

  2 禁止其他的TCP、UDP Small服務(wù)。

  Router(Config)# no service tcp-small-servers Router(Config)# no service udp-samll-servers

  3 禁止Finger服務(wù)。

  Router(Config)# no ip finger Router(Config)# no service finger

  4 建議禁止HTTP服務(wù)。

  Router(Config)# no ip http server如果啟用了HTTP服務(wù)則需要對其進行安全配置:設(shè)置用戶名和密碼;采用訪問列表進行控制。

  5 禁止BOOTp服務(wù)。

  Router(Config)# no ip bootp server

  6 禁止IP Source Routing. Router(Config)# no ip source-route

  7 建議如果不需要ARP-Proxy服務(wù)則禁止它,路由器默認識開啟的。

  Router(Config)# no ip proxy-arp Router(Config-if)# no ip proxy-arp

  8禁止IP Directed Broadcast. Router(Config)# no ip directed-broadcast

  9 禁止IP Classless. Router(Config)# no ip classless

  10 禁止ICMP協(xié)議的IP Unreachables, Redirects, Mask Replies. Router(Config-if)# no ip unreacheables Router(Config-if)# no ip redirects Router(Config-if)# no ip mask-reply

  11 建議禁止SNMP協(xié)議服務(wù)。在禁止時必須刪除一些SNMP服務(wù)的默認配置。如:Router(Config)# no snmp-server community public Ro Router(Config)# no snmp-server community admin RW

  12 如果沒必要則禁止WINS和DNS服務(wù)。

  Router(Config)# no ip domain-lookup如果需要則需要配置:Router(Config)# hostname Router Router(Config)# ip name-server 219.150.32.xxx

  13 明確禁止不使用的端口。如:Router(Config)# interface eth0/3 Router(Config)# shutdown</P><P>

二、路由器訪問控制的安全配置(可選)

  路由器的訪問控制是比較重要的安全措施,但是目前由于需求不明確,可以考慮暫時不實施。作為建議提供。

  1 建議不要遠程訪問路由器。即使需要遠程訪問路由器,建議使用訪問控制列表和高強度的密碼控制。

  2 嚴格控制CON端口的訪問。配合使用訪問控制列表控制對CON口的訪問。

  配合使用訪問控制列表控制對CON口的訪問。

  如:Router(Config)#Access-list 1 permit 192.168.0.1 Router(Config)#line con 0 Router(Config-line)#Transport input none Router(Config-line)#Login local Router(Config-line)#Exec-timeoute 5 0 Router(Config-line)#access-class 1 in Router(Config-line)#end同時給CON口設(shè)置高強度的密碼。
  3 如果不使用AUX端口,則禁止這個端口。默認是未被啟用。禁止如:Router(Config)#line aux 0 Router(Config-line)#transport input none Router(Config-line)#no exec 4 建議采用權(quán)限分級策略。如:Router(Config)#username test privilege 10 xxxx Router(Config)#privilege EXEC level 10 telnet Router(Config)#privilege EXEC level 10 show ip access-list 5 為特權(quán)模式的進入設(shè)置強壯的密碼。不要采用enable password設(shè)置密碼。而要采用enable secret命令設(shè)置。并且要啟用Service password-encryption. Router(config)#service password-encryption Router(config)#enable secret 6 控制對VTY的訪問。如果不需要遠程訪問則禁止它。如果需要則一定要設(shè)置強壯的密碼。由于VTY在網(wǎng)絡(luò)的傳輸過程中為加密,所以需要對其進行嚴格的控制。如:設(shè)置強壯的密碼;控制連接的并發(fā)數(shù)目;采用訪問列表嚴格控制訪問的地址;可以采用AAA設(shè)置用戶的訪問控制等。

三、路由器路由協(xié)議安全配置1 建議啟用IP Unicast Reverse-Path Verification.它能夠檢查源IP地址的準確性,從而可以防止一定的IP Spooling.但是它只能在啟用CEF(Cisco Express Forwarding)的路由器上使用。   uRPF有三種方式,strict方式、ACL方式和loose方式。在接入路由器上實施時,對于通過單鏈路接入網(wǎng)絡(luò)的用戶,建議采用strict方式;對于通過多條鏈路接入到網(wǎng)絡(luò)的用戶,可以采用ACL方式和loose方式。在出口路由器上實施時,采用loose方式。

Strict方式:Router# config t! 啟用CEF Router(Config)# ip cef!啟用Unicast Reverse-Path Verification Router(Config)# interface eth0/1 Router(Config-if)# ip verify unicast reverse-path

ACL方式:interface pos1/0 ip verify unicast reverse-path 190 access-list 190 permit ip {customer network} {customer network mask} any access-list 190 deny ip any any [log]這個功能檢查每一個經(jīng)過路由器的數(shù)據(jù)包的源地址,若是不符合ACL的,路由器將丟棄該數(shù)據(jù)包。   Loose方式:interface pos 1/0 ip ver unicast source reachable-via any這個功能檢查每一個經(jīng)過路由器的數(shù)據(jù)包,在路由器的路由表中若沒有該數(shù)據(jù)包源IP地址的路由,路由器將丟棄該數(shù)據(jù)包。

2 啟用OSPF路由協(xié)議的認證。默認的OSPF認證密碼是明文傳輸?shù)模ㄗh啟用MD5認證。并設(shè)置一定強度密鑰(key,相對的路由器必須有相同的Key)。

3 RIP協(xié)議的認證。只有RIP-V2支持,RIP-1不支持。建議啟用RIP-V2.并且采用MD5認證。普通認證同樣是明文傳輸?shù)摹?

  4 啟用passive-interface命令可以禁用一些不需要接收和轉(zhuǎn)發(fā)路由信息的端口。建議對于不需要路由的端口,啟用passive-interface.但是,在RIP協(xié)議是只是禁止轉(zhuǎn)發(fā)路由信息,并沒有禁止接收。在OSPF協(xié)議中是禁止轉(zhuǎn)發(fā)和接收路由信息。

  5 啟用訪問列表過濾一些垃圾和惡意路由信息,控制網(wǎng)絡(luò)的垃圾信息流。如:Router(Config)# access-list 10 deny 192.168.1.0 0.0.0.255 Router(Config)# access-list 10 permit any! 禁止路由器接收更新192.168.1.0網(wǎng)絡(luò)的路由信息Router(Config)# router ospf 100 Router(Config-router)# distribute-list 10 in!禁止路由器轉(zhuǎn)發(fā)傳播192.168.1.0網(wǎng)絡(luò)的路由信息Router(Config)# router ospf 100 Router(Config-router)# distribute-list 10 out</P><P>四、路由器其他安全配置1 IP欺騙簡單防護。如過濾非公有地址訪問內(nèi)部網(wǎng)絡(luò)。過濾自己內(nèi)部網(wǎng)絡(luò)地址;回環(huán)地址(127.0.0.0/8);RFC1918私有地址;DHCP自定義地址(169.254.0.0/16);科學(xué)文檔作者測試用地址(192.0.2.0/24);不用的組播地址(224.0.0.0/4);SUN公司的古老的測試地址(20.20.20.0/24;204.152.64.0/23);全網(wǎng)絡(luò)地址(0.0.0.0/8)。

  Router(Config)# access-list 100 deny ip 127.0.0.0 0.255.255.255 any Router(Config)# access-list 100 deny ip 192.168.0.0 0.0.255.255 any Router(Config)# access-list 100 deny ip 172.16.0.0 0.15.255.255 any Router(Config)# access-list 100 deny ip 10.0.0.0 0.255.255.255 any Router(Config)# access-list 100 deny ip 169.254.0.0 0.0.255.255 any Router(Config)# access-list 100 deny ip 192.0.2.0 0.0.0.255 any Router(Config)# access-list 100 deny ip 224.0.0.0 15.255.255.255 any Router(Config)# access-list 100 deny ip 20.20.20.0 0.0.0.255 any Router(Config)# access-list 100 deny ip 204.152.64.0 0.0.2.255 any Router(Config)# access-list 100 deny ip 0.0.0.0 0.255.255.255 any Router(Config)# access-list 100 permit ip any any Router(Config-if)# ip access-group 100 in

2 建議采用訪問列表控制流出內(nèi)部網(wǎng)絡(luò)的地址必須是屬于內(nèi)部網(wǎng)絡(luò)的。(可選)如:Router(Config)# no access-list 101 Router(Config)# access-list 101 permit ip 192.168.0.0 0.0.255.255 any Router(Config)# access-list 101 deny ip any any Router(Config)# interface eth 0/1 Router(Config-if)# description “internet Ethernet”   Router(Config-if)# ip address 192.168.0.254 255.255.255.0 Router(Config-if)# ip access-group 101 in

其他可選項:1、 建議啟用SSH,廢棄掉Telnet.但只有支持并帶有IPSec特征集的IOS才支持SSH.并且IOS12.0-IOS12.2僅支持SSH-V1.如下配置SSH服務(wù)的例子:Router(Config)# config t Router(Config)# no access-list 22 Router(Config)# access-list 22 permit 192.168.0.22 Router(Config)# access-list deny any Router(Config)# username test privilege 10 ****! 設(shè)置SSH的超時間隔和嘗試登錄次數(shù)Router(Config)# ip ssh timeout 90 Router(Config)# ip ssh anthentication-retries 2 Router(Config)# line vty 0 4 Router(Config-line)# access-class 22 in Router(Config-line)# transport input ssh Router(Config-line)# login local Router(Config-line)# exit!啟用SSH服務(wù),生成RSA密鑰對。   Router(Config)# crypto key generate rsa The name for the keys will be: router.xxx Choose the size of the key modulus in the range of 360 to 2048 for your General Purpose Keys .Choosing a key modulus greater than 512 may take a few minutes. How many bits in the modulus[512]: 2048 Generating RSA Keys……   [OK] Router(Config)#

2、 TCP SYN的防范。如:A: 通過訪問列表防范。   Router(Config)# no access-list 106 Router(Config)# access-list 106 permit tcp any 192.168.0.0 0.0.0.255 established Router(Config)# access-list 106 deny ip any any Router(Config)# interface eth 0/2 Router(Config-if)# description “external Ethernet”   Router(Config-if)# ip address 192.168.1.254 255.255.255.0 Router(Config-if)# ip access-group 106 in B:通過TCP截取防范。(這會給路由器產(chǎn)生一定負載)   Router(Config)# ip tcp intercept list 107 Router(Config)# access-list 107 permit tcp any 192.168.0.0 0.0.0.255 Router(Config)# access-list 107 deny ip any any Router(Config)# interface eth0 Router(Config)# ip access-group 107 in

3、 LAND.C 進攻的防范。   Router(Config)# access-list 107 deny ip host 192.168.1.254 host 192.168.1.254 Router(Config)# access-list 107 permit ip any any Router(Config)# interface eth 0/2 Router(Config-if)# ip address 192.168.1.254 255.255.255.0 Router(Config-if)# ip access-group 107 in

4、 Smurf進攻的防范。   Router(Config)# access-list 108 deny ip any host 192.168.1.255 Router(Config)# access-list 108 deny ip any host 192.168.1.0 Router(Config)# access-list 108 permit ip any any Router(Config-if)# ip access-group 108 in

5、 ICMP協(xié)議的安全配置。對于進入ICMP流,我們要禁止ICMP協(xié)議的ECHO、Redirect、Mask request.也需要禁止TraceRoute命令的探測。對于流出的ICMP流,我們可以允許ECHO、Parameter Problem、Packet too big.還有TraceRoute命令的使用。! outbound ICMP Control Router(Config)# access-list 110 deny icmp any any echo Router(Config)# access-list 110 deny icmp any any redirect Router(Config)# access-list 110 deny icmp any any mask-request Router(Config)# access-list 110 permit icmp any any! Inbound ICMP Control Router(Config)# access-list 111 permit icmp any any echo Router(Config)# access-list 111 permit icmp any any Parameter-problem Router(Config)# access-list 111 permit icmp any any packet-too-big Router(Config)# access-list 111 permit icmp any any source-quench Router(Config)# access-list 111 deny icmp any any! Outbound TraceRoute Control Router(Config)# access-list 112 deny udp any any range 33400 34400! Inbound TraceRoute Control Router(Config)# access-list 112 permit udp any any range 33400 34400

6、 DDoS(Distributed Denial of Service)的防范。! The TRINOO DDoS system Router(Config)# access-list 113 deny tcp any any eq 27665 Router(Config)# access-list 113 deny udp any any eq 31335 Router(Config)# access-list 113 deny udp any any eq 27444! The Stacheldtraht DDoS system Router(Config)# access-list 113 deny tcp any any eq 16660 Router(Config)# access-list 113 deny tcp any any eq 65000! The TrinityV3 System Router(Config)# access-list 113 deny tcp any any eq 33270 Router(Config)# access-list 113 deny tcp any any eq 39168! The SubSeven DDoS system and some Variants Router(Config)# access-list 113 deny tcp any any range 6711 6712 Router(Config)# access-list 113 deny tcp any any eq 6776 Router(Config)# access-list 113 deny tcp any any eq 6669 Router(Config)# access-list 113 deny tcp any any eq 2222 Router(Config)# access-list 113 deny tcp any any eq 7000 Router(Config)# access-list 113 permit ip any any Router(Config-if)# ip access-group 113 in

7、 Sql蠕蟲的防范Router(Config)# access-list 114 deny udp any any eq 1434 Router(Config)# access-list 114 permit ip any any Router(Config-if)# ip access-group 114 in

8、 減少BGP的收斂時間,保證黑客攻擊后網(wǎng)絡(luò)能盡快恢復(fù)。

  

建議增加如下配置:(需在所有運行BGP的路由器上增加)

  1、在每個BGP互連的接口上,增加hold-queue 1500命令,將接口的hold-queue由默認的75增加到1500.在做此配置之前需要先檢查板卡的內(nèi)存,確保其free memory至少為20M.

  2、增加以下有關(guān)TCP的配置,增強BGP的收斂性能。

  ip tcp selective-ack ip tcp mss 1460 ip tcp window-size 65535 ip tcp queuemax 50 ip tcp path-mtu-discovery 
  

  3、在GSR上,增加ip cef linecard ipc memory 10000命令,提高download FIB的速度。</P><P>9、 啟用CAR和系統(tǒng)日志等來增強(略)</P><P>其他注意事項:

  1,及時的升級IOS軟件,并且要迅速的為IOS安裝補丁。

  2,要嚴格認真的為IOS作安全備份。

  3,要為路由器的配置文件作安全備份。

4,購買UPS設(shè)備,或者至少要有冗余電源。

  5,要有完備的路由器的安全訪問和維護記錄日志。

熱詞搜索:

上一篇:正確配置路由協(xié)議合理使用路由器資源
下一篇:路由器配置命令詳細列表(1)

分享到: 收藏
主站蜘蛛池模板: 太原市| 嵊州市| 通江县| 石棉县| 拜城县| 巍山| 东台市| 嘉鱼县| 泰兴市| 星座| 蒙城县| 门头沟区| 富川| 淅川县| 兴安盟| 麦盖提县| 永兴县| 那坡县| 嘉峪关市| 房产| 遵义市| 马龙县| 耿马| 雅安市| 徐闻县| 马龙县| 望奎县| 项城市| 忻州市| 海丰县| 厦门市| 平罗县| 奉节县| 扎赉特旗| 岑巩县| 上犹县| 铜梁县| 丰顺县| 榕江县| 黄冈市| 汶上县|