IP1285[admin]# fwaccel stats IP1285[admin]# fw ver -k
IP1285[admin]# fw ctl multik stat IP1285[admin]# uname -a
IP1285[admin]# find / -name \IP1285[admin]# cd /var/ IP1285[admin]# cd crash IP1285[admin]# ls -ltr
IP1285[admin]# gzip -d vmcore.79.gz IP1285[admin]# strings vmcore.79 > 79 IP1285[admin]# fw ctl get int fw_log_bufsize fw_log_bufsize = 1638400 IP1285[admin]# cphaprob stat IP1285[admin]# tcsh IP1285[admin]# while 1 IP1285[admin]# while 1 while? fwaccel conns -s while? sleep 1 while? end
There are 140304 connections in SecureXL connections table Error getting the connections table (timeout)
There are 140490 connections in SecureXL connections table There are 140564 connections in SecureXL connections table IP1285[admin]# fwaccel conns -s
There are 139902 connections in SecureXL connections table IP1285[admin]# uptime
IP1285[admin]# fw tab -t connections -s IP1285[admin]# cpstat -f policy fw IP1285[admin]# netstat -i IP1285[admin]# fw ctl pstat IP1285[admin]# cd /var/log IP1285[admin]# cd monitor IP1285[admin]# ls
summary tm.db tm_summary.db IP1285[admin]# IP1285[admin]# ll total 29970
drwxr-xr-x 2 root wheel 512 May 19 2010 summary -rw-r--r-- 1 root wheel 28558336 Feb 27 15:52 tm.db
-rw-r--r-- 1 root wheel 2068480 Feb 27 15:05 tm_summary.db IP1285[admin]# IP1285[admin]#
IP1285[admin]# sqlite3 tm.db
41
SQLite version 3.5.8
Enter \sqlite> ? sqlite> .quit
IP1285[admin]# cp /var/log/monitor/tm.db tm_nazir.db IP1285[admin]# ll total 79476
-rw------- 1 root wheel 1969 Feb 18 13:40 .clish_history -rw-r--r-- 1 root wheel 938 Sep 4 2009 .cshrc -rw------- 1 root wheel 25817 Feb 27 14:53 .history -rw-r--r-- 1 root wheel 195 Sep 4 2009 .login -rw-r--r-- 1 root wheel 365 Sep 4 2009 .profile -rw-rw-r-- 1 root wheel 38819 Aug 9 2010 RIP1.pcap -rw-rw-r-- 1 root wheel 31549 Jul 29 2010 waptest2-2.pcap -rw-rw-r-- 1 root wheel 1165685 Jul 29 2010 waptest2-3.pcap -rw-rw-r-- 1 root wheel 44606 Jul 29 2010 waptest2.pcap IP1285[admin]# sqlite3 tm_nazir.db SQLite version 3.5.8
Enter \sqlite> .schema cpu
CREATE TABLE cpu (ts integer, fwid, core, user, nice, sys, intr, idle);
sqlite> select max(ts) from cpu; 1298793316
sqlite> select * from cpu where ts>=1298793316 limit 25; 1298793316|65535|0|0.56|0.0|0.62|1.85|96.97 1298793316|65535|1|0.13|0.0|0.13|6.16|93.59 1298793316|65535|2|0.18|0.0|0.19|0.96|98.67 1298793316|65535|3|0.02|0.0|0.04|0.96|98.98 sqlite> select * from cpu limit 25;
1298185503|65535|0|0.22|0.0|0.47|2.65|96.66 sqlite> select * from cpu;
1298185503|65535|0|0.22|0.0|0.47|2.65|96.66 1298185503|65535|1|0.11|0.0|0.14|4.35|95.41 1298185503|65535|2|0.47|0.0|0.47|0.56|98.5 1298185503|65535|3|0.26|0.0|0.26|0.65|98.83 IP1285[admin]# cd /var/log/
IP1285[admin]# grep buffer messages* IP1285[admin]# grep FW-1 messages*
42
7 防火墙巡检报告
7.1 防火墙(FW)信息输入
客户名称 硬件型号 部署区域 软件版本 产品服务级别 检查项目 内容 接口数量统计 CPU数量统计 内存总量统计 硬件、操作系统检查 硬盘容量统计 Cluster状态 火墙补丁版本 操作系统版本 检查方式 Ifconfig -a top free –k df -m cphaprob stat fw ver uname -a 检查地点 运行时间 设备用途 EOS时间 服务期限 结果 收集防火墙基本信息,跟踪防火墙版本、服务信息,确保产品在有效服务期内。 注:EOS(End of Support) 是指原厂提供的对该版本支持的时间期限 EoS查询连接:http://www.checkpoint.com/services/lifecycle/index.html 系统运行时间通过uptime检查 7.2 管理服务器(SMC)信息输入
硬件型号 软件版本 产品服务级别 检查项目 内容 CPU数量统计 硬件、操作系统检查 内存总量统计 硬盘容量统计 SMC补丁版本 运行时间 部署区域 服务期限 检查方式 top free –k df -m fw ver 结果 43
7.3 防火墙物理层运行状况检查
7.3.1 硬件资源使用情况
检查项目 内容 检查内存状态 CPU和内存、硬盘以及网络接口状态检查 (FW检查项目) 检查CPU状态 查看硬盘状态 网卡连接状态 检查方式 free –k -t vmstat 5 10 df -k ethtool ethx 结果 在CHECK POINT主备防火墙仿真终端命令行中输入如下命令:vmstat 5 10,查看CPU利用率 使用free –k –t查看内存利用率,是否占用了Swap空间(占用了swap内存则表明内存不够用),建议扩容内存 df –k查看硬盘利用率,如果高于80%应给予积极关注查明原因。 Ethtool检查端口连接、速率和双工状态,仅适用于SPLAT。 建议将网络中每一对进出流量的接口使用同一块物理板卡上的接口,不建议跨板卡接一对进出流量接口 7.3.2 硬件资源健康检查
检查项目 内容 检查方式 结果 CoreXL CPU和内存、网卡健康检查 (FW检查项目) 查看是否有内存分#fw ctl pstat 配故障 查看哪些CPU内核消#top 耗 查看cpu内核的分配#fw ctl multik stat (仅适用于多核CPU) 查看网卡状态 #netstat -i fw ctl pstat输出如下信息,主要检查是否存在“failed alloc”分配失败的问题 (hmem)存在大量failed alloc则表明hash kernel memory占满,请检查火墙属性的Capacity Optimization属性的并发连接设置是否太大,请调回该防火墙设备硬件性能支持的合理的并发连接范围。 (smem)存在大量failed alloc则表明系统内存耗尽或者有大量non-sleep分配,这是内存缺乏的表现,升级内存或者在全局属性?状态检测属性的”TCP end timeout”选项中调低参数到5~10降低并发数,减少内存消耗 (kmem)存在大量failed alloc则表明有一些应用没有分配到内存,通常由于内存缺乏导致,建议扩容内存。 (Fragments) 13093 fragments, 6406 packets, 233 expired, 0 short, 4 large, 304 duplicates, 0 failures注意failures值。 Expired: 表示当防火墙不能在20秒内完成报文重组或者由于内存耗尽导致有多少个分段报文过期。 Failures:表示被防火墙收到的分段的报文不能被成功重组,该数值为0表示expired的数据包会随后被重传,并且不会有数据包被丢失。 44
top 输出的多核CPU信息,主要检查是否有存在内核耗尽,建议检查Core的分配是否合理(Core表示内核) 记录所有CPU内核的使用情况,重点关注消耗量比较大的内核,低于10%则需要考虑增加网卡core的分配 如果有CPU内核的“%id”(idle空闲)参数为0%,则表明防火墙过载,需要调优内核的分配改进性能。 #fw ctl multik stat输出当前CPU core的分配 建议按照Cpu0,Cpu1顺序每对的分别绑定网络接口流量的进、出口。 参考sk33250: Automatic SIM Affinity on Multi-Core CPU Systems netstat –i分析输出内容检查是否有网卡的RX-DRP属性中存在大量drop报文 如果超过RX-OK报文总量的0.5%需要引起注意,说明网卡buffer缺乏。 参考sk25921: Tuning Intel PRO/1000 family NICs driver parameters for maximal throughput。 netstat –i输出TX-DRP通常表明防火墙不能快速转发报文,建议端口聚合或者启用flow control。
7.4 防火墙系统层运行状况检查
7.4.1 系统运行日志分析
检查项目 内容 检查方式 结果 message文件检查 #more message 系统运行日志分析 (FW检查项目) dmesg文件检查 #dmesg fwd.elg文件检查 #more fwd.elg fwm.elg文件检查 #more fwm.elg 检查防火墙系统路径在系统/var/log/message、$FWDIR/log/目录下的fwd.elg、fwm.elg文件,使用more查看文件时,敲”/”,然后查找“failed”的关键字信息,按照此法继续检查“error”,”failed”等字段,然后查找KB判断该类型报错是否关键,并按照建议解决。 关键的报错信息可参考sk33219: Critical error messages and logs 7.4.2 系统安全配置检查
检查项目 内容 管理员帐号定期修改 管理员密码强度 管理IP地址的限制 是否包含隐藏防火墙保护策略 查看最近5天被修改的文件 功能检查 检查方式 检查GUI与系统密码安全性 8位包含大小写和特殊字符 cpconfig查看管理地址 是否配置有stealth rule #find /home/admin -mtime -5 -name '*.c' 结果 系统安全配置检查 (SMC=SmartCenter) (GW=Gateway) 是否开启不需要的火墙功能 45