summaryrefslogtreecommitdiffstats
path: root/extensions/libxt_statistic.txlate
blob: 627120c598a60db3989a171a2ebb4aa4a492647f (plain)
1
2
3
4
5
6
7
8
iptables-translate -A OUTPUT -m statistic --mode nth --every 10 --packet 1
nft 'add rule ip filter OUTPUT numgen inc mod 10 1 counter'

iptables-translate -A OUTPUT -m statistic --mode nth ! --every 10 --packet 5
nft 'add rule ip filter OUTPUT numgen inc mod 10 != 5 counter'

iptables-translate -A OUTPUT -m statistic --mode random --probability 0.1
nft 'add rule ip filter OUTPUT meta random & 2147483647 < 214748365 counter'