Blame extensions/libxt_rpfilter.man

Packit 7b22a4
Performs a reverse path filter test on a packet.
Packit 7b22a4
If a reply to the packet would be sent via the same interface
Packit 7b22a4
that the packet arrived on, the packet will match.
Packit 7b22a4
Note that, unlike the in-kernel rp_filter, packets protected
Packit 7b22a4
by IPSec are not treated specially.  Combine this match with
Packit 7b22a4
the policy match if you want this.
Packit 7b22a4
Also, packets arriving via the loopback interface are always permitted.
Packit 7b22a4
This match can only be used in the PREROUTING chain of the raw or mangle table.
Packit 7b22a4
.TP
Packit 7b22a4
\fB\-\-loose\fP
Packit 7b22a4
Used to specify that the reverse path filter test should match
Packit 7b22a4
even if the selected output device is not the expected one.
Packit 7b22a4
.TP
Packit 7b22a4
\fB\-\-validmark\fP
Packit 7b22a4
Also use the packets' nfmark value when performing the reverse path route lookup.
Packit 7b22a4
.TP
Packit 7b22a4
\fB\-\-accept\-local\fP
Packit 7b22a4
This will permit packets arriving from the network with a source address that is also
Packit 7b22a4
assigned to the local machine.
Packit 7b22a4
.TP
Packit 7b22a4
\fB\-\-invert\fP
Packit 7b22a4
This will invert the sense of the match.  Instead of matching packets that passed the
Packit 7b22a4
reverse path filter test, match those that have failed it.
Packit 7b22a4
.PP
Packit 7b22a4
Example to log and drop packets failing the reverse path filter test:
Packit 7b22a4
Packit 7b22a4
iptables \-t raw \-N RPFILTER
Packit 7b22a4
Packit 7b22a4
iptables \-t raw \-A RPFILTER \-m rpfilter \-j RETURN
Packit 7b22a4
Packit 7b22a4
iptables \-t raw \-A RPFILTER \-m limit \-\-limit 10/minute \-j NFLOG \-\-nflog\-prefix "rpfilter drop"
Packit 7b22a4
Packit 7b22a4
iptables \-t raw \-A RPFILTER \-j DROP
Packit 7b22a4
Packit 7b22a4
iptables \-t raw \-A PREROUTING \-j RPFILTER
Packit 7b22a4
Packit 7b22a4
Example to drop failed packets, without logging:
Packit 7b22a4
Packit 7b22a4
iptables \-t raw \-A RPFILTER \-m rpfilter \-\-invert \-j DROP