Blame bootstrap_ver/extensions/libxt_rpfilter.man

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