diff options
author | Elise Lennion <elise.lennion@gmail.com> | 2017-02-27 14:43:08 -0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-02-28 12:20:09 +0100 |
commit | eb66632d219a45497e7348918984e8cea6acdca2 (patch) | |
tree | 77946abdc998c40fc8f765a33805af848ed1b5ec /extensions/libip6t_hl.t | |
parent | 72bb3dbf0ecdf3ec96aee80e5d152c8be4394da1 (diff) |
extensions: libxt_hashlimit: Add translation to nft
Hashlimit has similar functionality to flow tables in nftables. Some
usage examples are:
$ iptables-translate -A OUTPUT -m tcp -p tcp --dport 443 -m hashlimit \
--hashlimit-above 20kb/s --hashlimit-burst 1mb --hashlimit-mode dstip \
--hashlimit-name https --hashlimit-dstmask 24 -m state --state NEW \
-j DROP
nft add rule ip filter OUTPUT tcp dport 443 flow table https { ip \
daddr and 255.255.255.0 timeout 60s limit rate over 20 kbytes/second \
burst 1 mbytes} ct state new counter drop
$ iptables-translate -A OUTPUT -m tcp -p tcp --dport 443 -m hashlimit \
--hashlimit-upto 300 --hashlimit-burst 15 --hashlimit-mode \
srcip,dstip --hashlimit-name https --hashlimit-htable-expire 300000 \
-m state --state NEW -j DROP
nft add rule ip filter OUTPUT tcp dport 443 flow table https { ip \
daddr . ip saddr timeout 300s limit rate 300/second burst 15 packets} \
ct state new counter drop
The translation isn't supported when --hashlimit-mode isn't specified.
Also, the following options don't apply to flow tables:
--hashlimit-htable-size
--hashlimit-htable-max
--hashlimit-htable-gcinterval
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'extensions/libip6t_hl.t')
0 files changed, 0 insertions, 0 deletions