強化網絡互連設備安全配置腳本

 

service nagle //Nagle減輕TCP協議在傳送小包上的問題,優化登錄連接進程,減少路由器負擔;
service tcp-keepalives-in //刪除意外中斷的tcp連接,提供保持活動功能來檢測和刪除死連接,
service tcp-keepalives-out //允許其他設備使用VTP線路;
service timestamps debug datetime msec show-timezone localtime
service timestamps log deatetime msec show-timezone localtime
service password-encryption //加密未加密的口令;
!
no service dhcp //阻止路由器成爲DHCP服務器或中繼代理;(根據實際情況做)
logging buffered 16384
no logging console
enable secret children
no enable password
! AAA驗證
aaa new-model
aaa authentication login xjccw group radius local
username xjccw password 7 095444070D
radius-server host 10.60.4.35 auth-port 1645 acct-port 1646
radius-server timeout 120
radius-server key 7 083946401D
! AAA失效後執行
username xjccw password xjccw
! 關閉http-server
no ip http server
no ip http secure-server
! 支持非零子網路由及無類路由
ip subzero
ip classess
! 關閉不需要的服務
no services pad //提供pad(packet assembler/disassembler數據包組合/分拆)功能,成爲***的立足點;
no services tcp-small-servers //tcp、udp低端口服務(port:19或更低),容易建立DOS***,
no services udp-small-servers //同時佔用其他進程的CPU資源;抵禦UDP回聲fraggle***;
!
no boot network //啓動過程中用到TFTP,對加載過程沒有安全保護;
no service config //如果NVRAM沒有配置,使用TFTP廣播發現配置文件,存在安全隱患;
!
no services finger //finger檢測誰登陸一臺主機的程序,如果有***知道誰在路由器上,將很
no ip finger //容易得到任何有效用戶的用戶ID;
!
no ip identd //identd(tcp 113)允許遠程設備爲識別目的查詢TCP端口,identd不提供認證功能;
no ip source-route //源路由可以在ip包頭中指定數據包應該的實際路由,帶來網絡安全問題;
no ip bootp server //容易DOS***,bootp沒有安全機制;
no ip domain-lookup //可以立即響應“%Unknown command”消息,指示沒有可用名稱解析;
! 開啓cef,快速轉發及mpls自身分標籤行爲
ip cef
! ntp功能啓用
clock timezone CHN 8
ntp authenticate
ntp update-calendar
ntp server 132.163.4.101
! 環回口
inter lo0
no ip redirects
no ip unreachables
no ip proxy-arp
! 接口或子接口
inter g*/*
Descri connect to **** //描述接口,使show interface des 更清晰直接;
no ip redirects // ***通過破壞路由表,利用此功能發起DOS***;
no ip unreachables // smurf***的形式,利用icmp不可達,更改源地址改爲***設備地址;
no ip mask-reply // smurf***的改進版,發起定向廣播DOS***;
//使用ICMP掩碼答覆消息,瞭解到設備的身份信息,利用漏洞***;
no ip directed-broadcast // 定向廣播是可路由的,DOS***利用此特性;
no ip proxy-arp // 關閉代理ARP功能;
no mop enabled // 維護操作系統協議(maintenance operation protocol),如果打開了mop服務,cisco路由器可能從mop服務器上下載ios,要阻止一個mop DOS***,接口上關閉mop服務;
ip route-cache flow //啓動 netflow,跟蹤DOS***源;
ip verify unicast reverse-path //單播逆向路徑轉發以幫助阻止數據包欺騙;
ip access-group BinDu in //病毒ACL接口應用
ip access-group BinDu out
! 病毒ACL配置
deny icmp any any echo-reply //拒絕任何應答
deny icmp any any host-unreachable //拒絕任何無法接通的主機
deny udp any any eq snmp //拒絕引入的SNMP
deny tcp any any eq 135
deny udp any any eq 135
deny tcp any any eq 136
deny tcp any any eq 137
deny tcp any any eq 138
deny tcp any any eq 139
deny tcp any any eq 445
deny udp any any eq 445
deny tcp any any eq 593
deny tcp any any eq 707
deny tcp any any eq 1023
deny udp any any eq 1052
deny tcp any any eq 1068
deny tcp any any eq 1080
deny udp any any eq 1025
deny tcp any any eq 1433
deny tcp any any eq 1434
deny udp any any eq 1434
deny udp any any eq 1978
access-list 101 deny udp any any eq 2000 //拒絕引入的openwindows
access-list 101 deny tcp any any eq 2000 //拒絕引入的openwindows
deny udp any any eq 2002
access-list 101 deny udp any any eq 2049 //拒絕引入的NFS
access-list 101 deny tcp any any eq 2049 //拒絕引入的 NFS
deny tcp any any eq 2745
deny tcp any any eq 2847
deny tcp any any eq 3055
deny tcp any any eq 3127
deny tcp any any eq 3128
deny tcp any any eq 3198
deny tcp any any eq 3372
deny udp any any eq 4156
deny tcp any any eq 4444
deny udp any any eq 4444
deny tcp any any eq 4662
deny tcp any any eq 6000
deny tcp any any eq 8006
deny udp any any eq 8006
deny tcp any any eq 8094
deny udp any any eq 8094
deny udp any any eq 10702
deny udp any any eq 13072
deny udp any any eq 16881
deny udp any any eq netbios-ns
deny udp any any eq netbios-dgm
access-list 101 permit ip any any //其它均允許
!
logging source-interface Loopback0
logging 10.60.4.49
logging trap informational
logging facility local1
!
snmp-server community xjccw RO
snmp-server community xjccw2007 RW
snmp-server host 10.60.4.49 xjccw
!
line con 0
transport input none
line aux 0
transport input none
no exec
line vty 0 4
exec-timeout 60 0
password xjccw
login authentication xjccw
access-class Telnet in
!
scheduler allocate 3000 1000 //限制CPU資源用來處理接口中斷情況,3000是處理中斷的毫秒數,1000是指定保持中斷的毫秒數;
 
 

service nagle //Nagle減輕TCP協議在傳送小包上的問題,優化登錄連接進程,減少路由器負擔;
service tcp-keepalives-in //刪除意外中斷的tcp連接,提供保持活動功能來檢測和刪除死連接,
service tcp-keepalives-out //允許其他設備使用VTP線路;
service timestamps debug datetime msec show-timezone localtime
service timestamps log deatetime msec show-timezone localtime
service password-encryption //加密未加密的口令;
!
no service dhcp //阻止路由器成爲DHCP服務器或中繼代理;(根據實際情況做)
logging buffered 16384
no logging console
enable secret children
no enable password
! AAA驗證
aaa new-model
aaa authentication login xjccw group radius local
username xjccw password 7 095444070D
radius-server host 10.60.4.35 auth-port 1645 acct-port 1646
radius-server timeout 120
radius-server key 7 083946401D
! AAA失效後執行
username xjccw password xjccw
! 關閉http-server
no ip http server
no ip http secure-server
! 支持非零子網路由及無類路由
ip subzero
ip classess
! 關閉不需要的服務
no services pad //提供pad(packet assembler/disassembler數據包組合/分拆)功能,成爲***的立足點;
no services tcp-small-servers //tcp、udp低端口服務(port:19或更低),容易建立DOS***,
no services udp-small-servers //同時佔用其他進程的CPU資源;抵禦UDP回聲fraggle***;
!
no boot network //啓動過程中用到TFTP,對加載過程沒有安全保護;
no service config //如果NVRAM沒有配置,使用TFTP廣播發現配置文件,存在安全隱患;
!
no services finger //finger檢測誰登陸一臺主機的程序,如果有***知道誰在路由器上,將很
no ip finger //容易得到任何有效用戶的用戶ID;
!
no ip identd //identd(tcp 113)允許遠程設備爲識別目的查詢TCP端口,identd不提供認證功能;
no ip source-route //源路由可以在ip包頭中指定數據包應該的實際路由,帶來網絡安全問題;
no ip bootp server //容易DOS***,bootp沒有安全機制;
no ip domain-lookup //可以立即響應“%Unknown command”消息,指示沒有可用名稱解析;
! 開啓cef,快速轉發及mpls自身分標籤行爲
ip cef
! ntp功能啓用
clock timezone CHN 8
ntp authenticate
ntp update-calendar
ntp server 132.163.4.101
! 環回口
inter lo0
no ip redirects
no ip unreachables
no ip proxy-arp
! 接口或子接口
inter g*/*
Descri connect to **** //描述接口,使show interface des 更清晰直接;
no ip redirects // ***通過破壞路由表,利用此功能發起DOS***;
no ip unreachables // smurf***的形式,利用icmp不可達,更改源地址改爲***設備地址;
no ip mask-reply // smurf***的改進版,發起定向廣播DOS***;
//使用ICMP掩碼答覆消息,瞭解到設備的身份信息,利用漏洞***;
no ip directed-broadcast // 定向廣播是可路由的,DOS***利用此特性;
no ip proxy-arp // 關閉代理ARP功能;
no mop enabled // 維護操作系統協議(maintenance operation protocol),如果打開了mop服務,cisco路由器可能從mop服務器上下載ios,要阻止一個mop DOS***,接口上關閉mop服務;
ip route-cache flow //啓動 netflow,跟蹤DOS***源;
ip verify unicast reverse-path //單播逆向路徑轉發以幫助阻止數據包欺騙;
ip access-group BinDu in //病毒ACL接口應用
ip access-group BinDu out
! 病毒ACL配置
deny icmp any any echo-reply //拒絕任何應答
deny icmp any any host-unreachable //拒絕任何無法接通的主機
deny udp any any eq snmp //拒絕引入的SNMP
deny tcp any any eq 135
deny udp any any eq 135
deny tcp any any eq 136
deny tcp any any eq 137
deny tcp any any eq 138
deny tcp any any eq 139
deny tcp any any eq 445
deny udp any any eq 445
deny tcp any any eq 593
deny tcp any any eq 707
deny tcp any any eq 1023
deny udp any any eq 1052
deny tcp any any eq 1068
deny tcp any any eq 1080
deny udp any any eq 1025
deny tcp any any eq 1433
deny tcp any any eq 1434
deny udp any any eq 1434
deny udp any any eq 1978
access-list 101 deny udp any any eq 2000 //拒絕引入的openwindows
access-list 101 deny tcp any any eq 2000 //拒絕引入的openwindows
deny udp any any eq 2002
access-list 101 deny udp any any eq 2049 //拒絕引入的NFS
access-list 101 deny tcp any any eq 2049 //拒絕引入的 NFS
deny tcp any any eq 2745
deny tcp any any eq 2847
deny tcp any any eq 3055
deny tcp any any eq 3127
deny tcp any any eq 3128
deny tcp any any eq 3198
deny tcp any any eq 3372
deny udp any any eq 4156
deny tcp any any eq 4444
deny udp any any eq 4444
deny tcp any any eq 4662
deny tcp any any eq 6000
deny tcp any any eq 8006
deny udp any any eq 8006
deny tcp any any eq 8094
deny udp any any eq 8094
deny udp any any eq 10702
deny udp any any eq 13072
deny udp any any eq 16881
deny udp any any eq netbios-ns
deny udp any any eq netbios-dgm
access-list 101 permit ip any any //其它均允許
!
logging source-interface Loopback0
logging 10.60.4.49
logging trap informational
logging facility local1
!
snmp-server community xjccw RO
snmp-server community xjccw2007 RW
snmp-server host 10.60.4.49 xjccw
!
line con 0
transport input none
line aux 0
transport input none
no exec
line vty 0 4
exec-timeout 60 0
password xjccw
login authentication xjccw
access-class Telnet in
!
scheduler allocate 3000 1000 //限制CPU資源用來處理接口中斷情況,3000是處理中斷的毫秒數,1000是指定保持中斷的毫秒數;
 
 

service nagle //Nagle減輕TCP協議在傳送小包上的問題,優化登錄連接進程,減少路由器負擔;
service tcp-keepalives-in //刪除意外中斷的tcp連接,提供保持活動功能來檢測和刪除死連接,
service tcp-keepalives-out //允許其他設備使用VTP線路;
service timestamps debug datetime msec show-timezone localtime
service timestamps log deatetime msec show-timezone localtime
service password-encryption //加密未加密的口令;
!
no service dhcp //阻止路由器成爲DHCP服務器或中繼代理;(根據實際情況做)
logging buffered 16384
no logging console
enable secret children
no enable password
! AAA驗證
aaa new-model
aaa authentication login xjccw group radius local
username xjccw password 7 095444070D
radius-server host 10.60.4.35 auth-port 1645 acct-port 1646
radius-server timeout 120
radius-server key 7 083946401D
! AAA失效後執行
username xjccw password xjccw
! 關閉http-server
no ip http server
no ip http secure-server
! 支持非零子網路由及無類路由
ip subzero
ip classess
! 關閉不需要的服務
no services pad //提供pad(packet assembler/disassembler數據包組合/分拆)功能,成爲***的立足點;
no services tcp-small-servers //tcp、udp低端口服務(port:19或更低),容易建立DOS***,
no services udp-small-servers //同時佔用其他進程的CPU資源;抵禦UDP回聲fraggle***;
!
no boot network //啓動過程中用到TFTP,對加載過程沒有安全保護;
no service config //如果NVRAM沒有配置,使用TFTP廣播發現配置文件,存在安全隱患;
!
no services finger //finger檢測誰登陸一臺主機的程序,如果有***知道誰在路由器上,將很
no ip finger //容易得到任何有效用戶的用戶ID;
!
no ip identd //identd(tcp 113)允許遠程設備爲識別目的查詢TCP端口,identd不提供認證功能;
no ip source-route //源路由可以在ip包頭中指定數據包應該的實際路由,帶來網絡安全問題;
no ip bootp server //容易DOS***,bootp沒有安全機制;
no ip domain-lookup //可以立即響應“%Unknown command”消息,指示沒有可用名稱解析;
! 開啓cef,快速轉發及mpls自身分標籤行爲
ip cef
! ntp功能啓用
clock timezone CHN 8
ntp authenticate
ntp update-calendar
ntp server 132.163.4.101
! 環回口
inter lo0
no ip redirects
no ip unreachables
no ip proxy-arp
! 接口或子接口
inter g*/*
Descri connect to **** //描述接口,使show interface des 更清晰直接;
no ip redirects // ***通過破壞路由表,利用此功能發起DOS***;
no ip unreachables // smurf***的形式,利用icmp不可達,更改源地址改爲***設備地址;
no ip mask-reply // smurf***的改進版,發起定向廣播DOS***;
//使用ICMP掩碼答覆消息,瞭解到設備的身份信息,利用漏洞***;
no ip directed-broadcast // 定向廣播是可路由的,DOS***利用此特性;
no ip proxy-arp // 關閉代理ARP功能;
no mop enabled // 維護操作系統協議(maintenance operation protocol),如果打開了mop服務,cisco路由器可能從mop服務器上下載ios,要阻止一個mop DOS***,接口上關閉mop服務;
ip route-cache flow //啓動 netflow,跟蹤DOS***源;
ip verify unicast reverse-path //單播逆向路徑轉發以幫助阻止數據包欺騙;
ip access-group BinDu in //病毒ACL接口應用
ip access-group BinDu out
! 病毒ACL配置
deny icmp any any echo-reply //拒絕任何應答
deny icmp any any host-unreachable //拒絕任何無法接通的主機
deny udp any any eq snmp //拒絕引入的SNMP
deny tcp any any eq 135
deny udp any any eq 135
deny tcp any any eq 136
deny tcp any any eq 137
deny tcp any any eq 138
deny tcp any any eq 139
deny tcp any any eq 445
deny udp any any eq 445
deny tcp any any eq 593
deny tcp any any eq 707
deny tcp any any eq 1023
deny udp any any eq 1052
deny tcp any any eq 1068
deny tcp any any eq 1080
deny udp any any eq 1025
deny tcp any any eq 1433
deny tcp any any eq 1434
deny udp any any eq 1434
deny udp any any eq 1978
access-list 101 deny udp any any eq 2000 //拒絕引入的openwindows
access-list 101 deny tcp any any eq 2000 //拒絕引入的openwindows
deny udp any any eq 2002
access-list 101 deny udp any any eq 2049 //拒絕引入的NFS
access-list 101 deny tcp any any eq 2049 //拒絕引入的 NFS
deny tcp any any eq 2745
deny tcp any any eq 2847
deny tcp any any eq 3055
deny tcp any any eq 3127
deny tcp any any eq 3128
deny tcp any any eq 3198
deny tcp any any eq 3372
deny udp any any eq 4156
deny tcp any any eq 4444
deny udp any any eq 4444
deny tcp any any eq 4662
deny tcp any any eq 6000
deny tcp any any eq 8006
deny udp any any eq 8006
deny tcp any any eq 8094
deny udp any any eq 8094
deny udp any any eq 10702
deny udp any any eq 13072
deny udp any any eq 16881
deny udp any any eq netbios-ns
deny udp any any eq netbios-dgm
access-list 101 permit ip any any //其它均允許
!
logging source-interface Loopback0
logging 10.60.4.49
logging trap informational
logging facility local1
!
snmp-server community xjccw RO
snmp-server community xjccw2007 RW
snmp-server host 10.60.4.49 xjccw
!
line con 0
transport input none
line aux 0
transport input none
no exec
line vty 0 4
exec-timeout 60 0
password xjccw
login authentication xjccw
access-class Telnet in
!
scheduler allocate 3000 1000 //限制CPU資源用來處理接口中斷情況,3000是處理中斷的毫秒數,1000是指定保持中斷的毫秒數;
 
 

service nagle //Nagle減輕TCP協議在傳送小包上的問題,優化登錄連接進程,減少路由器負擔;
service tcp-keepalives-in //刪除意外中斷的tcp連接,提供保持活動功能來檢測和刪除死連接,
service tcp-keepalives-out //允許其他設備使用VTP線路;
service timestamps debug datetime msec show-timezone localtime
service timestamps log deatetime msec show-timezone localtime
service password-encryption //加密未加密的口令;
!
no service dhcp //阻止路由器成爲DHCP服務器或中繼代理;(根據實際情況做)
logging buffered 16384
no logging console
enable secret children
no enable password
! AAA驗證
aaa new-model
aaa authentication login xjccw group radius local
username xjccw password 7 095444070D
radius-server host 10.60.4.35 auth-port 1645 acct-port 1646
radius-server timeout 120
radius-server key 7 083946401D
! AAA失效後執行
username xjccw password xjccw
! 關閉http-server
no ip http server
no ip http secure-server
! 支持非零子網路由及無類路由
ip subzero
ip classess
! 關閉不需要的服務
no services pad //提供pad(packet assembler/disassembler數據包組合/分拆)功能,成爲***的立足點;
no services tcp-small-servers //tcp、udp低端口服務(port:19或更低),容易建立DOS***,
no services udp-small-servers //同時佔用其他進程的CPU資源;抵禦UDP回聲fraggle***;
!
no boot network //啓動過程中用到TFTP,對加載過程沒有安全保護;
no service config //如果NVRAM沒有配置,使用TFTP廣播發現配置文件,存在安全隱患;
!
no services finger //finger檢測誰登陸一臺主機的程序,如果有***知道誰在路由器上,將很
no ip finger //容易得到任何有效用戶的用戶ID;
!
no ip identd //identd(tcp 113)允許遠程設備爲識別目的查詢TCP端口,identd不提供認證功能;
no ip source-route //源路由可以在ip包頭中指定數據包應該的實際路由,帶來網絡安全問題;
no ip bootp server //容易DOS***,bootp沒有安全機制;
no ip domain-lookup //可以立即響應“%Unknown command”消息,指示沒有可用名稱解析;
! 開啓cef,快速轉發及mpls自身分標籤行爲
ip cef
! ntp功能啓用
clock timezone CHN 8
ntp authenticate
ntp update-calendar
ntp server 132.163.4.101
! 環回口
inter lo0
no ip redirects
no ip unreachables
no ip proxy-arp
! 接口或子接口
inter g*/*
Descri connect to **** //描述接口,使show interface des 更清晰直接;
no ip redirects // ***通過破壞路由表,利用此功能發起DOS***;
no ip unreachables // smurf***的形式,利用icmp不可達,更改源地址改爲***設備地址;
no ip mask-reply // smurf***的改進版,發起定向廣播DOS***;
//使用ICMP掩碼答覆消息,瞭解到設備的身份信息,利用漏洞***;
no ip directed-broadcast // 定向廣播是可路由的,DOS***利用此特性;
no ip proxy-arp // 關閉代理ARP功能;
no mop enabled // 維護操作系統協議(maintenance operation protocol),如果打開了mop服務,cisco路由器可能從mop服務器上下載ios,要阻止一個mop DOS***,接口上關閉mop服務;
ip route-cache flow //啓動 netflow,跟蹤DOS***源;
ip verify unicast reverse-path //單播逆向路徑轉發以幫助阻止數據包欺騙;
ip access-group BinDu in //病毒ACL接口應用
ip access-group BinDu out
! 病毒ACL配置
deny icmp any any echo-reply //拒絕任何應答
deny icmp any any host-unreachable //拒絕任何無法接通的主機
deny udp any any eq snmp //拒絕引入的SNMP
deny tcp any any eq 135
deny udp any any eq 135
deny tcp any any eq 136
deny tcp any any eq 137
deny tcp any any eq 138
deny tcp any any eq 139
deny tcp any any eq 445
deny udp any any eq 445
deny tcp any any eq 593
deny tcp any any eq 707
deny tcp any any eq 1023
deny udp any any eq 1052
deny tcp any any eq 1068
deny tcp any any eq 1080
deny udp any any eq 1025
deny tcp any any eq 1433
deny tcp any any eq 1434
deny udp any any eq 1434
deny udp any any eq 1978
access-list 101 deny udp any any eq 2000 //拒絕引入的openwindows
access-list 101 deny tcp any any eq 2000 //拒絕引入的openwindows
deny udp any any eq 2002
access-list 101 deny udp any any eq 2049 //拒絕引入的NFS
access-list 101 deny tcp any any eq 2049 //拒絕引入的 NFS
deny tcp any any eq 2745
deny tcp any any eq 2847
deny tcp any any eq 3055
deny tcp any any eq 3127
deny tcp any any eq 3128
deny tcp any any eq 3198
deny tcp any any eq 3372
deny udp any any eq 4156
deny tcp any any eq 4444
deny udp any any eq 4444
deny tcp any any eq 4662
deny tcp any any eq 6000
deny tcp any any eq 8006
deny udp any any eq 8006
deny tcp any any eq 8094
deny udp any any eq 8094
deny udp any any eq 10702
deny udp any any eq 13072
deny udp any any eq 16881
deny udp any any eq netbios-ns
deny udp any any eq netbios-dgm
access-list 101 permit ip any any //其它均允許
!
logging source-interface Loopback0
logging 10.60.4.49
logging trap informational
logging facility local1
!
snmp-server community xjccw RO
snmp-server community xjccw2007 RW
snmp-server host 10.60.4.49 xjccw
!
line con 0
transport input none
line aux 0
transport input none
no exec
line vty 0 4
exec-timeout 60 0
password xjccw
login authentication xjccw
access-class Telnet in
!
scheduler allocate 3000 1000 //限制CPU資源用來處理接口中斷情況,3000是處理中斷的毫秒數,1000是指定保持中斷的毫秒數;
 
 

service nagle //Nagle減輕TCP協議在傳送小包上的問題,優化登錄連接進程,減少路由器負擔;
service tcp-keepalives-in //刪除意外中斷的tcp連接,提供保持活動功能來檢測和刪除死連接,
service tcp-keepalives-out //允許其他設備使用VTP線路;
service timestamps debug datetime msec show-timezone localtime
service timestamps log deatetime msec show-timezone localtime
service password-encryption //加密未加密的口令;
!
no service dhcp //阻止路由器成爲DHCP服務器或中繼代理;(根據實際情況做)
logging buffered 16384
no logging console
enable secret children
no enable password
! AAA驗證
aaa new-model
aaa authentication login xjccw group radius local
username xjccw password 7 095444070D
radius-server host 10.60.4.35 auth-port 1645 acct-port 1646
radius-server timeout 120
radius-server key 7 083946401D
! AAA失效後執行
username xjccw password xjccw
! 關閉http-server
no ip http server
no ip http secure-server
! 支持非零子網路由及無類路由
ip subzero
ip classess
! 關閉不需要的服務
no services pad //提供pad(packet assembler/disassembler數據包組合/分拆)功能,成爲***的立足點;
no services tcp-small-servers //tcp、udp低端口服務(port:19或更低),容易建立DOS***,
no services udp-small-servers //同時佔用其他進程的CPU資源;抵禦UDP回聲fraggle***;
!
no boot network //啓動過程中用到TFTP,對加載過程沒有安全保護;
no service config //如果NVRAM沒有配置,使用TFTP廣播發現配置文件,存在安全隱患;
!
no services finger //finger檢測誰登陸一臺主機的程序,如果有***知道誰在路由器上,將很
no ip finger //容易得到任何有效用戶的用戶ID;
!
no ip identd //identd(tcp 113)允許遠程設備爲識別目的查詢TCP端口,identd不提供認證功能;
no ip source-route //源路由可以在ip包頭中指定數據包應該的實際路由,帶來網絡安全問題;
no ip bootp server //容易DOS***,bootp沒有安全機制;
no ip domain-lookup //可以立即響應“%Unknown command”消息,指示沒有可用名稱解析;
! 開啓cef,快速轉發及mpls自身分標籤行爲
ip cef
! ntp功能啓用
clock timezone CHN 8
ntp authenticate
ntp update-calendar
ntp server 132.163.4.101
! 環回口
inter lo0
no ip redirects
no ip unreachables
no ip proxy-arp
! 接口或子接口
inter g*/*
Descri connect to **** //描述接口,使show interface des 更清晰直接;
no ip redirects // ***通過破壞路由表,利用此功能發起DOS***;
no ip unreachables // smurf***的形式,利用icmp不可達,更改源地址改爲***設備地址;
no ip mask-reply // smurf***的改進版,發起定向廣播DOS***;
//使用ICMP掩碼答覆消息,瞭解到設備的身份信息,利用漏洞***;
no ip directed-broadcast // 定向廣播是可路由的,DOS***利用此特性;
no ip proxy-arp // 關閉代理ARP功能;
no mop enabled // 維護操作系統協議(maintenance operation protocol),如果打開了mop服務,cisco路由器可能從mop服務器上下載ios,要阻止一個mop DOS***,接口上關閉mop服務;
ip route-cache flow //啓動 netflow,跟蹤DOS***源;
ip verify unicast reverse-path //單播逆向路徑轉發以幫助阻止數據包欺騙;
ip access-group BinDu in //病毒ACL接口應用
ip access-group BinDu out
! 病毒ACL配置
deny icmp any any echo-reply //拒絕任何應答
deny icmp any any host-unreachable //拒絕任何無法接通的主機
deny udp any any eq snmp //拒絕引入的SNMP
deny tcp any any eq 135
deny udp any any eq 135
deny tcp any any eq 136
deny tcp any any eq 137
deny tcp any any eq 138
deny tcp any any eq 139
deny tcp any any eq 445
deny udp any any eq 445
deny tcp any any eq 593
deny tcp any any eq 707
deny tcp any any eq 1023
deny udp any any eq 1052
deny tcp any any eq 1068
deny tcp any any eq 1080
deny udp any any eq 1025
deny tcp any any eq 1433
deny tcp any any eq 1434
deny udp any any eq 1434
deny udp any any eq 1978
access-list 101 deny udp any any eq 2000 //拒絕引入的openwindows
access-list 101 deny tcp any any eq 2000 //拒絕引入的openwindows
deny udp any any eq 2002
access-list 101 deny udp any any eq 2049 //拒絕引入的NFS
access-list 101 deny tcp any any eq 2049 //拒絕引入的 NFS
deny tcp any any eq 2745
deny tcp any any eq 2847
deny tcp any any eq 3055
deny tcp any any eq 3127
deny tcp any any eq 3128
deny tcp any any eq 3198
deny tcp any any eq 3372
deny udp any any eq 4156
deny tcp any any eq 4444
deny udp any any eq 4444
deny tcp any any eq 4662
deny tcp any any eq 6000
deny tcp any any eq 8006
deny udp any any eq 8006
deny tcp any any eq 8094
deny udp any any eq 8094
deny udp any any eq 10702
deny udp any any eq 13072
deny udp any any eq 16881
deny udp any any eq netbios-ns
deny udp any any eq netbios-dgm
access-list 101 permit ip any any //其它均允許
!
logging source-interface Loopback0
logging 10.60.4.49
logging trap informational
logging facility local1
!
snmp-server community xjccw RO
snmp-server community xjccw2007 RW
snmp-server host 10.60.4.49 xjccw
!
line con 0
transport input none
line aux 0
transport input none
no exec
line vty 0 4
exec-timeout 60 0
password xjccw
login authentication xjccw
access-class Telnet in
!
scheduler allocate 3000 1000 //限制CPU資源用來處理接口中斷情況,3000是處理中斷的毫秒數,1000是指定保持中斷的毫秒數;
 
 

service nagle //Nagle減輕TCP協議在傳送小包上的問題,優化登錄連接進程,減少路由器負擔;
service tcp-keepalives-in //刪除意外中斷的tcp連接,提供保持活動功能來檢測和刪除死連接,
service tcp-keepalives-out //允許其他設備使用VTP線路;
service timestamps debug datetime msec show-timezone localtime
service timestamps log deatetime msec show-timezone localtime
service password-encryption //加密未加密的口令;
!
no service dhcp //阻止路由器成爲DHCP服務器或中繼代理;(根據實際情況做)
logging buffered 16384
no logging console
enable secret children
no enable password
! AAA驗證
aaa new-model
aaa authentication login xjccw group radius local
username xjccw password 7 095444070D
radius-server host 10.60.4.35 auth-port 1645 acct-port 1646
radius-server timeout 120
radius-server key 7 083946401D
! AAA失效後執行
username xjccw password xjccw
! 關閉http-server
no ip http server
no ip http secure-server
! 支持非零子網路由及無類路由
ip subzero
ip classess
! 關閉不需要的服務
no services pad //提供pad(packet assembler/disassembler數據包組合/分拆)功能,成爲***的立足點;
no services tcp-small-servers //tcp、udp低端口服務(port:19或更低),容易建立DOS***,
no services udp-small-servers //同時佔用其他進程的CPU資源;抵禦UDP回聲fraggle***;
!
no boot network //啓動過程中用到TFTP,對加載過程沒有安全保護;
no service config //如果NVRAM沒有配置,使用TFTP廣播發現配置文件,存在安全隱患;
!
no services finger //finger檢測誰登陸一臺主機的程序,如果有***知道誰在路由器上,將很
no ip finger //容易得到任何有效用戶的用戶ID;
!
no ip identd //identd(tcp 113)允許遠程設備爲識別目的查詢TCP端口,identd不提供認證功能;
no ip source-route //源路由可以在ip包頭中指定數據包應該的實際路由,帶來網絡安全問題;
no ip bootp server //容易DOS***,bootp沒有安全機制;
no ip domain-lookup //可以立即響應“%Unknown command”消息,指示沒有可用名稱解析;
! 開啓cef,快速轉發及mpls自身分標籤行爲
ip cef
! ntp功能啓用
clock timezone CHN 8
ntp authenticate
ntp update-calendar
ntp server 132.163.4.101
! 環回口
inter lo0
no ip redirects
no ip unreachables
no ip proxy-arp
! 接口或子接口
inter g*/*
Descri connect to **** //描述接口,使show interface des 更清晰直接;
no ip redirects // ***通過破壞路由表,利用此功能發起DOS***;
no ip unreachables // smurf***的形式,利用icmp不可達,更改源地址改爲***設備地址;
no ip mask-reply // smurf***的改進版,發起定向廣播DOS***;
//使用ICMP掩碼答覆消息,瞭解到設備的身份信息,利用漏洞***;
no ip directed-broadcast // 定向廣播是可路由的,DOS***利用此特性;
no ip proxy-arp // 關閉代理ARP功能;
no mop enabled // 維護操作系統協議(maintenance operation protocol),如果打開了mop服務,cisco路由器可能從mop服務器上下載ios,要阻止一個mop DOS***,接口上關閉mop服務;
ip route-cache flow //啓動 netflow,跟蹤DOS***源;
ip verify unicast reverse-path //單播逆向路徑轉發以幫助阻止數據包欺騙;
ip access-group BinDu in //病毒ACL接口應用
ip access-group BinDu out
! 病毒ACL配置
deny icmp any any echo-reply //拒絕任何應答
deny icmp any any host-unreachable //拒絕任何無法接通的主機
deny udp any any eq snmp //拒絕引入的SNMP
deny tcp any any eq 135
deny udp any any eq 135
deny tcp any any eq 136
deny tcp any any eq 137
deny tcp any any eq 138
deny tcp any any eq 139
deny tcp any any eq 445
deny udp any any eq 445
deny tcp any any eq 593
deny tcp any any eq 707
deny tcp any any eq 1023
deny udp any any eq 1052
deny tcp any any eq 1068
deny tcp any any eq 1080
deny udp any any eq 1025
deny tcp any any eq 1433
deny tcp any any eq 1434
deny udp any any eq 1434
deny udp any any eq 1978
access-list 101 deny udp any any eq 2000 //拒絕引入的openwindows
access-list 101 deny tcp any any eq 2000 //拒絕引入的openwindows
deny udp any any eq 2002
access-list 101 deny udp any any eq 2049 //拒絕引入的NFS
access-list 101 deny tcp any any eq 2049 //拒絕引入的 NFS
deny tcp any any eq 2745
deny tcp any any eq 2847
deny tcp any any eq 3055
deny tcp any any eq 3127
deny tcp any any eq 3128
deny tcp any any eq 3198
deny tcp any any eq 3372
deny udp any any eq 4156
deny tcp any any eq 4444
deny udp any any eq 4444
deny tcp any any eq 4662
deny tcp any any eq 6000
deny tcp any any eq 8006
deny udp any any eq 8006
deny tcp any any eq 8094
deny udp any any eq 8094
deny udp any any eq 10702
deny udp any any eq 13072
deny udp any any eq 16881
deny udp any any eq netbios-ns
deny udp any any eq netbios-dgm
access-list 101 permit ip any any //其它均允許
!
logging source-interface Loopback0
logging 10.60.4.49
logging trap informational
logging facility local1
!
snmp-server community xjccw RO
snmp-server community xjccw2007 RW
snmp-server host 10.60.4.49 xjccw
!
line con 0
transport input none
line aux 0
transport input none
no exec
line vty 0 4
exec-timeout 60 0
password xjccw
login authentication xjccw
access-class Telnet in
!
scheduler allocate 3000 1000 //限制CPU資源用來處理接口中斷情況,3000是處理中斷的毫秒數,1000是指定保持中斷的毫秒數;
 

service nagle //Nagle減輕TCP協議在傳送小包上的問題,優化登錄連接進程,減少路由器負擔;
service tcp-keepalives-in //刪除意外中斷的tcp連接,提供保持活動功能來檢測和刪除死連接,
service tcp-keepalives-out //允許其他設備使用VTP線路;
service timestamps debug datetime msec show-timezone localtime
service timestamps log deatetime msec show-timezone localtime
service password-encryption //加密未加密的口令;
!
no service dhcp //阻止路由器成爲DHCP服務器或中繼代理;(根據實際情況做)
logging buffered 16384
no logging console
enable secret children
no enable password
! AAA驗證
aaa new-model
aaa authentication login xjccw group radius local
username xjccw password 7 095444070D
radius-server host 10.60.4.35 auth-port 1645 acct-port 1646
radius-server timeout 120
radius-server key 7 083946401D
! AAA失效後執行
username xjccw password xjccw
! 關閉http-server
no ip http server
no ip http secure-server
! 支持非零子網路由及無類路由
ip subzero
ip classess
! 關閉不需要的服務
no services pad //提供pad(packet assembler/disassembler數據包組合/分拆)功能,成爲***的立足點;
no services tcp-small-servers //tcp、udp低端口服務(port:19或更低),容易建立DOS***,
no services udp-small-servers //同時佔用其他進程的CPU資源;抵禦UDP回聲fraggle***;
!
no boot network //啓動過程中用到TFTP,對加載過程沒有安全保護;
no service config //如果NVRAM沒有配置,使用TFTP廣播發現配置文件,存在安全隱患;
!
no services finger //finger檢測誰登陸一臺主機的程序,如果有***知道誰在路由器上,將很
no ip finger //容易得到任何有效用戶的用戶ID;
!
no ip identd //identd(tcp 113)允許遠程設備爲識別目的查詢TCP端口,identd不提供認證功能;
no ip source-route //源路由可以在ip包頭中指定數據包應該的實際路由,帶來網絡安全問題;
no ip bootp server //容易DOS***,bootp沒有安全機制;
no ip domain-lookup //可以立即響應“%Unknown command”消息,指示沒有可用名稱解析;
! 開啓cef,快速轉發及mpls自身分標籤行爲
ip cef
! ntp功能啓用
clock timezone CHN 8
ntp authenticate
ntp update-calendar
ntp server 132.163.4.101
! 環回口
inter lo0
no ip redirects
no ip unreachables
no ip proxy-arp
! 接口或子接口
inter g*/*
Descri connect to **** //描述接口,使show interface des 更清晰直接;
no ip redirects // ***通過破壞路由表,利用此功能發起DOS***;
no ip unreachables // smurf***的形式,利用icmp不可達,更改源地址改爲***設備地址;
no ip mask-reply // smurf***的改進版,發起定向廣播DOS***;
//使用ICMP掩碼答覆消息,瞭解到設備的身份信息,利用漏洞***;
no ip directed-broadcast // 定向廣播是可路由的,DOS***利用此特性;
no ip proxy-arp // 關閉代理ARP功能;
no mop enabled // 維護操作系統協議(maintenance operation protocol),如果打開了mop服務,cisco路由器可能從mop服務器上下載ios,要阻止一個mop DOS***,接口上關閉mop服務;
ip route-cache flow //啓動 netflow,跟蹤DOS***源;
ip verify unicast reverse-path //單播逆向路徑轉發以幫助阻止數據包欺騙;
ip access-group BinDu in //病毒ACL接口應用
ip access-group BinDu out
! 病毒ACL配置
deny icmp any any echo-reply //拒絕任何應答
deny icmp any any host-unreachable //拒絕任何無法接通的主機
deny udp any any eq snmp //拒絕引入的SNMP
deny tcp any any eq 135
deny udp any any eq 135
deny tcp any any eq 136
deny tcp any any eq 137
deny tcp any any eq 138
deny tcp any any eq 139
deny tcp any any eq 445
deny udp any any eq 445
deny tcp any any eq 593
deny tcp any any eq 707
deny tcp any any eq 1023
deny udp any any eq 1052
deny tcp any any eq 1068
deny tcp any any eq 1080
deny udp any any eq 1025
deny tcp any any eq 1433
deny tcp any any eq 1434
deny udp any any eq 1434
deny udp any any eq 1978
access-list 101 deny udp any any eq 2000 //拒絕引入的openwindows
access-list 101 deny tcp any any eq 2000 //拒絕引入的openwindows
deny udp any any eq 2002
access-list 101 deny udp any any eq 2049 //拒絕引入的NFS
access-list 101 deny tcp any any eq 2049 //拒絕引入的 NFS
deny tcp any any eq 2745
deny tcp any any eq 2847
deny tcp any any eq 3055
deny tcp any any eq 3127
deny tcp any any eq 3128
deny tcp any any eq 3198
deny tcp any any eq 3372
deny udp any any eq 4156
deny tcp any any eq 4444
deny udp any any eq 4444
deny tcp any any eq 4662
deny tcp any any eq 6000
deny tcp any any eq 8006
deny udp any any eq 8006
deny tcp any any eq 8094
deny udp any any eq 8094
deny udp any any eq 10702
deny udp any any eq 13072
deny udp any any eq 16881
deny udp any any eq netbios-ns
deny udp any any eq netbios-dgm
access-list 101 permit ip any any //其它均允許
!
logging source-interface Loopback0
logging 10.60.4.49
logging trap informational
logging facility local1
!
snmp-server community xjccw RO
snmp-server community xjccw2007 RW
snmp-server host 10.60.4.49 xjccw
!
line con 0
transport input none
line aux 0
transport input none
no exec
line vty 0 4
exec-timeout 60 0
password xjccw
login authentication xjccw
access-class Telnet in
!
scheduler allocate 3000 1000 //限制CPU資源用來處理接口中斷情況,3000是處理中斷的毫秒數,1000是指定保持中斷的毫秒數;
 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章