Blame bootstrap_ver/extensions/libxt_rpfilter.man

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