| 1 | #!/bin/bash |
| 2 | |
| 3 | $NFT add table t || exit 1 |
| 4 | $NFT add chain t c || exit 1 |
| 5 | $NFT add rule t c 'iif != lo ip daddr 127.0.0.1/8 counter limit rate 1/second log flags all prefix "nft_lo4 " drop' || exit 1 |
| 6 | $NFT add rule t c 'iif != lo ip daddr 127.0.0.1/8 counter limit rate 1/second log flags all level debug drop' || exit 1 |
| 7 | $NFT delete table t || exit 1 |
| 8 | |
| 9 | exit 0 |
| 10 |