转至繁体中文版     | 网站首页 | 图文教程 | 资源下载 | 站长博客 | 图片素材 | 武汉seo | 武汉网站优化 | 
最新公告:     敏韬网|教学资源学习资料永久免费分享站!  [mintao  2008年9月2日]        
您现在的位置: 学习笔记 >> 图文教程 >> 网络应用 >> 网络安全 >> 正文
Cisco路由器安全配置方案应用         ★★★★

Cisco路由器安全配置方案应用

作者:闵涛 文章来源:闵涛的学习笔记 点击数:1100 更新时间:2008/7/8 8:29:00
一、 路由器网络服务安全配置

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

  2 禁止其他的TCP、UDP Small服务。

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

  3 禁止Finger服务。

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

  4 建议禁止HTTP服务。

  Router(Config)# no ip http server如果启用了HTTP服务则需要对其进行安全配置:设置用户名和密码;采用访问列表进行控制。

  5 禁止BOOTp服务。

  Router(Config)# no ip bootp server

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

  7 建议如果不需要ARP-Proxy服务则禁止它,路由器默认识开启的。

  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协议的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协议服务。在禁止时必须删除一些SNMP服务的默认配置。如:Router(Config)# no snmp-server community public Ro Router(Config)# no snmp-server community admin RW

  12 如果没必要则禁止WINS和DNS服务。

  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

  二、路由器访问控制的安全配置(可选)

  路由器的访问控制是比较重要的安全措施,但是目前由于需求不明确,可以考虑暂时不实施。作为建议提供。

  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口设置高强度的密码。

  3 如果不使用AUX端口,则禁止这个端口。默认是未被启用。禁止如:Router(Config)#line aux 0 Router(Config-line)#transport input none Router(Config-line)#no exec 4 建议采用权限分级策略。如: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 为特权模式的进入设置强壮的密码。不要采用enable password设置密码。而要采用enable secret命令设置。并且要启用Service password-encryption. Router(config)#service password-encryption Router(config)#enable secret 6 控制对VTY的访问。如果不需要远程访问则禁止它。如果需要则一定要设置强壮的密码。由于VTY在网络的传输过程中为加密,所以需要对其进行严格的控制。如:设置强壮的密码;控制连接的并发数目;采用访问列表严格控制访问的地址;可以采用AAA设置用户的访问控制等。三、路由器路由协议安全配置1 建议启用IP Unicast Reverse-Path Verification.它能够检查源IP地址的准确性,从而可以防止一定的IP Spooling.但是它只能在启用CEF(Cisco Express Forwarding)的路由器上使用。

  uRPF有三种方式,strict方式、ACL方式和loose方式。在接入路由器上实施时,对于通过单链路接入网络的用户,建议采用strict方式;对于通过多条链路接入到网络的用户,可以采用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]这个功能检查每一个经过路由器的数据包的源地址,若是不符合ACL的,路由器将丢弃该数据包。

  Loose方式:interface pos 1/0 ip ver unicast source reachable-via any这个功能检查每一个经过路由器的数据包,在路由器的路由表中若没有该数据包源IP地址的路由,路由器将丢弃该数据包。2 启用OSPF路由协议的认证。默认的OSPF认证密码是明文传输的,建议启用MD5认证。并设置一定强度密钥(key,相对的路由器必须有相同的Key)。

  3 RIP协议的认证。只有RIP-V2支持,RIP-1不支持。建议启用RIP-V2.并且采用MD5认证。普通认证同样是明文传输的。

  4 启用passive-interface命令可以禁用一些不需要接收和转发路由信息的端口。建议对于不需要路由的端口,启用passive-interface.但是,在RIP协议是只是禁止转发路由信息,并没有禁止接收。在OSPF协议中是禁止转发和接收路由信息。

  5 启用访问列表过滤一些垃圾和恶意路由信息,控制网络的垃圾信息流。如: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网络的路由信息Router(Config)# router ospf 100 Router(Config-router)# distribute-list 10 in!禁止路由器转发传播192.168.1.0网络的路由信息Router(Config)# router ospf 100 Router(Config-router)# distribute-list 10 out

四、路由器其他安全配置1 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 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 in2 建议采用访问列表控制流出内部网络的地址必须是属于内部网络的。(可选)如: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服务的例子: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 ****! 设置SSH的超时间隔和尝试登录次数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服务,生成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截取防范。(这会给路由器产生一定负载)

  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 in3、 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 in4、 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 in5、 ICMP协议的安全配置。对于进入ICMP流,我们要禁止ICMP协议的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 in7、 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 in8、 减少BGP的收敛时间,保证黑客攻击后网络能尽快恢复。


[网络安全]2008网络安全与江民推出的六大反病毒技术  [网络安全]保证网络安全的六大手段
[网络应用]锐捷网络交换机常用操作命令  [网络应用]锐捷网络实验:S2126G交换机的基本配置
[网络应用]锐捷交换机基本配置顺序  [网络应用]路由器和交换机基本配置及详解
[网络应用]CISCO交换机基本配置  [网络应用]交换机基本配置命令
[网络安全]杜绝隐患 防范网络入侵的措施  [网络安全]使用路由器上网的防“毒”措施
教程录入:mintao    责任编辑:mintao 
  • 上一篇教程:

  • 下一篇教程:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
      注:本站部分文章源于互联网,版权归原作者所有!如有侵权,请原作者与本站联系,本站将立即删除! 本站文章除特别注明外均可转载,但需注明出处! [MinTao学以致用网]
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

    同类栏目
    · QQ技巧  · 网络安全
    · 网络技术
    更多内容
    热门推荐 更多内容
  • 没有教程
  • 赞助链接
    更多内容
    闵涛博文 更多关于武汉SEO的内容
    500 - 内部服务器错误。

    500 - 内部服务器错误。

    您查找的资源存在问题,因而无法显示。

    | 设为首页 |加入收藏 | 联系站长 | 友情链接 | 版权申明 | 广告服务
    MinTao学以致用网

    Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved.
    闵涛 投放广告、内容合作请Q我! E_mail:admin@mintao.net(欢迎提供学习资源)

    站长:MinTao ICP备案号:鄂ICP备11006601号-18

    闵涛站盟:医药大全-武穴网A打造BCD……
    咸宁网络警察报警平台