边界路由器安全设定笔记

发布时间:2020-05-31 23:11:35 作者:arckyli
来源:网络 阅读:900

R1(conf)# no cdp run   #在边界路由器上关闭CDP协议,防止非法用户通过CDP检测内部网络

R1(conf)# no service tcp-small-service   #echo  17; chargen 19; daytime 13;

R1(conf)# no service udp-small-service  #关闭低端口服务,如防止***发送流量灌水到chargen服务端口,占用CPU资源,防止DoS***

R1(conf)# no ip finger   #关闭FINGER,防止***通过finger检查路由器登录的用户

R1(conf)# no ip identd #identD允许远程设备为了识别目的查询的一个TCP端口,端口号为113;

R1(conf)# no ip  source-route #关闭IP源路,防止***利用IP源由选择路由来绕过防火墙;

R1(conf)# no ftp-server enable #关闭FTP-SERVER功能,防止***在路由器上建立FTP服务器;

R1(conf)# no ip bootp server  #防止***通过路由器作为Boot启动;

R1(conf)# no service pad #PAD(packet assembler/disassemble)用于X.25网络

R1(conf)# no boot network #禁止通过路由器作为TFTP启动

R1(conf)# no service config # 关闭服务器设定

R1(conf)# no ip proxy-arp #有一种情况下,不应该关闭ARP代理:当路由器端远程接入IPSec ×××连接时,当地设备要通过×××远程防问客户端,路由器响应来自本地设备的arp请求,这种情况下要打开APR代理功能;

R1(conf)# no ip directed-broadcast #Dos***利用广播定向功能向特定的网络或是子网进行洪水***;

R1(conf)# no ip unreachable #***使用DoS***来使路由器生成ICMP不可达消息;

R1(conf)# no ip redirect  #***可能利用ip重定向方法,让路由产生环路由,造成网络瘫痪;

R1(conf)# no ip mask-reply #利用子网消息请求功能,***可进行定向广播DoS***子网;

--------------------------------------------------------------------------------------

ACL参数说明:

ACL例子:

--------------------------------------------------------------------------------------

      R1(config)# ip port-map http port 8080 list 1

      R1(config)#access-list permit 192.168.100.2     

      R1(config)# ip port-map http port 8090 list 2 

      R1(config)#access-list permit 192.168.100.3 

--------------------------------------------------------------------------------------

      R1(config)# ip access-list extended tcp-syn-flood

      R1(config-ext-nacl)# permit tcp any 200.1.1.0 0.0.0.255 establised

      R1(config-ext-nacl)# permit tcp any host 200.1.1.11 eq 25 

      R1(config-ext-acl)# deny ip any any

      R1(config)# interface g0/1

      R1(config-if)# ip access-group tcp-syn-flood in

      此例ACL不能阻止E-mail服务器TCP SYN洪水***,要结合CBAC审查;

--------------------------------------------------------------------------------------

* 使用ACL来阻塞Smurf和Fraggle,Smurf为icmp回声(echo)的Dos***,Fraggle是使用UDP回声进行***

      R1(config)# ip access-list extended Smurf-fraggle

      R1(config-ext-nacl)# deny icmp any any echo

      R1(config-ext-nacl)# deny icmp any any echo-reply

      R1(config-ext-nacl)# deny udp any any echo

      R1(config-ext-nacl)# deny udp any any echo-reply

      R1(config-ext-acl)#  deny ip any any

       R1(config)# interface g0/1

      R1(config-if)# ip access-group Smurf-fraggle in

      R1(config-if)# ip access-group Smurf-fraggle out

--------------------------------------------------------------------------------------

      R1(config)# ip access-list extended ICMP-IN-OUT

      R1(config-ext-nacl)# deny icmp any any echo      

      R1(config-ext-nacl)# deny icmp any any  redirect

      R1(config-ext-nacl)# deny icmp any any  mask-request

      R1(config-ext-nacl)# permit icmp any host 200.1.1.5 echo-reply

      R1(config-ext-nacl)# deny icmp any any echo-reply

      R1(config-ext-nacl)#  permit icmp any 200.1.1.0 0.0.0.255

      R1(config-ext-nacl)# deny udp any any range 32400 34400   #过滤Traceroute

  R1(config-ext-nacl)# deny tcp any any eq 514         #过滤RPC

      R1(config-ext-nacl)# deny udp any any eq 1434      #过滤SQL

      R1(config-ext-nacl)# deny tcp  any any eq 1433      #过滤SQL

      R1(config-ext-nacl)# deny tcp  any any eq 445        #过滤SMB

      R1(config-ext-acl)#  deny ip any any

      R1(config)# interface g0/1

      R1(config-if)# ip access-group CMP-IN-OUT in

      R1(config-if)# ip access-group CMP-IN-OUT  out

--------------------------------------------------------------------------------------

      R1(config)# ip access-list extended trinoo

      R1(config-ext-nacl)# deny tcp any any eq 1524  

      R1(config-ext-nacl)# deny tcp  any any eq 1524

      R1(config-ext-nacl)# deny udp  any any eq 1524

      R1(config-ext-nacl)# deny tcp any any eq 27665

      R1(config-ext-nacl)# deny tcp any  any  eq 27665 

      R1(config-ext-nacl)# deny tcp any any eq 31335

      R1(config-ext-nacl)#  deny tcp any   any  eq 31335 

      R1(config-ext-acl)#  deny ip any any

      R1(config)# interface g0/1

      R1(config-if)# ip access-group trinoo in

      R1(config-if)# ip access-group trinoo   out

--------------------------------------------------------------------------------------

      R1(config)# ip access-list extended Deny_RPC

      R1(config-ext-nacl)# deny tcp any any eq 135 

      R1(config-ext-nacl)# deny udp  any any  eq 135

      R1(config-ext-nacl)# deny tcp any any eq 139 

      R1(config-ext-nacl)# deny udp any any eq 139

      R1(config-ext-nacl)# deny tcp any  any eq 445

      R1(config-ext-nacl)# deny udp any any eq 445 

      R1(config-ext-nacl)# deny udp any any eq 593

        R1(config-ext-nacl)# deny udp any any eq 4444

      R1(config-ext-nacl)# permit ip any any

      R1(config)# interface g0/1

      R1(config-if)# ip access-group Deny_RPC in

      

--------------------------------------------------------------------------------------

     R1(config)#  ip inspect tcp synwait-time 20 

     R1(config)#  ip inspect tcp idle-time 60

     R1(config)#  ip inspect udp idle-time 20 

     R1(config)#  ip inspect max-incomplete high 400

     R1(config)#  ip inspect max-incomplete low 300

     R1(config)#  ip inspect one-minute high 600

     R1(config)#  ip inspect one-minute low 500

     R1(config)#  ip inspect tcp max-incomplete host 300 block-time 0 

      R1(config)# ip access-list extended extended_acl

      R1(config-ext-nacl)# deny tcp any any log 

      R1(config-ext-nacl)# deny udp any any log

      R1(config-ext-nacl)# deny icmp any any log

      R1(config-ext-nacl)# permit ip any any 

      R1(config)# ip inspect name cbac-example tcp

      R1(config)# ip inspect name cbac-example udp

      R1(config)# ip inspect name cbac-example icmp

      R1(config)# interface g0/1

      R1(config-if)# ip access-group extended_acl

      R1(config-if)# ipinspect cbac-example in

     

--------------------------------------------------------------------------------------

     R1(config)#  ip inspect tcp synwait-time 20 

     R1(config)#  ip inspect tcp idle-time 60

     R1(config)#  ip inspect udp idle-time 20 

     R1(config)#  ip inspect max-incomplete high 400

     R1(config)#  ip inspect max-incomplete low 300

     R1(config)#  ip inspect one-minute high 600

     R1(config)#  ip inspect one-minute low 500

     R1(config)#  ip inspect tcp max-incomplete host 300 block-time 0 

--------------------------------------------------------------------------------------

     R1(config)#  access-list 100 tcp permit tcp any host 192.168.1.1 eq 80

     R1(config)#  access-list 100 tcp permit tcp any host 192.168.1.2 eq25

     R1(config)#  ip tcp intercept list 100

     R1(config)#  ip tcp intercept mode watch

     R1(config)#  ip tcp intercept watch-timeout 20

     R1(config)#  ip tcp intercept connection-time 120

     R1(config)#  ip tcp intercept max-incomplete high 600

     R1(config)#  ip tcp intercept min-incomplete low 500

     R1(config)#  ip tcp intercept one-minute high 800

     R1(config)#  ip tcp intercept one-minute low 600


推荐阅读:
  1. 计算机安全管理(笔记)
  2. centos iptables设定

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

路由器安全

上一篇:Coding Standards

下一篇:MySQL远程连接时出现10061以及1045错误时的解决方法

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》