Blame extensions/libxt_HMARK.man

Packit Service d1fe03
Like MARK, i.e. set the fwmark, but the mark is calculated from hashing
Packit Service d1fe03
packet selector at choice. You have also to specify the mark range and,
Packit Service d1fe03
optionally, the offset to start from. ICMP error messages are inspected
Packit Service d1fe03
and used to calculate the hashing.
Packit Service d1fe03
.PP
Packit Service d1fe03
Existing options are:
Packit Service d1fe03
.TP
Packit Service d1fe03
\fB\-\-hmark\-tuple\fP tuple\fI\fP
Packit Service d1fe03
Possible tuple members are:
Packit Service d1fe03
.B src
Packit Service d1fe03
meaning source address (IPv4, IPv6 address),
Packit Service d1fe03
.B dst
Packit Service d1fe03
meaning destination address (IPv4, IPv6 address),
Packit Service d1fe03
.B sport
Packit Service d1fe03
meaning source port (TCP, UDP, UDPlite, SCTP, DCCP),
Packit Service d1fe03
.B dport
Packit Service d1fe03
meaning destination port (TCP, UDP, UDPlite, SCTP, DCCP),
Packit Service d1fe03
.B spi
Packit Service d1fe03
meaning Security Parameter Index (AH, ESP), and
Packit Service d1fe03
.B ct
Packit Service d1fe03
meaning the usage of the conntrack tuple instead of the packet selectors.
Packit Service d1fe03
.TP
Packit Service d1fe03
\fB\-\-hmark\-mod\fP \fIvalue (must be > 0)\fP
Packit Service d1fe03
Modulus for hash calculation (to limit the range of possible marks)
Packit Service d1fe03
.TP
Packit Service d1fe03
\fB\-\-hmark\-offset\fP \fIvalue\fP
Packit Service d1fe03
Offset to start marks from.
Packit Service d1fe03
.TP
Packit Service d1fe03
For advanced usage, instead of using \-\-hmark\-tuple, you can specify custom
Packit Service d1fe03
prefixes and masks:
Packit Service d1fe03
.TP
Packit Service d1fe03
\fB\-\-hmark\-src\-prefix\fP \fIcidr\fP
Packit Service d1fe03
The source address mask in CIDR notation.
Packit Service d1fe03
.TP
Packit Service d1fe03
\fB\-\-hmark\-dst\-prefix\fP \fIcidr\fP
Packit Service d1fe03
The destination address mask in CIDR notation.
Packit Service d1fe03
.TP
Packit Service d1fe03
\fB\-\-hmark\-sport\-mask\fP \fIvalue\fP
Packit Service d1fe03
A 16 bit source port mask in hexadecimal.
Packit Service d1fe03
.TP
Packit Service d1fe03
\fB\-\-hmark\-dport\-mask\fP \fIvalue\fP
Packit Service d1fe03
A 16 bit destination port mask in hexadecimal.
Packit Service d1fe03
.TP
Packit Service d1fe03
\fB\-\-hmark\-spi\-mask\fP \fIvalue\fP
Packit Service d1fe03
A 32 bit field with spi mask.
Packit Service d1fe03
.TP
Packit Service d1fe03
\fB\-\-hmark\-proto\-mask\fP \fIvalue\fP
Packit Service d1fe03
An 8 bit field with layer 4 protocol number.
Packit Service d1fe03
.TP
Packit Service d1fe03
\fB\-\-hmark\-rnd\fP \fIvalue\fP
Packit Service d1fe03
A 32 bit random custom value to feed hash calculation.
Packit Service d1fe03
.PP
Packit Service d1fe03
\fIExamples:\fP
Packit Service d1fe03
.PP
Packit Service d1fe03
iptables \-t mangle \-A PREROUTING \-m conntrack \-\-ctstate NEW
Packit Service d1fe03
 \-j HMARK \-\-hmark-tuple ct,src,dst,proto \-\-hmark-offset 10000
Packit Service d1fe03
\-\-hmark\-mod 10 \-\-hmark\-rnd 0xfeedcafe
Packit Service d1fe03
.PP
Packit Service d1fe03
iptables \-t mangle \-A PREROUTING -j HMARK \-\-hmark\-offset 10000
Packit Service d1fe03
\-\-hmark-tuple src,dst,proto \-\-hmark-mod 10 \-\-hmark\-rnd 0xdeafbeef