千家信息网

边界路由器安全设定笔记

发表于:2026-11-01 作者:千家信息网编辑
千家信息网最后更新 2026年11月01日,R1(conf)# no cdp run #在边界路由器上关闭CDP协议,防止非法用户通过CDP检测内部网络R1(conf)# no service tcp-small-service #echo 1
千家信息网最后更新 2026年11月01日边界路由器安全设定笔记

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参数说明:

  • precedence :过滤特定的优先级别,范围为0到7级别。IP数据包头通常为服务质量保证(Quality of Service, Qos)和队列的目的进行流量分类。

  • dscp:过滤IP数据包头中的区分服务代码(Differentiated Services Code Point,DSCP)值进行过滤;

  • tos: 过滤IP数据包头中的服务类型域,用于QoS实施

  • log: 用于记录控制吧、内部缓存或是系统日志,被记录内容包括有TCP、UDP或是ICMP,记录源端口号和目的端口号等;

  • log-input: 记录的信息包括接收到的数据包的输入接口和数据包中的第二层源地址;

ACL例子:

  • access-list 100 permit tcp any host 200.1.1.2 eq 25 # 任何流量都可以发送E-mail流量到200.1.1.2

  • access-list 100 permit tcp any eq 25 host 200.1.1.2 established #内部E-mail 服务器发送邮件到外部服务器,并接收回复。established是用户发送到去的TCP流量将允许返回,但此参数在边界路由器上会产生有一漏洞,即是***可以利用返回数据的ACK \ FIN \ PSH \ RST \ SYS等TCP标记位进行修改并进行***;

  • 在接口下利用ip accounting access-violations 进行IP 统计

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

  • 使用PAM和ACL来限制CBAC审查

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

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

  • 使用ACL来处理TCP SYN洪水***

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

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

  • 过滤icmp、traceroute、RPC、SQL

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

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

  • 过滤Trinoo

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

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

  • 过滤DCOM连接,***利用微软的RPC代码的缺陷进行***。微软在分布式对像模块(Distributed Component Object Module,DCOM)中发现漏洞。DCOM使用的端口是 135 139 445

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

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

  • 使用CBAC来阻止DoS***

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

  • 设置一个简单的CBAC的审查配置

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

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

  • 使用CBAC来阻止DoS***

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

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

  • 使用TCP截取来保护区内部服务器

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


路由 服务 路由器 数据 服务器 流量 功能 网络 口号 洪水 用户 目的 端口 设备 包头 子网 边界 代码 参数 回声 数据库的安全要保护哪些东西 数据库安全各自的含义是什么 生产安全数据库录入 数据库的安全性及管理 数据库安全策略包含哪些 海淀数据库安全审计系统 建立农村房屋安全信息数据库 易用的数据库客户端支持安全管理 连接数据库失败ssl安全错误 数据库的锁怎样保障安全 天津市摩尔互联网科技 广州淘业互联网络科技 互联网科技排名 友谊互联网络科技 碳银互联网科技有限公司 长亮科技 互联网金融 互联网科技视频素材 丰台科技园 互联网公司 博兴的互联网电子科技公司 剑昆互联网络科技有限公司临桂 互联网科技寓意 互联网企业和科技型企业 港股科技和互联网 华中科技大学互联网的牛人 滨湖区互联网智能科技产品有哪些 中天科技中国工业互联网 互联网科技年终奖 本届互联网大会上的黑科技 下一代互联网重大应用科技园 银川新华互联网科技学校是国营吗 互联网是第几次科技革命的成果 互联网科技产业 高科技互联网 齐家互联网科技 腾讯科技 互联网女皇 科技大学互联网专业好不好 互联网公司会议桌创意科技软装饰 深圳前海聚择互联网科技有限公司 湖北码尼互联网科技有限公司电话 互联网公司高科技产品
0