16-入侵防御及病毒防护命令
本章节下载: 16-入侵防御及病毒防护命令 (253.12 KB)
目 录
ips template命令用来创建或派生IPS模板。
no ips template命令用来删除IPS模板。
【命令】
ips template NAME
ips template NAME derive-from NAME
no ips template NAME
【视图】
配置视图
【参数】
NAME:模板名称
【使用指导】
内存为1G的设备可以创建16个模板,2G/4G设备可以创建32个模板,8G及以上可以创建64个模板。
【举例】
#创建IPS模板:
Host# configure terminal
Host(config)#ips template test
Host(config-ips-template)#
#派生IPS模板:
Host# configure terminal
Host(config)#ips template test derive-from All
Host(config-ips-template)#
【相关命令】
display ips template [ NAME ]
description命令用来配置IPS模板的描述信息。
no description命令用来删除IPS模板的描述信息。
【命令】
description .LINE
no description
【视图】
IPS模板视图
【参数】
.LINE:模板描述信息。
【举例】
#配置模板描述信息:
Host# configure terminal
Host(config)#ips template test
Host(config-ips-template)# description test
Host(config-ips-template)#
rule命令用来向模板添加规则。
no rule命令用来删除模板下的规则。
【命令】
rule ID
rule ID log { alert | warning | notice | info | ignore } block { on | off } capture { on | off } isolate off { enable | disable }
rule ID log { alert | warning | notice | info | ignore } block { on | off } capture { on | off } isolate <60-7200> { enable | disable }
no rule [ID]
【视图】
IPS模板视图
【参数】
ID:规则ID。
log:alert(告警)、warning(警告)、notice (通知)、info(信息)、ignore(不记录)。
block:阻断,on(阻断)、off(不阻断)。
capture:抓包,on(抓包)、off(不抓包)。
isolate:隔离,<60-7200>(隔离并指定隔离时间),off(不隔离)。
enable:启用规则。
disable:禁用规则。
【使用指导】
可以使用rule ID添加一条规则,其中日志级别会根据规则严重程度来确定,“紧急”的日志级别为alert,“高”为warning,“中”为:notice,“低”为:信息,规则默认启用、阻断、不隔离、不抓包。也可以在配置时按实际需求指定规则的日志等级、是否启用、是否阻断、是否隔离(隔离时指定隔离时间)、是否抓包。
【举例】
#IPS模板下添加规则:
Host# configure terminal
Host(config)#ips template test
Host(config-ips-template)# rule 52224
Host(config-ips-template)# rule 52225 log alert block on capture on isolate 720 enable
proto-check命令用来配置协议异常检查。
proto-check { http | dns | ftp | smtp | pop3 } { enable | disable } 命令用来开启/关闭某种协议的检查。
proto-check http命令用来配置HTTP协议的检查内容,包括检查项的开启/关闭,检查项的长度配置,以及日志、处理动作、是否抓包等。
proto-check dns 命令用来配置DNS协议的检查内容,包括检查项的开启/关闭,检查项的长度配置,以及日志、处理动作、是否抓包等。
proto-check ftp 命令用来配置FTP协议的检查内容,包括检查项的开启/关闭,检查项的长度配置,以及日志、处理动作、是否抓包等。
proto-check {smtp | pop3 } 命令用来配置SMTP/POP3协议的检查内容,包括检查项的开启/关闭,检查项的长度配置,以及日志、处理动作、是否抓包等。【命令】
proto-check http { urllen-check | headerlen-check | host-check | version-check | dirlen-check } { enable | disable }
proto-check http { urllen-check | headerlen-check } length <64-4096> action { deny | permit } log { alert | warning | notice | info | ignore } capture { on | off }
proto-check http dirlen-check length <8-512> action { deny | permit } log { alert | warning | notice | info | ignore } capture { on | off }
proto-check http { host-check | version-check } action { deny | permit } log { alert | warning | notice | info | ignore } capture { on | off }
DNS协议检查命令:
proto-check dns { namelen-check | namelegal-check } { enable | disable }
proto-check dns namelen-check length <1-1024> action { deny | permit } log { alert | warning | notice | info | ignore } capture { on | off }
proto-check dns namelegal-check action { deny | permit } log { alert | warning | notice | info | ignore } capture { on | off }
FTP协议检查命令:
proto-check ftp { cmdlen-check | paralen-check } { enable | disable }
proto-check ftp cmdlen-check length <2-128> action { deny | permit } log { alert | warning | notice | info | ignore } capture { on | off }
proto-check ftp paralen-check length <2-1024> action { deny | permit } log { alert | warning | notice | info | ignore } capture { on | off }
SMTP/POP3协议检查命令:
proto-check { smtp | pop3 } { contentlen-check | filenamelen-check } { enable | disable }
proto-check { smtp | pop3 } contentlen-check length <64-2048> action { deny | permit } log { alert | warning | notice | info | ignore } capture { on | off }
proto-check { smtp | pop3 } filenamelen-check length <1-512> action { deny | permit } log { alert | warning | notice | info | ignore } capture { on | off }
【视图】
IPS模板视图
【参数】
http:http协议异常检查
dns:dns协议异常检查
ftp:ftp协议异常检查
smtp:smtp协议异常检查
pop3:pop3协议异常检查
enable:启用检查
disable:禁用检查
urllen-check:http协议URL长度检测
headerlen-check:http协议头部长度检测
dirlen-check:http协议目录长度检测
host-check:http协议host字段检测
version-check:http协议version字段检测
namelen-check:DNS域名长度检查
namelegal-check:DNS域名合法性检查
cmdlen-check:FTP协议命令长度检查
paralen-check:FTP协议参数长度检查
contentlen-check:SMTP或POP3邮件内容长度检查
filenamelen-check:SMTP或POP3文件名长度检查
length:长度检查的检测范围
deny:阻断
permit:允许
log:alert(告警)、warning(警告)、notice (通知)、info(信息)、ignore(不记录)
capture:抓包,on(抓包)、off(不抓包)
【使用指导】
协议异常检查支持HTTP、FTP、DNS、SMTP和POP3,每种协议都支持整体的开启或关闭。
HTTP协议支持URL长度、请求头长度、目录长度、host字段、version字段的检查,每种检查都支持单独的开启或关闭,支持配置动作、日志和抓包,长度检查支持配置检测范围。
DNS协议支持域名长度和域名字符合法性检查,每种检查都支持单独的开启或关闭,支持配置动作、日志和抓包,长度检查支持配置检测范围。
FTP协议支持命令长度和参数长度检查,每种检查都支持单独的开启或关闭,支持配置动作、日志和抓包,长度检查支持配置检测范围。
SMTP和POP3协议支持内容长度和文件名长度检查,每种检查都支持单独的开启或关闭,支持配置动作、日志和抓包,长度检查支持配置检测范围
【举例】
#IPS模板下配置HTTP协议异常检查:
Host# configure terminal
Host(config)#ips template test
Host(config-ips-template)# proto-check http enable
Host(config-ips-template)# proto-check http urllen-check enable
Host(config-ips-template)# proto-check http urllen-check length 1024 action deny log warning capture on
ips template命令用来配置策略下的IPS功能。
no ips template命令用来取消策略下的IPS配置。
【命令】
ips template NAME protection-mode { on | off }
no ips template
【视图】
控制策略视图
【参数】
NAME:IPS模板名称
protection-mode:on(开启防护),off(关闭防护)。
【使用指导】
开启防护时,命中规则后,会根据规则的配置记录日志,并进行阻断、隔离、抓包等处理;关闭防护时,只记录日志,不做任何其它处理。
【举例】
#控制策略下配置IPS功能:
Host# configure terminal
Host(config)# policy 1
Host(config-policy)# ips template test protection-mode on
ips-custom rule命令用例增加入侵检测自定义规则。
no ips-custom rule命令用来删除入侵检测自定义规则。
【命令】
ips-custom rule NAME
no ips-custom rule NAME
【视图】
系统视图
【参数】
Name:自定义规则名称。
【使用指导】
最多可添加32条自定义规则。
【举例】
#添加ips自定义规则aaa。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#
【相关命令】
display running-config ips-custom
action命令用来配置规则的处理动作。
【命令】
action { deny | permit }
【视图】
ips-custom视图
【参数】
deny:处理动作为拒绝。
permit:处理动作为允许。
【举例】
#ips自定义规则aaa的处理动作为拒绝。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#action deny
【相关命令】
display running-config ips-custom
log 命令用来配置规则的日志界别
【命令】
log { ignore | alert | warning | notice | info }
【视图】
ips-custom视图
【参数】
ignore:不记录日志。
alert:日志级别为告警。
warning:日志级别为警告。
notice:日志级别为通知。
info:日志级别为信息。
【举例】
#设置ips自定义规则aaa的日志级别为告警。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#log alert
【相关命令】
display running-config ips-custom
enable命令用来启用IPS自定义规则。
disable命令用来禁用IPS自定义规则。
【命令】
enable
disable
【缺省情况】
缺省情况下,IPS自定义规则是启用的。
【视图】
ips-custom视图
【举例】
# 使能ips自定义规则aaa。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#enable
【相关命令】display running-config ips-custom
clear命令用来清除该条IPS自定义规则的计数
【命令】
clear
【视图】
ips-custom视图
【举例】
# 清除ips规则1的计数。
Host# configure terminal
Host(config)#ips-custom rule 1
Host(config-ips-custom)#clear
【相关命令】
display running-config ips-custom
priority命令用来配置IPS自定义规则得优先级
【命令】
priority (critical | high | medium | low)
【视图】
ips-custom视图
【参数】
critical:IPS自定义规则的优先级为“紧急”。
high:IPS自定义规则的优先级为“高”。
medium:IPS自定义规则的优先级为“中”。
low:IPS自定义规则的优先级为“低”。【举例】
# 设置IPS自定义规则1 的优先级为高。
Host# configure terminal
Host(config)#ips-custom rule 1
Host(config-ips-custom)#priority high
【相关命令】
display running-config ips-custom
match direction命令用来配置IPS自定义规则检测的会话方向。
【命令】
match direction { to_client | to_server | both }
【视图】
ips-custom视图
【参数】
to_client:IPS自定义规则的检测方向为“向客户端”。
to_server:IPS自定义规则的检测方向为“向服务端”。
both:IPS自定义规则的检测方向为“双向检测”。
【举例】
# 设置IPS自定义规则1 只匹配客户端发徍服务器得数据。
Host# configure terminal
Host(config)#ips-custom rule 1
Host(config-ips-custom)#match direction to_server
【相关命令】
display running-config ips-custom
check命令用来增加ips自定义规则匹配规则。
【命令】
check <0-7>
【视图】
ips-custom视图
【参数】
<0-7>:ips自定义规则匹配规则的ID号,为<0-7>。【举例】
#配置名称为“aaa”IPS自定义规则,增加一条ID号为0的匹配规则。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#check 0
Host(config-ips-custom-check)#
【使用指导】
ips自定义规则可以配置两层匹配规则,check配置的为第一层,每条ips自定义规则可以配置8条check 规则,ID号固定为<0-7>,check规则之间的关系为逻辑与。
【相关命令】
display running-config ips-custom
ip命令用来增加ip协议匹配规则。
【命令】
ip length { equal | greater | less } <0-65535>
ip payload contain
ip proto { equal | unequal } <0-255>
ip { saddr | daddr } { equal | greater | less } { A.B.C.D | X:X::X:X }
【视图】
ips-custom-check视图
【参数】
length:IP协议的负载长度字段。
payload:IP协议的负载字段。
proto:IP协议的协议字段。
saddr:IP协议的源地址字段。
daddr:IP协议的目的地址字段。
equal:协议字段的配置方式为“等于”。
greater:协议字段的配置方式为“大于”。
less:协议字段的配置方式为“小于”。
<0-65535>:负载长度,输入范围为0-65535。
contain:负载字段的配置方式为“包含”,输入命令回车后,可在系统提示下输入配置内容。
unequal:协议字段的配置方式为“不等于”。
A.B.C.D:IPv4地址。
X:X::X:X:IPv6地址。
【举例】
#添加ip 协议号为6的规则。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#check 0
Host(config-ips-custom-check)# ip proto equal 6
#添加ip 负载长度大于100字节。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#check 0
Host(config-ips-custom-check)# ip length greater 100
#添加ip 负载包含字符“aaa”。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#check 0
Host(config-ips-custom-check)#ip payload contain
Please input the content to match, length scope is 1-127. It is case insensitive: aaa
添加ip 源地址等于1.1.1.1 。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#check 0
Host(config-ips-custom-check)#ip saddr equal 1.1.1.1
【相关命令】
display running-config ips-custom
tcp命令用来增加TCP协议匹配规则。
【命令】
tcp { sport | dport } { equal | unequal | greater } <0-65535>
tcp length { equal | greater | less } <0-65535>
tcp payload contain
【视图】
ips-custom-check视图
【参数】
sport:TCP协议的源端口号字段。
dport:TCP协议的目的端口号字段。
length:TCP协议的负载长度字段。
payload:TCP协议的负载字段。
equal:协议字段的配置方式为“等于”。
greater:协议字段的配置方式为“大于”。
less:协议字段的配置方式为“小于”。
<0-65535>:端口号或负载长度,输入范围为0-65535。
contain:负载字段的配置方式为“包含”,输入命令回车后,可在系统提示下输入配置内容。
unequal:协议字段的配置方式为“不等于”。【举例】
#添加tcp源端口不等于5000的规则。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#check 0
Host(config-ips-custom-check)# tcp sport unequal 5000
#添加tcp 负载长度大于100字节。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#check 0
Host(config-ips-custom-check)# tcp length greater 100
#添加tcp 负载包含字符“aaa”。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#check 0
Host(config-ips-custom-check)#tcp payload contain
Please input the content to match, length scope is 1-127. It is case insensitive: aaa
udp命令用来增加udp协议匹配规则。
【命令】
udp { sport | dport } { equal | unequal | greater } <0-65535>
udp length {equal | greater | less } <0-65535>
udp payload contain
【视图】
ips-custom-check视图
【参数】
sport:UDP协议的源端口号字段。
dport:UDP协议的目的端口号字段。
length:UDP协议的负载长度字段。
payload:UDP协议的负载字段。
equal:协议字段的配置方式为“等于”。
greater:协议字段的配置方式为“大于”。
less:协议字段的配置方式为“小于”。
<0-65535>:端口号或负载长度,输入范围为0-65535。
contain:负载字段的配置方式为“包含”,输入命令回车后,可在系统提示下输入配置内容。
unequal:协议字段的配置方式为“不等于”。
【举例】
#添加tcp源端口不等于5000的规则。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#check 0
Host(config-ips-custom-check)# udp sport unequal 5000
#添加tcp 负载长度大于100字节。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#check 0
Host(config-ips-custom-check)# udp length greater 100
#添加tcp 负载包含字符“aaa”。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#check 0
Host(config-ips-custom-check)# udp payload contain
Please input the content to match, length scope is 1-127. It is case insensitive: aaa
icmp命令用来增加icmp协议匹配规则。
【命令】
icmp type { equal | unequal | greater } <0-255>
icmp code { equal | unequal | greater } <0-255>
icmp length { equal | greater | less } <0-65535>
icmp payload { contain | regular }
【视图】
ips-custom-check视图
【参数】
type:ICMP协议的类型字段。
code:ICMP协议的代码字段。
length:ICMP协议的负载长度字段。
payload:ICMP协议的负载字段。
equal:协议字段的配置方式为“等于”。
unequal:协议字段的配置方式为“不等于”。
greater:协议字段的配置方式为“大于”。
less:协议字段的配置方式为“小于”。
<0-255>:类型或代码字段的配置内容,范围为0-255。
<0-65535>:负载长度,输入范围为0-65535。
contain:负载字段的配置方式为“包含”,输入命令回车后,可在系统提示下输入配置内容。
regular:负载字段的配置方式为“正则匹配”。【举例】
#添加icmp代码等于0的规则。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#check 0
Host(config-ips-custom-check)# icmp code equal 0
#添加icmp 类型等于8。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#check 0
Host(config-ips-custom-check)# icmp type equal 8
#添加icmp负载包含字符“aaa”。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#check 0
Host(config-ips-custom-check)# icmp payload contain
Please input the content to match, length scope is 1-127. It is case insensitive: aaa
#添加icmp负载长度小于100。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#check 0
Host(config-ips-custom-check)# icmp length less 100
http命令用来增加http协议匹配规则。
http { method | version | url | raw_url | host | cookie | header | rsp_header | content_type | referer | user-agent } length命令用来配置方法长度、版本长度、URL长度、HOST长度、Cookie长度、Header长度、Response Header长度、Content-Type长度、Referer长度、User-Agent长度协议字段。
http { url | raw_url | host | cookie | header | rsp_header | content_type | referer | stat_code | user-agent } { contain | regular } 命令用来配置URL内容、HOST内容、Cookie内容、Header内容、Response Header内容、Content-Type内容、Referer内容、Stat-Code内容、User-Agent内容协议字段。
http method { equal | unequal } { get | head | put | delete | post | options | trace | connect }
令用来配置HTTP协议方法内容。
http xff { equal | unequal } 命令用来配置HTTP协议的X-Forward-For协议字段。
【命令】
http { method | version | url | raw_url | host | cookie | header | rsp_header | content_type | referer | user-agent } length { equal | greater | less } <0-65535>
http { url | raw_url | host | cookie | header | rsp_header | content_type | referer | stat_code | user-agent} { contain | regular }
http method { equal | unequal } { get | head | put | delete | post | options | trace | connect }
http xff { equal | unequal } { A.B.C.D | X:X::X:X }
【视图】
ips-custom-check视图
【参数】
equal:协议字段的配置方式为“等于”。
unequal:协议字段的配置方式为“不等于”。
greater:协议字段的配置方式为“大于”。
less:协议字段的配置方式为“小于”。
<0-65535>:协议字段长度的值,输入范围为0-65535。
contain:HTTP协议字段内容的配置方式为“包含”,输入命令回车后,可在系统提示下输入配置内容。
regular:HTTP协议字段的配置方式为“正则匹配”。
A.B.C.D:IPv4地址。
X:X::X:X:IPv6地址。
【举例】
#添加HTTP方法等于post的规则。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#check 0
Host(config-ips-custom-check)# http method equal post
#添加HTTPURL正则匹配aaa。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#check 0
Host(config-ips-custom-check)# http url regular
Please input the content to match, length scope is 1-127. It is case insensitive: [a][b][c]
#添加HTTPHOST字段的长度大于50字节。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#check 0
Host(config-ips-custom-check)# http host length greater 50
添加HTTP X-Forward-For字段等于1.1.1.1。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#check 0
Host(config-ips-custom-check)# http xff equal 1.1.1.1
ftp命令用来增加ftp协议匹配规则。
ftp { cmd | cmd-parameter } { contain | regular } 命令用来配置FTP协议规则中命令及命令参数的内容字段。
ftp { cmd | cmd-parameter } length { equal | greater | less } 命令用来配置FTP协议规则中命令及命令参数的长度字段。
【命令】
ftp { cmd | cmd-parameter } { contain | regular }
ftp { cmd | cmd-parameter } length { equal | greater | less } <0-65535>
【视图】
ips-custom-check视图
【参数】
cmd:命令。
cmd-parameter:命令参数。
length:命令或命令参数长度。
equal:协议字段的配置方式为“等于”。
greater:协议字段的配置方式为“大于”。
less:协议字段的配置方式为“小于”。
<0-65535>:协议字段长度的值,输入范围为0-65535。
contain:FTP协议字段内容的配置方式为“包含”,输入命令回车后,可在系统提示下输入配置内容。
regular:FTP协议字段的配置方式为“正则匹配”。
【举例】
#添加FTP命令包含STOR的规则。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#check 0
Host(config-ips-custom-check)# ftp cmd contain stor
#添加FTP命令参数长度等于10字节。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#check 0
Host(config-ips-custom-check)# ftp cmd-parameter
pop3命令用来增加pop3协议匹配规则。
pop3 { cmd | cmd-parameter } {contain | regular} 命令用来配置POP3协议规则中命令及命令参数的内容字段。
pop3 { cmd | cmd-parameter } length 命令用来配置POP3协议规则中命令及命令参数的长度字段。
【命令】
pop3 { cmd | cmd-parameter } {contain | regular}
pop3 { cmd | cmd-parameter } length { equal | greater | less } <0-65535>
【视图】
ips-custom-check视图
【参数】
cmd:命令。
cmd-parameter:命令参数。
length:命令或命令参数长度。
equal:协议字段的配置方式为“等于”。
greater:协议字段的配置方式为“大于”。
less:协议字段的配置方式为“小于”。
<0-65535>:协议字段长度的值,输入范围为0-65535。
contain:POP3协议字段内容的配置方式为“包含”,输入命令回车后,可在系统提示下输入配置内容。
regular:POP3协议字段的配置方式为“正则匹配”。
【举例】
#添加pop3命令包含user的规则。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#check 0
Host(config-ips-custom-check)# pop3 cmd contain user
#添加pop3 命令参数小于100字节
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#check 0
Host(config-ips-custom-check)# pop3 cmd-parameter length less 100
smtp命令用来增加smtp协议匹配规则。
smtp { cmd | cmd-parameter } {contain | regular} 命令用来配置SMTP协议规则中命令及命令参数的内容字段。
smtp { cmd | cmd-parameter } length 命令用来配置SMTP协议规则中命令及命令参数的长度字段。【命令】
smtp { cmd | cmd-parameter } { contain | regular }
smtp { cmd | cmd-parameter } length { equal | greater | less } <0-65535>
【视图】
ips-custom-check视图
【参数】
cmd:命令。
cmd-parameter:命令参数。
length:命令或命令参数长度。
equal:协议字段的配置方式为“等于”。
greater:协议字段的配置方式为“大于”。
less:协议字段的配置方式为“小于”。
<0-65535>:协议字段长度的值,输入范围为0-65535。
contain:POP3协议字段内容的配置方式为“包含”,输入命令回车后,可在系统提示下输入配置内容。
regular:POP3协议字段的配置方式为“正则匹配”。
【举例】
#添加smtp命令包含mail的规则。
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#check 0
Host(config-ips-custom-check)# smtpcmd contain mail
#添加smtp命令参数小于100字节
Host# configure terminal
Host(config)#ips-custom rule aaa
Host(config-ips-custom)#check 0
Host(config-ips-custom-check)# smtpcmd-parameter length less 100
ips log-aggregation命令用来配置IPS日志的聚合方式。
【命令】
ips log-aggregation {none | sid | src | dst | all }
【视图】
配置视图
【参数】
none:不聚合
sid:按规则聚合
src:按源IP聚合
dst:按目的IP聚合
all:按源、目的IP聚合
【使用指导】
默认不聚合。
【举例】
#配置IPS日志按规则聚合:
Host# configure terminal
Host(config)#ips log-aggregation sid
ips normalize命令用来配置IPS防逃避。
no ips normalize命令用来取消防逃避配置。
【命令】
ips normalize { http_url | http_cookie | http_header | http_post_form | http_javascript | http_utf_file | ftp | all }
no ips normalize { http_url | http_cookie | http_header | http_post_form | http_javascript | http_utf_file | ftp | all }
【视图】
配置视图
【参数】
http_url:HTTP URL防逃避。
http_cookie:HTTP Cookie防逃避。
http_header:HTTP头部防逃避。
http_post_form:HTTP post表单防逃避。
http_javascript:HTTP javascript文件防逃避。
http_utf_file:HTTP UTF文件防逃避。
ftp:FTP防逃避。
all:启用全部防逃避。
【使用指导】
防逃避默认不开启,只有配置后才会进行防逃避处理。
【举例】
#配置HTTP URL防逃避
Host# configure terminal
Host(config)#ips normalize http_url
ips log-policy命令用来配置IPS高阶告警策略。
no ips log-policy命令用来删除IPS高阶告警策略。
【命令】
ips log-policy NAME { SIP | any } { DIP | any } { XIP | any } { SPORT | any } { DPORT | any } { all | info | notice | warning | alert } { all | pass | drop } { all | EVENT_TYPE } period { 60 | 300 | 600 | 900 |1800 | 3600 | 7200 | 14400 | 28800 | 43200 | 86400 } threshold THRESHOLD
ips log-policy NAME
no ips log-policy NAME
【视图】
配置视图
【参数】
NAME:高阶告警策略名称
SIP:匹配的源地址对象。
DIP:匹配的目的地址对象或任意地址。
XIP:匹配的X-Forward-For地址对象。
any:任意地址或端口。
SPORT:匹配的源端口。
DPORT:匹配的目的端口。all:匹配的日志级别为“全部”。
info:匹配的日志级别为“信息”。
notice:匹配的日志级别为“通知”。
warning:匹配的日志级别为“警告”。
alert:匹配的日志级别为“告警”。
all:匹配的动作为“全部”。
pass:匹配的动作为“允许”。
drop:匹配的动作为“拒绝”。
EVENT_TYPE:匹配的事件类型,all为“全部”。
period:检测周期,单位为秒。可设置的值包括:60、300、600、900、1800、3600、7200、14400、28800、43200、86400。
threshold:设置检测阈值。
THRESHOLD:阈值,可设置范围:1-99999999条。
【使用指导】
如果配置了高阶告警策略,IPS产生日志时,会用日志信息里的源目的地址、动作、事件类型等去匹配高阶告警策略,如果匹配,则进行计数,如果在检测周期内达到阈值,则会产生高阶告警日志。
【举例】
#配置IPS高阶告警策略:
Host# configure terminal
Host(config)# ips log-policy test any any any any any all all all period 60 threshold 10
Host(config-ips-log-policy)#
【相关命令】
display ips rule type
{ enable | disable } 命令用来启用或禁用IPS高阶告警策略。
【命令】
enable
disable
【视图】
IPS高阶告警策略视图
【参数】
enable:启用IPS高阶告警策略。
disable:禁用IPS高阶告警策略。
【使用指导】
无
【举例】
#禁用IPS高阶告警功能:
Host# configure terminal
Host(config)# ips log-policy test
Host(config-ips-log-policy)# disable
alert-action命令用来配置高阶告警的告警方式。
no alert-action命令用来删除高阶告警的告警方式。
【命令】
alert-action { syslog | email }
no alert-action { syslog | email }
【视图】
IPS高阶告警策略视图
【参数】
syslog:命中高阶告警策略时记录日志
email:命中高阶告警策略时发送邮件
【使用指导】
无
【举例】
#配置命中高阶告警策略是记录日志:
Host# configure terminal
Host(config)# ips log-policy test
Host(config-ips-log-policy)# alert-action syslog
clear-statistics命令用来清除高阶告警的统计信息。
【命令】
clear-statistic
【视图】
IPS高阶告警策略视图
【参数】
无
【使用指导】
同一条告警策略可能会被命中多次,每次都会记录命中该条策略的日志数量,该命令可以清楚这些记录。
【举例】
#清楚高阶告警的命中记录:
Host# configure terminal
Host(config)# ips log-policy test
Host(config-ips-log-policy)# clear-statistic
av scan命令用来指定扫描的病毒文件类型
no av sacn 命令用来删除指定的病毒文件类型
【命令】
Av scan file { expr | any } { disable | enable }
no av scan file expr
【视图】
系统视图
【参数】
expr:具体文件名称。
【使用指导】
文件类型必须以*.开头。
【举例】
#创建av 扫描类型为txt 状态为启用
host# system-view
host(config)# av scan file *.txt enable
Av unpack 命令用来指定是否启用解压以及最大解压层数
【命令】
Av unpack { off | on | level } <5-20>
【视图】
系统视图
【参数】
无
【使用指导】
最大解压层数支持20层。
【举例】
#启用病毒设定解压功能以及最大解压层数为6
host# system-view
host(config)# av unpack on
host(config)# av unpack level 6
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!