diff options
| author | 2026-11-11 05:31:06 +0000 | |
|---|---|---|
| committer | 2026-11-11 06:14:42 +0000 | |
| commit | 9e1d304cac5367c3dbb1ca14700736680bd3a804 (patch) | |
| tree | 31f328747acb934d365d423adfda144818ff5ad4 /04 | |
| download | lab-01-05-9e1d304cac5367c3dbb1ca14700736680bd3a804.tar.gz | |
Diffstat (limited to '04')
| -rwxr-xr-x | 04/nftables.conf | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/04/nftables.conf b/04/nftables.conf new file mode 100755 index 0000000..04c30b6 --- /dev/null +++ b/04/nftables.conf | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | #!/usr/bin/nft -f | ||
| 2 | |||
| 3 | flush ruleset | ||
| 4 | |||
| 5 | table inet filter { | ||
| 6 | chain input { | ||
| 7 | type filter hook input priority 0; | ||
| 8 | policy drop; | ||
| 9 | |||
| 10 | iif "lo" counter accept | ||
| 11 | ct state established,related counter accept | ||
| 12 | ip saddr 172.27.203.254 ip protocol icmp icmp type echo-request counter accept | ||
| 13 | } | ||
| 14 | |||
| 15 | chain output { | ||
| 16 | type filter hook output priority 0; | ||
| 17 | policy drop; | ||
| 18 | |||
| 19 | oif "lo" counter accept | ||
| 20 | ct state established,related counter accept | ||
| 21 | udp dport 53 counter accept | ||
| 22 | tcp dport 53 counter accept | ||
| 23 | tcp dport 853 counter accept # DNS over TLS | ||
| 24 | ip protocol icmp icmp type echo-request counter accept | ||
| 25 | tcp dport 80 counter accept | ||
| 26 | tcp dport 443 counter accept | ||
| 27 | } | ||
| 28 | } | ||
