Fix: fix init nftables, fix logic ban/unban command
All checks were successful
build / build (push) Successful in 2m39s

This commit is contained in:
d3m0k1d
2026-01-20 23:41:22 +03:00
parent e275a73460
commit 16a174cf56
4 changed files with 37 additions and 5 deletions

View File

@@ -104,15 +104,14 @@ func (n *Nftables) Setup(config string) error {
nftConfig := `table inet banforge {
chain input {
type filter hook input priority 0
policy accept
type filter hook input priority filter; policy accept;
jump banned
}
chain banned {
}
}
`
cmd := exec.Command("sudo", "tee", config)
stdin, err := cmd.StdinPipe()
if err != nil {