blob: 23bc0b02b8e8a810f0ea847ff6a3404258b31b2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/bash
# This is the testscase:
# * creating valid named limits
# * referencing them from a valid rule
RULESET="
table ip filter {
limit http-traffic {
rate 1/second
}
chain input {
type filter hook input priority 0; policy accept;
limit name tcp dport map { 80 : "http-traffic", 443 : "http-traffic"}
}
}"
set -e
$NFT -f - <<< $RULESET
|