firewall improved to use module tables feature
This commit is contained in:
parent
69e69c2b7f
commit
9fc3927c86
1 changed files with 26 additions and 22 deletions
|
|
@ -1,14 +1,17 @@
|
||||||
{
|
{
|
||||||
lib,
|
# lib,
|
||||||
pkgs,
|
# pkgs,
|
||||||
config,
|
# config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
networking.nftables = {
|
networking.nftables = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ruleset = ''
|
tables = {
|
||||||
table inet filter {
|
yggSsh = {
|
||||||
|
name = "yggSsh";
|
||||||
|
family = "inet";
|
||||||
|
content = ''
|
||||||
chain input {
|
chain input {
|
||||||
type filter hook input priority filter; policy accept;
|
type filter hook input priority filter; policy accept;
|
||||||
ct state related,established accept
|
ct state related,established accept
|
||||||
|
|
@ -27,7 +30,8 @@
|
||||||
chain output {
|
chain output {
|
||||||
type filter hook output priority filter; policy accept;
|
type filter hook output priority filter; policy accept;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue