File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,9 @@ defaults_nftables:
38
38
purge_orphaned : true # purge all unmanaged files from /etc/nftables.d/
39
39
40
40
log_drop_prefix : ' NFTables DROP'
41
+ log_drop_limit : # anti DDOS
42
+ enable : false
43
+ count : 100
41
44
log_group : ' ' # set to '0' for container workaround => send logs to local ulogd2 daemon
42
45
ext : ' nft' # extension used for nftables config-files
43
46
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ table {{ nft_table.type }} {{ nft_table_name }} {
28
28
counter comment "COUNT {{ nft_table_name }}-{{ chain_name }}{% if chain_main %} -{{ chain.policy }}{% endif %} "
29
29
{% endif %}
30
30
{% if chain_main and chain .log .drop and chain .policy == 'drop' %}
31
- log prefix "{{ NFT_CONFIG.log_drop_prefix }} {{ nft_table_name }}-{% if chain .log .prefix %} {{ chain.log.prefix }}{% else %} {{ chain_name }}{% endif %} "
31
+ log prefix "{{ NFT_CONFIG.log_drop_prefix }} {{ nft_table_name }}-{% if chain .log .prefix %} {{ chain.log.prefix }}{% else %} {{ chain_name }}{% endif %} "{% if NFT_CONFIG . log_drop_limit . enable | bool %} limit rate {{ NFT_CONFIG.log_drop_limit.count }}/second {% endif + %}
32
32
{% endif %}
33
33
}
34
34
You can’t perform that action at this time.
0 commit comments