mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-08 21:54:57 +02:00
ipset/doc: make emphasis markup consistent
Consistently apply markup so that only replaceable items are italic, and only items to be typed verbatim are bold. Also apply the command syntax "BNF" (where and when to use [], {}) that is used in the iptables manpages to ipset.8. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
This commit is contained in:
@@ -20,17 +20,19 @@
|
|||||||
.SH NAME
|
.SH NAME
|
||||||
ipset \- administration tool for IP sets
|
ipset \- administration tool for IP sets
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.BR "ipset -N " "set type-specification [options]"
|
.PP
|
||||||
.br
|
\fBipset \-N\fP \fIset\fP \fItype-specification\fP [\fIoptions\fP...]
|
||||||
.BR "ipset -[XFLSHh] " "[set] [options]"
|
.PP
|
||||||
.br
|
\fBipset\fP {\fB\-F\fP|\fB\-H\fP|\fB\-L\fP|\fB\-S\fP|\fB\-X\fP} [\fIset\fP]
|
||||||
.BR "ipset -[EW] " "from-set to-set"
|
[\fIoptions\fP...]
|
||||||
.br
|
.PP
|
||||||
.BR "ipset -[ADT] " "set entry"
|
\fBipset\fP {\fB\-E\fP|\fB\-W\fP} \fIfrom-set\fP \fIto-set\fP
|
||||||
.br
|
.PP
|
||||||
.BR "ipset -R "
|
\fBipset\fP {\fB\-A\fP|\fB\-D\fP|\fB\-T\fP} \fIset\fP \fIentry\fP
|
||||||
.br
|
.PP
|
||||||
.BR "ipset -[Vv] "
|
\fBipset \-R\fP
|
||||||
|
.PP
|
||||||
|
\fBipset\fP {\fB-V\fP|\fB\-v\fP}
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.B ipset
|
.B ipset
|
||||||
is used to set up, maintain and inspect so called IP sets in the Linux
|
is used to set up, maintain and inspect so called IP sets in the Linux
|
||||||
@@ -53,41 +55,41 @@ need to use only enough letters to ensure that
|
|||||||
.B ipset
|
.B ipset
|
||||||
can differentiate it from all other options.
|
can differentiate it from all other options.
|
||||||
.TP
|
.TP
|
||||||
.BI "-N, --create " "\fIsetname\fP type type-specific-options"
|
\fB\-N\fP, \fB\-\-create\fP \fIsetname\fP \fItype\fP \fItype-specific-options\fP
|
||||||
Create a set identified with setname and specified type.
|
Create a set identified with setname and specified type.
|
||||||
Type-specific options must be supplied.
|
Type-specific options must be supplied.
|
||||||
.TP
|
.TP
|
||||||
.BI "-X, --destroy " "[\fIsetname\fP]"
|
\fB\-X\fP, \fB\-\-destroy\fP [\fIsetname\fP]
|
||||||
Destroy the specified set or all the sets if none is given.
|
Destroy the specified set or all the sets if none is given.
|
||||||
|
|
||||||
If the set has got references, nothing is done.
|
If the set has got references, nothing is done.
|
||||||
.TP
|
.TP
|
||||||
.BI "-F, --flush " "[\fIsetname\fP]"
|
\fB\-F\fP, \fB\-\-flush\fP [\fIsetname\fP]
|
||||||
Delete all entries from the specified set or flush
|
Delete all entries from the specified set or flush
|
||||||
all sets if none is given.
|
all sets if none is given.
|
||||||
.TP
|
.TP
|
||||||
.BI "-E, --rename " "\fIfrom-setname\fP \fIto-setname\fP"
|
\fB\-E\fP, \fB\-\-rename\fP \fIfrom-setname\fP \fIto-setname\fP
|
||||||
Rename a set. Set identified by to-setname must not exist.
|
Rename a set. Set identified by to-setname must not exist.
|
||||||
.TP
|
.TP
|
||||||
.BI "-W, --swap " "\fIfrom-setname\fP \fIto-setname\fP"
|
\fB\-W\fP, \fB\-\-swap\fP \fIfrom-setname\fP \fIto-setname\fP
|
||||||
Swap the content of two sets, or in another words,
|
Swap the content of two sets, or in another words,
|
||||||
exchange the name of two sets. The referred sets must exist and
|
exchange the name of two sets. The referred sets must exist and
|
||||||
identical type of sets can be swapped only.
|
identical type of sets can be swapped only.
|
||||||
.TP
|
.TP
|
||||||
.BI "-L, --list " "[\fIsetname\fP]"
|
\fB\-L\fP, \fB\-\-list\fP [\fIsetname\fP]
|
||||||
List the entries for the specified set, or for
|
List the entries for the specified set, or for
|
||||||
all sets if none is given. The
|
all sets if none is given. The
|
||||||
.B "-r, --resolve"
|
\fB\-r\fP/\fB\-\-resolve\fP
|
||||||
option can be used to force name lookups (which may be slow). When the
|
option can be used to force name lookups (which may be slow). When the
|
||||||
.B "-s, --sorted"
|
\fB\-s\fP/\fB\-\-sorted\fP
|
||||||
option is given, the entries are listed sorted (if the given set
|
option is given, the entries are listed sorted (if the given set
|
||||||
type supports the operation).
|
type supports the operation).
|
||||||
.TP
|
.TP
|
||||||
.BI "-S, --save " "[\fIsetname\fP]"
|
\fB\-S\fP, \fB\-\-save\fP [\fIsetname\fP]
|
||||||
Save the given set, or all sets if none is given
|
Save the given set, or all sets if none is given
|
||||||
to stdout in a format that --restore can read.
|
to stdout in a format that --restore can read.
|
||||||
.TP
|
.TP
|
||||||
.BI "-R, --restore "
|
\fB\-R\fP, \fB\-\-restore\fP
|
||||||
Restore a saved session generated by --save. The saved session
|
Restore a saved session generated by --save. The saved session
|
||||||
can be fed from stdin.
|
can be fed from stdin.
|
||||||
|
|
||||||
@@ -97,27 +99,27 @@ the set, then add all elements. Then create the next set, add all its elements
|
|||||||
and so on. Also, it is a restore operation, so the sets being restored must
|
and so on. Also, it is a restore operation, so the sets being restored must
|
||||||
not exist.
|
not exist.
|
||||||
.TP
|
.TP
|
||||||
.BI "-A, --add " "\fIsetname\fP \fIIP\fP"
|
\fB\-A\fP, \fB\-\-add\fP \fIsetname\fP \fIIP\fP
|
||||||
Add an IP entry to a set.
|
Add an IP entry to a set.
|
||||||
.TP
|
.TP
|
||||||
.BI "-D, --del " "\fIsetname\fP \fIIP\fP"
|
\fB\-D\fP, \fB\-\-del\fP \fIsetname\fP \fIIP\fP
|
||||||
Delete an IP entry from a set.
|
Delete an IP entry from a set.
|
||||||
.TP
|
.TP
|
||||||
.BI "-T, --test " "\fIsetname\fP \fIIP\fP
|
\fB-T\fP, \fB\-\-test\fP \fIsetname\fP \fIIP\fP
|
||||||
Test wether an IP entry is in a set or not. Exit status number is zero
|
Test wether an IP entry is in a set or not. Exit status number is zero
|
||||||
if the tested IP is in the set and nonzero if it is missing from
|
if the tested IP is in the set and nonzero if it is missing from
|
||||||
the set.
|
the set.
|
||||||
.TP
|
.TP
|
||||||
.BI "-H, --help " "[settype]"
|
\fB\-H\fP, \fB\-\-help\fP [\fIsettype\fP]
|
||||||
Print help and settype specific help if settype specified.
|
Print help and settype specific help if settype specified.
|
||||||
.TP
|
.TP
|
||||||
.BI "-V, -v, --version "
|
\fB\-V\fP, \fB\-v\fP, \fB\-\-version\fP
|
||||||
Print program version and protocol version.
|
Print program version and protocol version.
|
||||||
.P
|
.P
|
||||||
.SS "OTHER OPTIONS"
|
.SS "OTHER OPTIONS"
|
||||||
The following additional options can be specified:
|
The following additional options can be specified:
|
||||||
.TP
|
.TP
|
||||||
.B "-r, --resolve"
|
\fB\-r\fP, \fB\-\-resolve\fP
|
||||||
When listing sets, enforce name lookup. The
|
When listing sets, enforce name lookup. The
|
||||||
program will try to display the IP entries resolved to
|
program will try to display the IP entries resolved to
|
||||||
host names or services (whenever applicable), which can trigger
|
host names or services (whenever applicable), which can trigger
|
||||||
@@ -126,14 +128,14 @@ slow
|
|||||||
DNS
|
DNS
|
||||||
lookups.
|
lookups.
|
||||||
.TP
|
.TP
|
||||||
.B "-s, --sorted"
|
\fB\-s\fP, \fB\-\-sorted\fP
|
||||||
Sorted output. When listing sets, entries are listed sorted.
|
Sorted output. When listing sets, entries are listed sorted.
|
||||||
.TP
|
.TP
|
||||||
.B "-n, --numeric"
|
\fB\-n\fP, \fB\-\-numeric\fP
|
||||||
Numeric output. When listing sets, IP addresses and
|
Numeric output. When listing sets, IP addresses and
|
||||||
port numbers will be printed in numeric format. This is the default.
|
port numbers will be printed in numeric format. This is the default.
|
||||||
.TP
|
.TP
|
||||||
.B "-q, --quiet"
|
\fB\-q\fP, \fB\-\-quiet\fP
|
||||||
Suppress any output to stdout and stderr. ipset will still return
|
Suppress any output to stdout and stderr. ipset will still return
|
||||||
possible errors.
|
possible errors.
|
||||||
.SH SET TYPES
|
.SH SET TYPES
|
||||||
@@ -151,20 +153,20 @@ by masking the address with the specified netmask, can be found in the set.
|
|||||||
.P
|
.P
|
||||||
Options to use when creating an ipmap set:
|
Options to use when creating an ipmap set:
|
||||||
.TP
|
.TP
|
||||||
.BR "--from " from-IP
|
\fB\-\-from\fP \fIfrom-ip\fP
|
||||||
.TP
|
.TP
|
||||||
.BR "--to " to-IP
|
\fB\-\-to\fP \fIto-ip\fP
|
||||||
Create an ipmap set from the specified range.
|
Create an ipmap set from the specified range.
|
||||||
.TP
|
.TP
|
||||||
.BR "--network " IP/mask
|
\fB\-\-network\fP \fIip\fP\fB/\fP\fImask\fP
|
||||||
Create an ipmap set from the specified network.
|
Create an ipmap set from the specified network.
|
||||||
.TP
|
.TP
|
||||||
.BR "--netmask " CIDR-netmask
|
\fB\-\-netmask\fP \fIcidr-netmask\fP
|
||||||
When the optional
|
When the optional
|
||||||
.B "--netmask"
|
.B "--netmask"
|
||||||
parameter specified, network addresses will be
|
parameter specified, network addresses will be
|
||||||
stored in the set instead of IP addresses, and the from-IP parameter
|
stored in the set instead of IP addresses, and the \fIfrom-ip\fP parameter
|
||||||
must be a network address. The CIDR-netmask value must be between 1-31.
|
must be a network address. The \fIcidr-netmask\fP value must be between 1-31.
|
||||||
.PP
|
.PP
|
||||||
Example:
|
Example:
|
||||||
.IP
|
.IP
|
||||||
@@ -174,19 +176,19 @@ The macipmap set type uses a memory range, where each 8 bytes
|
|||||||
represents one IP and a MAC addresses. A macipmap set type can store
|
represents one IP and a MAC addresses. A macipmap set type can store
|
||||||
up to 65536 (B-class network) IP addresses with MAC.
|
up to 65536 (B-class network) IP addresses with MAC.
|
||||||
When adding an entry to a macipmap set, you must specify the entry as
|
When adding an entry to a macipmap set, you must specify the entry as
|
||||||
.I IP,MAC.
|
"\fIip\fP\fB,\fP\fImac\fP".
|
||||||
When deleting or testing macipmap entries, the
|
When deleting or testing macipmap entries, the
|
||||||
.I ,MAC
|
"\fB,\fP\fImac\fP"
|
||||||
part is not mandatory.
|
part is not mandatory.
|
||||||
.P
|
.P
|
||||||
Options to use when creating an macipmap set:
|
Options to use when creating an macipmap set:
|
||||||
.TP
|
.TP
|
||||||
.BR "--from " from-IP
|
\fB\-\-from\fP \fIfrom-ip\fP
|
||||||
.TP
|
.TP
|
||||||
.BR "--to " to-IP
|
\fB\-\-to\fP \fIto-ip\fP
|
||||||
Create a macipmap set from the specified range.
|
Create a macipmap set from the specified range.
|
||||||
.TP
|
.TP
|
||||||
.BR "--network " IP/mask
|
\fB\-\-network\fP \fIip\fP\fB/\fP\fImask\fP
|
||||||
Create a macipmap set from the specified network.
|
Create a macipmap set from the specified network.
|
||||||
.TP
|
.TP
|
||||||
.BR "--matchunset"
|
.BR "--matchunset"
|
||||||
@@ -196,11 +198,9 @@ parameter specified, IP addresses which could be stored
|
|||||||
in the set but not set yet, will always match.
|
in the set but not set yet, will always match.
|
||||||
.P
|
.P
|
||||||
Please note, the
|
Please note, the
|
||||||
.I
|
"set"
|
||||||
set
|
|
||||||
and
|
and
|
||||||
.I
|
"SET"
|
||||||
SET
|
|
||||||
netfilter kernel modules
|
netfilter kernel modules
|
||||||
.B
|
.B
|
||||||
always
|
always
|
||||||
@@ -213,9 +213,9 @@ The portmap set type is very fast and memory cheap.
|
|||||||
.P
|
.P
|
||||||
Options to use when creating an portmap set:
|
Options to use when creating an portmap set:
|
||||||
.TP
|
.TP
|
||||||
.BR "--from " from-port
|
\fB\-\-from\fP \fIfrom-port\fP
|
||||||
.TP
|
.TP
|
||||||
.BR "--to " to-port
|
\fB\-\-to\fP \fIto-port\fP
|
||||||
Create a portmap set from the specified range.
|
Create a portmap set from the specified range.
|
||||||
.SS iphash
|
.SS iphash
|
||||||
The iphash set type uses a hash to store IP addresses.
|
The iphash set type uses a hash to store IP addresses.
|
||||||
@@ -230,25 +230,24 @@ by masking the address with the specified netmask, can be found in the set.
|
|||||||
.P
|
.P
|
||||||
Options to use when creating an iphash set:
|
Options to use when creating an iphash set:
|
||||||
.TP
|
.TP
|
||||||
.BR "--hashsize " hashsize
|
\fB\-\-hashsize\fP \fIhashsize\fP
|
||||||
The initial hash size (default 1024)
|
The initial hash size (default 1024)
|
||||||
.TP
|
.TP
|
||||||
.BR "--probes " probes
|
\fB\-\-probes\fP \fIprobes\fP
|
||||||
How many times try to resolve clashing at adding an IP to the hash
|
How many times try to resolve clashing at adding an IP to the hash
|
||||||
by double-hashing (default 8).
|
by double-hashing (default 8).
|
||||||
.TP
|
.TP
|
||||||
.BR "--resize " percent
|
\fB\-\-resize\fP \fIpercent\fP
|
||||||
Increase the hash size by this many percent (default 50) when adding
|
Increase the hash size by this many percent (default 50) when adding
|
||||||
an IP to the hash could not be performed after
|
an IP to the hash could not be performed after
|
||||||
.B
|
\fIprobes\fP
|
||||||
probes
|
|
||||||
number of double-hashing.
|
number of double-hashing.
|
||||||
.TP
|
.TP
|
||||||
.BR "--netmask " CIDR-netmask
|
\fB\-\-netmask\fP \fIcidr-netmask\fP
|
||||||
When the optional
|
When the optional
|
||||||
.B "--netmask"
|
.B "--netmask"
|
||||||
parameter specified, network addresses will be
|
parameter specified, network addresses will be
|
||||||
stored in the set instead of IP addresses. The CIDR-netmask value must
|
stored in the set instead of IP addresses. The \fIcidr-netmask\fP value must
|
||||||
be between 1-31.
|
be between 1-31.
|
||||||
.P
|
.P
|
||||||
The iphash type of sets can store up to 65536 entries. If a set is full,
|
The iphash type of sets can store up to 65536 entries. If a set is full,
|
||||||
@@ -257,11 +256,9 @@ no new entries can be added to it.
|
|||||||
Sets created by zero valued resize parameter won't be resized at all.
|
Sets created by zero valued resize parameter won't be resized at all.
|
||||||
The lookup time in an iphash type of set grows approximately linearly with
|
The lookup time in an iphash type of set grows approximately linearly with
|
||||||
the value of the
|
the value of the
|
||||||
.B
|
\fIprobes\fP
|
||||||
probes
|
|
||||||
parameter. In general higher
|
parameter. In general higher
|
||||||
.B
|
\fIprobes\fP
|
||||||
probe
|
|
||||||
value results better utilized hash while smaller value
|
value results better utilized hash while smaller value
|
||||||
produces larger, sparser hash.
|
produces larger, sparser hash.
|
||||||
.PP
|
.PP
|
||||||
@@ -274,22 +271,21 @@ network addresses. The
|
|||||||
.I
|
.I
|
||||||
IP
|
IP
|
||||||
"address" used in the ipset commands must be in the form
|
"address" used in the ipset commands must be in the form
|
||||||
.I
|
"\fIip-address\fP\fB/\fP\fIcidr-size\fP"
|
||||||
IP-address/cidr-size
|
|
||||||
where the CIDR block size must be in the inclusive range of 1-31.
|
where the CIDR block size must be in the inclusive range of 1-31.
|
||||||
In order to avoid clashes in the hash
|
In order to avoid clashes in the hash
|
||||||
double-hashing, and as a last resort, dynamic growing of the hash performed.
|
double-hashing, and as a last resort, dynamic growing of the hash performed.
|
||||||
.P
|
.P
|
||||||
Options to use when creating an nethash set:
|
Options to use when creating an nethash set:
|
||||||
.TP
|
.TP
|
||||||
.BR "--hashsize " hashsize
|
\fB\-\-hashsize\fP \fIhashsize\fP
|
||||||
The initial hash size (default 1024)
|
The initial hash size (default 1024)
|
||||||
.TP
|
.TP
|
||||||
.BR "--probes " probes
|
\fB\-\-probes\fP \fIprobes\fP
|
||||||
How many times try to resolve clashing at adding an IP to the hash
|
How many times try to resolve clashing at adding an IP to the hash
|
||||||
by double-hashing (default 4).
|
by double-hashing (default 4).
|
||||||
.TP
|
.TP
|
||||||
.BR "--resize " percent
|
\fB\-\-resize\fP \fIpercent\fP
|
||||||
Increase the hash size by this many percent (default 50) when adding
|
Increase the hash size by this many percent (default 50) when adding
|
||||||
an IP to the hash could not be performed after
|
an IP to the hash could not be performed after
|
||||||
.P
|
.P
|
||||||
@@ -301,15 +297,13 @@ netblocks added to the set. The matching always start from the smallest
|
|||||||
size of netblock (most specific netmask) to the largest ones (least
|
size of netblock (most specific netmask) to the largest ones (least
|
||||||
specific netmasks). When adding/deleting IP addresses
|
specific netmasks). When adding/deleting IP addresses
|
||||||
to a nethash set by the
|
to a nethash set by the
|
||||||
.I
|
"SET"
|
||||||
SET
|
|
||||||
netfilter kernel module, it will be added/deleted by the smallest
|
netfilter kernel module, it will be added/deleted by the smallest
|
||||||
netblock size which can be found in the set, or by /31 if the set is empty.
|
netblock size which can be found in the set, or by /31 if the set is empty.
|
||||||
.P
|
.P
|
||||||
The lookup time in a nethash type of set grows approximately linearly
|
The lookup time in a nethash type of set grows approximately linearly
|
||||||
with the times of the
|
with the times of the
|
||||||
.B
|
\fIprobes\fP
|
||||||
probes
|
|
||||||
parameter and the number of different mask parameters in the hash.
|
parameter and the number of different mask parameters in the hash.
|
||||||
Otherwise the same speed and memory efficiency comments applies here
|
Otherwise the same speed and memory efficiency comments applies here
|
||||||
as at the iphash type.
|
as at the iphash type.
|
||||||
@@ -320,39 +314,35 @@ resort, dynamic growing of the hash performed. An ipporthash set can
|
|||||||
store up to 65536 (B-class network) IP addresses with all possible port
|
store up to 65536 (B-class network) IP addresses with all possible port
|
||||||
values. When adding, deleting and testing values in an ipporthash type of
|
values. When adding, deleting and testing values in an ipporthash type of
|
||||||
set, the entries must be specified as
|
set, the entries must be specified as
|
||||||
.B
|
"\fIip\fP\fB,\fP\fIport\fP".
|
||||||
"IP,port".
|
|
||||||
.P
|
.P
|
||||||
The ipporthash types of sets evaluates two src/dst parameters of the
|
The ipporthash types of sets evaluates two src/dst parameters of the
|
||||||
.I
|
"set"
|
||||||
set
|
|
||||||
match and
|
match and
|
||||||
.I
|
"SET"
|
||||||
SET
|
|
||||||
target.
|
target.
|
||||||
.P
|
.P
|
||||||
Options to use when creating an ipporthash set:
|
Options to use when creating an ipporthash set:
|
||||||
.TP
|
.TP
|
||||||
.BR "--from " from-IP
|
\fB\-\-from\fP \fIfrom-ip\fP
|
||||||
.TP
|
.TP
|
||||||
.BR "--to " to-IP
|
\fB\-\-to\fP \fIto-ip\fP
|
||||||
Create an ipporthash set from the specified range.
|
Create an ipporthash set from the specified range.
|
||||||
.TP
|
.TP
|
||||||
.BR "--network " IP/mask
|
\fB\-\-network\fP \fIip\fP\fB/\fP\fImask\fP
|
||||||
Create an ipporthash set from the specified network.
|
Create an ipporthash set from the specified network.
|
||||||
.TP
|
.TP
|
||||||
.BR "--hashsize " hashsize
|
\fB\-\-hashsize\fP \fIhashsize\fP
|
||||||
The initial hash size (default 1024)
|
The initial hash size (default 1024)
|
||||||
.TP
|
.TP
|
||||||
.BR "--probes " probes
|
\fB\-\-probes\fP \fIprobes\fP
|
||||||
How many times try to resolve clashing at adding an IP to the hash
|
How many times try to resolve clashing at adding an IP to the hash
|
||||||
by double-hashing (default 8).
|
by double-hashing (default 8).
|
||||||
.TP
|
.TP
|
||||||
.BR "--resize " percent
|
\fB\-\-resize\fP \fIpercent\fP
|
||||||
Increase the hash size by this many percent (default 50) when adding
|
Increase the hash size by this many percent (default 50) when adding
|
||||||
an IP to the hash could not be performed after
|
an IP to the hash could not be performed after
|
||||||
.B
|
\fIprobes\fP
|
||||||
probes
|
|
||||||
number of double-hashing.
|
number of double-hashing.
|
||||||
.P
|
.P
|
||||||
The same resizing, speed and memory efficiency comments applies here
|
The same resizing, speed and memory efficiency comments applies here
|
||||||
@@ -363,39 +353,35 @@ address triples. The first IP address must come form a maximum /16
|
|||||||
sized network or range while the port number and the second IP address
|
sized network or range while the port number and the second IP address
|
||||||
parameters are arbitrary. When adding, deleting and testing values in an
|
parameters are arbitrary. When adding, deleting and testing values in an
|
||||||
ipportiphash type of set, the entries must be specified as
|
ipportiphash type of set, the entries must be specified as
|
||||||
.B
|
"\fIip\fP\fB,\fP\fIport\fP\fB,\fP\fIip\fP".
|
||||||
"IP,port,IP".
|
|
||||||
.P
|
.P
|
||||||
The ipportiphash types of sets evaluates three src/dst parameters of the
|
The ipportiphash types of sets evaluates three src/dst parameters of the
|
||||||
.I
|
"set"
|
||||||
set
|
|
||||||
match and
|
match and
|
||||||
.I
|
"SET"
|
||||||
SET
|
|
||||||
target.
|
target.
|
||||||
.P
|
.P
|
||||||
Options to use when creating an ipportiphash set:
|
Options to use when creating an ipportiphash set:
|
||||||
.TP
|
.TP
|
||||||
.BR "--from " from-IP
|
\fB\-\-from\fP \fIfrom-ip\fP
|
||||||
.TP
|
.TP
|
||||||
.BR "--to " to-IP
|
\fB\-\-to\fP \fIto-ip\fP
|
||||||
Create an ipportiphash set from the specified range.
|
Create an ipportiphash set from the specified range.
|
||||||
.TP
|
.TP
|
||||||
.BR "--network " IP/mask
|
\fB\-\-network\fP \fIip\fP\fB/\fP\fImask\fP
|
||||||
Create an ipportiphash set from the specified network.
|
Create an ipportiphash set from the specified network.
|
||||||
.TP
|
.TP
|
||||||
.BR "--hashsize " hashsize
|
\fB\-\-hashsize\fP \fIhashsize\fP
|
||||||
The initial hash size (default 1024)
|
The initial hash size (default 1024)
|
||||||
.TP
|
.TP
|
||||||
.BR "--probes " probes
|
\fB\-\-probes\fP \fIprobes\fP
|
||||||
How many times try to resolve clashing at adding an IP to the hash
|
How many times try to resolve clashing at adding an IP to the hash
|
||||||
by double-hashing (default 8).
|
by double-hashing (default 8).
|
||||||
.TP
|
.TP
|
||||||
.BR "--resize " percent
|
\fB\-\-resize\fP \fIpercent\fP
|
||||||
Increase the hash size by this many percent (default 50) when adding
|
Increase the hash size by this many percent (default 50) when adding
|
||||||
an IP to the hash could not be performed after
|
an IP to the hash could not be performed after
|
||||||
.B
|
\fIprobes\fP
|
||||||
probes
|
|
||||||
number of double-hashing.
|
number of double-hashing.
|
||||||
.P
|
.P
|
||||||
The same resizing, speed and memory efficiency comments applies here
|
The same resizing, speed and memory efficiency comments applies here
|
||||||
@@ -408,39 +394,35 @@ parameters are arbitrary, but the size of the network address must be
|
|||||||
between /1-/31. When adding, deleting
|
between /1-/31. When adding, deleting
|
||||||
and testing values in an ipportnethash type of set, the entries must be
|
and testing values in an ipportnethash type of set, the entries must be
|
||||||
specified as
|
specified as
|
||||||
.B
|
"\fIip\fP\fB,\fP\fIip\fP\fB/\fP\fIcidr-size\fP".
|
||||||
"IP,port,IP/cidr-size".
|
|
||||||
.P
|
.P
|
||||||
The ipportnethash types of sets evaluates three src/dst parameters of the
|
The ipportnethash types of sets evaluates three src/dst parameters of the
|
||||||
.I
|
"set"
|
||||||
set
|
|
||||||
match and
|
match and
|
||||||
.I
|
"SET"
|
||||||
SET
|
|
||||||
target.
|
target.
|
||||||
.P
|
.P
|
||||||
Options to use when creating an ipportnethash set:
|
Options to use when creating an ipportnethash set:
|
||||||
.TP
|
.TP
|
||||||
.BR "--from " from-IP
|
\fB\-\-from\fP \fIfrom-ip\fP
|
||||||
.TP
|
.TP
|
||||||
.BR "--to " to-IP
|
\fB\-\-to\fP \fIto-ip\fP
|
||||||
Create an ipporthash set from the specified range.
|
Create an ipporthash set from the specified range.
|
||||||
.TP
|
.TP
|
||||||
.BR "--network " IP/mask
|
\fB\-\-network\fP \fIip\fP\fB/\fP\fImask\fP
|
||||||
Create an ipporthash set from the specified network.
|
Create an ipporthash set from the specified network.
|
||||||
.TP
|
.TP
|
||||||
.BR "--hashsize " hashsize
|
\fB\-\-hashsize\fP \fIhashsize\fP
|
||||||
The initial hash size (default 1024)
|
The initial hash size (default 1024)
|
||||||
.TP
|
.TP
|
||||||
.BR "--probes " probes
|
\fB\-\-probes\fP \fIprobes\fP
|
||||||
How many times try to resolve clashing at adding an IP to the hash
|
How many times try to resolve clashing at adding an IP to the hash
|
||||||
by double-hashing (default 8).
|
by double-hashing (default 8).
|
||||||
.TP
|
.TP
|
||||||
.BR "--resize " percent
|
\fB\-\-resize\fP \fIpercent\fP
|
||||||
Increase the hash size by this many percent (default 50) when adding
|
Increase the hash size by this many percent (default 50) when adding
|
||||||
an IP to the hash could not be performed after
|
an IP to the hash could not be performed after
|
||||||
.B
|
\fIprobes\fP
|
||||||
probes
|
|
||||||
number of double-hashing.
|
number of double-hashing.
|
||||||
.P
|
.P
|
||||||
The same resizing, speed and memory efficiency comments applies here
|
The same resizing, speed and memory efficiency comments applies here
|
||||||
@@ -451,14 +433,14 @@ with timeout values.
|
|||||||
.P
|
.P
|
||||||
Options to use when creating an iptree set:
|
Options to use when creating an iptree set:
|
||||||
.TP
|
.TP
|
||||||
.BR "--timeout " value
|
\fB\-\-timeout\fP \fIvalue\fP
|
||||||
The timeout value for the entries in seconds (default 0)
|
The timeout value for the entries in seconds (default 0)
|
||||||
.P
|
.P
|
||||||
If a set was created with a nonzero valued
|
If a set was created with a nonzero valued
|
||||||
.B "--timeout"
|
.B "--timeout"
|
||||||
parameter then one may add IP addresses to the set with a specific
|
parameter then one may add IP addresses to the set with a specific
|
||||||
timeout value using the syntax
|
timeout value using the syntax
|
||||||
.I IP,timeout-value.
|
"\fIip\fP\fB,\fP\fItimeout-value\fP".
|
||||||
Similarly to the hash types, the iptree type of sets can store up to 65536
|
Similarly to the hash types, the iptree type of sets can store up to 65536
|
||||||
entries.
|
entries.
|
||||||
.SS iptreemap
|
.SS iptreemap
|
||||||
@@ -466,37 +448,32 @@ The iptreemap set type uses a tree to store IP addresses or networks,
|
|||||||
where the last octet of an IP address are stored in a bitmap.
|
where the last octet of an IP address are stored in a bitmap.
|
||||||
As input entry, you can add IP addresses, CIDR blocks or network ranges
|
As input entry, you can add IP addresses, CIDR blocks or network ranges
|
||||||
to the set. Network ranges can be specified in the format
|
to the set. Network ranges can be specified in the format
|
||||||
.I IP1-IP2
|
"\fIip1\fP\fB-\fP\fIip2\fP".
|
||||||
.P
|
.P
|
||||||
Options to use when creating an iptreemap set:
|
Options to use when creating an iptreemap set:
|
||||||
.TP
|
.TP
|
||||||
.BR "--gc " value
|
\fB\-\-gc\fP \fIvalue\fP
|
||||||
How often the garbage collection should be called, in seconds (default 300)
|
How often the garbage collection should be called, in seconds (default 300)
|
||||||
.SS setlist
|
.SS setlist
|
||||||
The setlist type uses a simple list in which you can store sets. By the
|
The setlist type uses a simple list in which you can store sets. By the
|
||||||
.I
|
|
||||||
ipset
|
ipset
|
||||||
command you can add, delete and test sets in a setlist type of set.
|
command you can add, delete and test sets in a setlist type of set.
|
||||||
You can specify the sets as
|
You can specify the sets as
|
||||||
.B
|
"\fIsetname\fP[\fB,\fP{\fBafter\fP|\fBbefore\fP},\fIsetname\fP]".
|
||||||
"setname[,after|before,setname]".
|
|
||||||
By default new sets are added after (appended to) the existing
|
By default new sets are added after (appended to) the existing
|
||||||
elements. Setlist type of sets cannot be added to a setlist type of set.
|
elements. Setlist type of sets cannot be added to a setlist type of set.
|
||||||
.P
|
.P
|
||||||
Options to use when creating a setlist type of set:
|
Options to use when creating a setlist type of set:
|
||||||
.TP
|
.TP
|
||||||
.BR "--size " size
|
\fB\-\-size\fP \fIsize\fP
|
||||||
Create a setlist type of set with the given size (default 8).
|
Create a setlist type of set with the given size (default 8).
|
||||||
.PP
|
.PP
|
||||||
By the
|
By the
|
||||||
.I
|
"set"
|
||||||
set
|
|
||||||
match or
|
match or
|
||||||
.I
|
"SET"
|
||||||
SET
|
|
||||||
target of
|
target of
|
||||||
.I
|
\fBiptables\fP(8)
|
||||||
iptables
|
|
||||||
you can test, add or delete entries in the sets. The match
|
you can test, add or delete entries in the sets. The match
|
||||||
will try to find a matching IP address/port in the sets and
|
will try to find a matching IP address/port in the sets and
|
||||||
the target will try to add the IP address/port to the first set
|
the target will try to add the IP address/port to the first set
|
||||||
@@ -524,7 +501,7 @@ data storage in
|
|||||||
.I a
|
.I a
|
||||||
set and add src to the first single or src,dst to the first double
|
set and add src to the first single or src,dst to the first double
|
||||||
data storage set in
|
data storage set in
|
||||||
.I b.
|
\fIb\fP.
|
||||||
.P
|
.P
|
||||||
You can imagine a setlist type of set as an ordered union of
|
You can imagine a setlist type of set as an ordered union of
|
||||||
the set elements.
|
the set elements.
|
||||||
|
Reference in New Issue
Block a user