大雀软件园

首页 软件下载 安卓市场 苹果市场 电脑游戏 安卓游戏 文章资讯 驱动下载
技术开发 网页设计 图形图象 数据库 网络媒体 网络安全 站长CLUB 操作系统 媒体动画 安卓相关
当前位置: 首页 -> 网络安全 -> 网关代理 -> Cisco路由器安全配置简易方案

Cisco路由器安全配置简易方案

时间: 2021-07-31 作者:daque

一,路由器考察遏制的安定摆设1,庄重遏制不妨考察路由器的处置员。任何一次保护都须要记载存案。2,倡导不要长途考察路由器。纵然须要长途考察路由器,倡导运用考察遏制列表和高强度的暗号遏制。3,庄重遏制con端口的考察。简直的办法有:a,即使不妨开机箱的,则不妨割断与con口互联的物理线路。b,不妨变换默许的贯穿属性,比方窜改波特率(默许是96000,不妨改为其余的)。c,共同运用考察遏制列表遏制对con口的考察。如:router(config)#access-list 1 permit 192.168.0.1router(config)#line con 0router(config-line)#transport input nonerouter(config-line)#login localrouter(config-line)#exec-timeoute 5 0router(config-line)#access-class 1 inrouter(config-line)#endd,给con口树立高强度的暗号。4,即使不运用aux端口,则遏止这个端口。默许是未被起用。遏止如:router(config)#line aux 0router(config-line)#transport input nonerouter(config-line)#no exec5,倡导沿用权力分级战略。如:router(config)#username blushin privilege 10 g00dpa55w0rdrouter(config)#privilege exec level 10 telnetrouter(config)#privilege exec level 10 show ip access-list6,为特权形式的加入树立健康的暗号。不要沿用enable password树立暗号。而要沿用enable secret吩咐树立。而且要起用service password-encryption。7,遏制对vty的考察。即使不须要长途考察则遏止它。即使须要则确定要树立健康的暗号。因为vty在搜集的传输进程中为加密,以是须要对其举行庄重的遏制。如:树立健康的暗号;遏制贯穿的并发数量;沿用考察列表庄重遏制考察的地方;不妨沿用aaa树立用户的考察遏制等。8,ios的晋级和备份,以及摆设文献的备份倡导运用ftp包办tftp。如:router(config)#ip ftp username blushinrouter(config)#ip ftp password 4tppa55w0rdrouter#copy startup-config ftp:9,准时的晋级和补缀ios软硬件。二,路由器搜集效劳安定摆设1,遏止cdp(cisco discovery protocol)。如:router(config)#no cdp run router(config-if)# no cdp enable2,遏止其余的tcp、udp small效劳。router(config)# no service tcp-small-serversrouter(config)# no service udp-samll-servers3,遏止finger效劳。router(config)# no ip fingerrouter(config)# no service finger4,倡导遏止http效劳。router(config)# no ip http server 即使起用了http效劳则须要对其举行安定摆设:树立用户名和暗号;沿用考察列表举行遏制。如:router(config)# username blushin privilege 10 g00dpa55w0rd router(config)# ip http auth local router(config)# no access-list 10router(config)# access-list 10 permit 192.168.0.1 router(config)# access-list 10 deny any router(config)# ip http access-class 10 router(config)# ip http serverrouter(config)# exit 5,遏止bootp效劳。router(config)# no ip bootp server遏止从搜集启用和机动从搜集载入初始摆设文献。router(config)# no boot networkrouter(config)# no servic config6,遏止ip source routing。router(config)# no ip source-route7,倡导即使不须要arp-proxy效劳则遏止它,路由器默许识打开的。router(config)# no ip proxy-arprouter(config-if)# no ip proxy-arp8,精确的遏止ip directed broadcast。router(config)# no ip directed-broadcast9,遏止ip classless。router(config)# no ip classless10,遏止icmp和议的ip unreachables,redirects,mask replies。router(config-if)# no ip unreacheablesrouter(config-if)# no ip redirectsrouter(config-if)# no ip mask-reply11,倡导遏止snmp和议效劳。在遏止时必需简略少许snmp效劳的默许摆设。大概须要考察列表来过滤。如:router(config)# no snmp-server community public rorouter(config)# no snmp-server community admin rwrouter(config)# no access-list 70router(config)# access-list 70 deny anyrouter(config)# snmp-server community morehardpublic ro 70router(config)# no snmp-server enable trapsrouter(config)# no snmp-server system-shutdownrouter(config)# no snmp-server trap-anthrouter(config)# no snmp-serverrouter(config)# end12,即使没需要则遏止wins和dns效劳。router(config)# no ip domain-lookup即使须要则须要摆设:router(config)# hostname routerrouter(config)# ip name-server 202.102.134.9613,精确遏止不运用的端口。router(config)# interface eth0/3router(config)# shutdown三,路由器路由和议安定摆设1,开始遏止默许起用的arp-proxy,它简单惹起路由表的凌乱。router(config)# no ip proxy-arp 大概router(config-if)# no ip proxy-arp2,起用ospf路由和议的认证。默许的ospf认证暗号是明文字传递输的,倡导起用md5认证。并树立确定强度密钥(key,对立的路由器必需有沟通的key)。router(config)# router ospf 100router(config-router)# network 192.168.100.0 0.0.0.255 area 100! 起用md5认证。! area area-id authentication 起用认证,是明文暗号认证。!area area-id authentication message-digestrouter(config-router)# area 100 authentication message-digestrouter(config)# exitrouter(config)# interface eth0/1!起用md5密钥key为routerospfkey。!ip ospf authentication-key key 起用认证密钥,但会是明文字传递输。!ip ospf message-digest-key key-id(1-255) md5 keyrouter(config-if)# ip ospf message-digest-key 1 md5 routerospfkey3,rip和议的认证。惟有rip-v2扶助,rip-1不扶助。倡导起用rip-v2。而且沿用md5认证。普遍认证同样是明文字传递输的。router(config)# config terminal! 起用树立密钥链router(config)# key chain mykeychainnamerouter(config-keychain)# key 1!树立密钥字串router(config-leychain-key)# key-string myfirstkeystringrouter(config-keyschain)# key 2router(config-keychain-key)# key-string mysecondkeystring!起用rip-v2router(config)# router riprouter(config-router)# version 2router(config-router)# network 192.168.100.0router(config)# interface eth0/1! 沿用md5形式认证,并采用已摆设的密钥链router(config-if)# ip rip authentication mode md5router(config-if)# ip rip anthentication key-chain mykeychainname4,起用passive-interface吩咐不妨禁止使用少许不须要接受和转发路由消息的端口。倡导对于不须要路由的端口,起用passive-interface。然而,在rip和议是不过遏止转发路由消息,并没有遏止接受。在ospf和议中是遏止转发和接受路由消息。! rip中,遏止端口0/3转发路由消息router(config)# router riprouter(config-router)# passive-interface eth0/3 !ospf中,遏止端口0/3接受和转发路由消息router(config)# router ospf 100router(config-router)# passive-interface eth0/35,起用考察列表过滤少许废物和歹意路由消息,遏制搜集的废物消息流。router(config)# access-list 10 deny 192.168.1.0 0.0.0.255router(config)# access-list 10 permit any ! 遏止路由器接受革新192.168.1.0搜集的路由消息router(config)# router ospf 100router(config-router)# distribute-list 10 in!遏止路由器转发传递192.168.1.0搜集的路由消息router(config)# router ospf 100router(config-router)# distribute-list 10 out6,倡导起用ip unicast reverse-path verification。它不妨查看源ip地方的精确性,进而不妨提防确定的ip spooling。然而它只能在起用cef(cisco express forwarding)的路由器上运用。router# config t! 起用cefrouter(config)# ip cef!起用unicast reverse-path verificationrouter(config)# interface eth0/1router(config)# ip verify unicast reverse-path 四,路由器考查安定摆设五,路由器其余安定摆设1,准时的晋级ios软硬件,而且要赶快的为ios安置补丁。2,要庄重刻意的为ios作安定备份。3,要为路由器的摆设文献作安定备份。4,购置ups摆设,大概起码要有冗余电源。5,要有完美的路由器的安定考察和保护记载日记。6,要庄重树立登录banner。必需包括非受权用户遏止登录的字样。7,ip捉弄得大略防备。如过滤非国有地方考察里面搜集。过滤本人里面搜集地方;回环地方(127.0.0.0/8);rfc1918独占地方;dhcp自设置地方(169.254.0.0/16);科学文书档案作家尝试用地方(192.0.2.0/24);不必的组播地方(224.0.0.0/4);sun公司的陈旧的尝试地方(20.20.20.0/24;204.152.64.0/23);全搜集地方(0.0.0.0/8)。router(config)# access-list 100 deny ip 192.168.0.0 0.0.0.255 any logrouter(config)# access-list 100 deny ip 127.0.0.0 0.255.255.255 any log router(config)# access-list 100 deny ip 192.168.0.0 0.0.255.255 any logrouter(config)# access-list 100 deny ip 172.16.0.0 0.15.255.255 any logrouter(config)# access-list 100 deny ip 10.0.0.0 0.255.255.255 any logrouter(config)# access-list 100 deny ip 169.254.0.0 0.0.255.255 any logrouter(config)# access-list 100 deny ip 192.0.2.0 0.0.0.255 any logrouter(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 logrouter(config)# access-list 100 deny ip 204.152.64.0 0.0.2.255 any logrouter(config)# access-list 100 deny ip 0.0.0.0 0.255.255.255 any log8,倡导沿用考察列表遏制流出里面搜集的地方必需是属于里面搜集的。如:router(config)# no access-list 101router(config)# access-list 101 permit ip 192.168.0.0 0.0.0.255 anyrouter(config)# access-list 101 deny ip any any logrouter(config)# interface eth 0/1router(config-if)# description “internet ethernet”router(config-if)# ip address 192.168.0.254 255.255.255.0router(config-if)# ip access-group 101 in9,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 establishedrouter(config)# access-list 106 deny ip any any logrouter(config)# interface eth 0/2router(config-if)# description “external ethernet”router(config-if)# ip address 192.168.1.254 255.255.255.0router(config-if)# ip access-group 106 inb:经过tcp截获提防。(这会给路由器爆发确定负载)router(config)# ip tcp intercept list 107router(config)# access-list 107 permit tcp any 192.168.0.0 0.0.0.255router(config)# access-list 107 deny ip any any logrouter(config)# interface eth0router(config)# ip access-group 107 in10,land.c 抨击的提防。router(config)# access-list 107 deny ip host 192.168.1.254 host 192.168.1.254 logrouter(config)# access-list permit ip any anyrouter(config)# interface eth 0/2router(config-if)# ip address 192.168.1.254 255.255.255.0router(config-if)# ip access-group 107 in11,smurf抨击的提防。router(config)# access-list 108 deny ip any host 192.168.1.255 logrouter(config)# access-list 108 deny ip any host 192.168.1.0 log12,icmp和议的安定摆设。对于加入icmp流,咱们要遏止icmp和议的echo、redirect、mask request。也须要遏止traceroute吩咐的探测。对于流出的icmp流,咱们不妨承诺echo、parameter problem、packet too big。再有traceroute吩咐的运用。! outbound icmp controlrouter(config)# access-list 110 deny icmp any any echo logrouter(config)# access-list 110 deny icmp any any redirect logrouter(config)# access-list 110 deny icmp any any mask-request logrouter(config)# access-list 110 permit icmp any any ! inbound icmp controlrouter(config)# access-list 111 permit icmp any any echorouter(config)# access-list 111 permit icmp any any parameter-problemrouter(config)# access-list 111 permit icmp any any packet-too-bigrouter(config)# access-list 111 permit icmp any any source-quenchrouter(config)# access-list 111 deny icmp any any log! outbound traceroute controlrouter(config)# access-list 112 deny udp any any range 33400 34400 ! inbound traceroute controlrouter(config)# access-list 112 permit udp any any range 33400 34400 13,ddos(distributed denial of service)的提防。! the trinoo ddos systemrouter(config)# access-list 113 deny tcp any any eq 27665 logrouter(config)# access-list 113 deny udp any any eq 31335 logrouter(config)# access-list 113 deny udp any any eq 27444 log! the stacheldtraht ddos system router(config)# access-list 113 deny tcp any any eq 16660 logrouter(config)# access-list 113 deny tcp any any eq 65000 log! the trinityv3 systemrouter(config)# access-list 113 deny tcp any any eq 33270 logrouter(config)# access-list 113 deny tcp any any eq 39168 log! the subseven ddos system and some variantsrouter(config)# access-list 113 deny tcp any any range 6711 6712 logrouter(config)# access-list 113 deny tcp any any eq 6776 logrouter(config)# access-list 113 deny tcp any any eq 6669 logrouter(config)# access-list 113 deny tcp any any eq 2222 logrouter(config)# access-list 113 deny tcp any any eq 7000 log13,倡导起用ssh,废除掉telnet。但惟有扶助并带有ipsec特性集的ios才扶助ssh。而且ios12.0-ios12.2仅扶助ssh-v1。如次摆设ssh效劳的例子:router(config)# config trouter(config)# no access-list 22router(config)# access-list 22 permit 192.168.0.22router(config)# access-list deny anyrouter(config)# username blushin privilege 10 g00dpa55w0rd! 树立ssh的超功夫隔和试验登录度数router(config)# ip ssh timeout 90router(config)# ip ssh anthentication-retries 2router(config)# line vty 0 4router(config-line)# access-class 22 inrouter(config-line)# transport input sshrouter(config-line)# login localrouter(config-line)# exit!起用ssh效劳,天生rsa密钥对。router(config)# crypto key generate rsathe name for the keys will be: router.blushin.orgchoose 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)#六,路由器高档安定摆设附:路由器安定摆设沙盘(略) 

热门阅览

最新排行

Copyright © 2019-2021 大雀软件园(www.daque.cn) All Rights Reserved.