.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.4.
.TH IPSETBUILD "1" "August 2021" "ipsetbuild 1.1.1+git20171111.6842a63-1~exp2" "User Commands"
.SH NAME
ipsetbuild \- utility of libcorkipset library
.SH SYNOPSIS
.B ipsetbuild
[\fI\,options\/\fR] \fI\,\/\fR...
.SH DESCRIPTION
Constructs a binary IP set file from a list of IP addresses and networks.
.SH OPTIONS
.IP
...
.IP
A list of text files that contain the IP addresses and networks to add
to the set. To read from stdin, use "\-" as the filename.
.HP
\fB\-\-output=\fR, \fB\-o\fR
.TP
Writes the binary IP set file to .
If this option isn't
.IP
given, then the binary set will be written to standard output.
.HP
\fB\-\-loose\-cidr\fR, \fB\-l\fR
.IP
Be more lenient about the address portion of any CIDR network blocks
found in the input file.
.HP
\fB\-\-verbose\fR, \fB\-v\fR
.IP
Show summary information about the IP set that's built, as well as
progress information about the files being read and written. If this
option is not given, the only output will be any error, alert, or
warning messages that occur.
.HP
\fB\-\-quiet\fR, \fB\-q\fR
.IP
Show only error message for malformed input. All warnings, alerts,
and summary information about the IP set is suppressed.
.HP
\fB\-\-help\fR
.IP
Display this help and exit.
.SS "Input format:"
.TP
Each input file must contain one IP address or network per line.
Lines
.TP
beginning with a "#" are considered comments and are ignored.
Each
.IP
IP address must have one of the following formats:
.IP
x.x.x.x
x.x.x.x/cidr
xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx
xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/cidr
.IP
The first two are for IPv4 addresses and networks; the second two for
IPv6 addresses and networks. For IPv6 addresses, you can use the "::"
shorthand notation to collapse consecutive "0" portions.
.IP
If an address contains a "/cidr" suffix, then the entire CIDR network
of addresses will be added to the set. You must ensure that the loworder bits of the address are set to 0; if not, we'll raise an error.
(If you pass in the "\-\-loose\-cidr" option, we won't perform this
sanity check.)
.IP
You can also prefix any input line with an exclamation point ("!").
This causes the given address or network to be REMOVED from the output
set. This notation can be useful to define a set that contains most of
the addresses in a large CIDR block, except for addresses at certain
"holes".
.IP
The order of the addresses and networks given to ipsetbuild does not
matter. If a particular address is added to the set more than once, or
removed from the set more than once, whether on its own or via a CIDR
network, then you will get a warning message. (You can silence these
warnings with the \fB\-\-quiet\fR option.) If an address is both added to and
removed from the set, then the removal takes precedence, regardless of
where the relevant lines appear in the input file.