You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
642 B
31 lines
642 B
#!/usr/sbin/nft -f
|
|
|
|
#flush table inet ip-counter
|
|
#delete table inet ip-counter
|
|
|
|
table inet ip-counter {
|
|
|
|
counter IPv6-In {
|
|
}
|
|
counter IPv6-Out {
|
|
}
|
|
counter IPv4-In {
|
|
}
|
|
counter IPv4-Out {
|
|
}
|
|
|
|
chain in {
|
|
type filter hook input priority filter; policy accept;
|
|
|
|
meta nfproto ipv4 iifname != lo counter name IPv4-In
|
|
meta nfproto ipv6 iifname != lo counter name IPv6-In
|
|
}
|
|
|
|
chain out {
|
|
type filter hook output priority filter; policy accept;
|
|
|
|
meta nfproto ipv4 iifname != lo counter name IPv4-Out
|
|
meta nfproto ipv6 iifname != lo counter name IPv6-Out
|
|
}
|
|
|
|
}
|
|
|