705
signature from the beginning. If you also specify the
field
field-name
option, the offset begins from
the protocol field.
hex hex-vector
: Specifies a hexadecimal vector as the match pattern.
regex regex-pattern
: Specifies a regular expression as the match pattern. The
regex-pattern
argument is a case-sensitive string of 3 to 512 characters.
string string
: Specifies a string as the match pattern. The
string
argument is a case-sensitive string
of 3 to 512 characters.
Usage guidelines
You can repeat this command to configure multiple signatures of different match patterns in a
user-defined NBAR rule, and all signatures take effect. The logical relation of these signatures is OR,
which indicates that a packet that matches any signature matches the NBAR rule.
Examples
# Configure user-defined NBAR rule
abcd
to match packets with signature 1 which defines match
string
abcdegf
.
<Sysname> system-view
[Sysname] nbar application abcd protocol http
[Sysname-nbar-application-abcd] signature 1 string abcdefg
Related commands
nbar application
source
Use
source
to specify a source IP address or subnet as a match criterion in a user-defined NBAR
rule.
Use
undo source
to restore the default.
Syntax
source
{
ip
ipv4-address
[
mask-length
] |
ipv6
ipv6-address
[
prefix-length
] }
undo source
Default
A user-defined NBAR rule matches packets sourced from all IP addresses.
Views
NBAR rule view
Predefined user roles
network-admin
Parameters
ip ipv4-address
: Specifies a source IPv4 address or IPv4 subnet, in dotted decimal notation.
mask-length
:
Specifies the mask length for IPv4 addresses, in the range of 0 to 32.
ipv6 ipv6-address
: Specifies a source IPv6 address or IPv6 subnet.
prefix-length
: Specifies the prefix length for IPv6 addresses, in the range of 0 to 128.
Usage guidelines
If you execute this command multiple times for the same NBAR rule, the most recent configuration
takes effect.