feat(ISP/firewall): forward filtering
All checks were successful
Check meta / check_dns (pull_request) Successful in 15s
Check workflows / check_workflows (pull_request) Successful in 17s
Check meta / check_meta (pull_request) Successful in 20s
Build all the nodes / netcore01 (pull_request) Successful in 21s
Build all the nodes / ap01 (pull_request) Successful in 33s
Build the shell / build-shell (pull_request) Successful in 26s
Build all the nodes / netcore02 (pull_request) Successful in 41s
Build all the nodes / netaccess01 (pull_request) Successful in 42s
Run pre-commit on all files / pre-commit (pull_request) Successful in 59s
Build all the nodes / geo01 (pull_request) Successful in 2m0s
Build all the nodes / bridge01 (pull_request) Successful in 2m29s
Build all the nodes / storage01 (pull_request) Successful in 2m22s
Build all the nodes / vault01 (pull_request) Successful in 2m22s
Build all the nodes / hypervisor02 (pull_request) Successful in 2m32s
Build all the nodes / build01 (pull_request) Successful in 2m42s
Build all the nodes / tower01 (pull_request) Successful in 2m39s
Build all the nodes / hypervisor01 (pull_request) Successful in 2m50s
Build all the nodes / web02 (pull_request) Successful in 2m54s
Build all the nodes / geo02 (pull_request) Successful in 3m2s
Build all the nodes / rescue01 (pull_request) Successful in 2m59s
Build all the nodes / hypervisor03 (pull_request) Successful in 3m6s
Build all the nodes / web03 (pull_request) Successful in 3m5s
Build all the nodes / web01 (pull_request) Successful in 3m32s
Build all the nodes / compute01 (pull_request) Successful in 3m47s
Build all the nodes / ap01 (push) Successful in 1m8s
Build all the nodes / netcore01 (push) Successful in 28s
Build all the nodes / netaccess01 (push) Successful in 49s
Build all the nodes / netcore02 (push) Successful in 39s
Build all the nodes / hypervisor01 (push) Successful in 1m40s
Build all the nodes / bridge01 (push) Successful in 2m17s
Build all the nodes / hypervisor02 (push) Successful in 1m39s
Build the shell / build-shell (push) Successful in 25s
Build all the nodes / geo02 (push) Successful in 2m3s
Build all the nodes / geo01 (push) Successful in 2m36s
Run pre-commit on all files / pre-commit (push) Successful in 45s
Build all the nodes / hypervisor03 (push) Successful in 1m54s
Build all the nodes / compute01 (push) Successful in 2m46s
Build all the nodes / build01 (push) Successful in 2m55s
Build all the nodes / tower01 (push) Successful in 2m7s
Build all the nodes / vault01 (push) Successful in 2m27s
Build all the nodes / rescue01 (push) Successful in 2m51s
Build all the nodes / web02 (push) Successful in 2m44s
Build all the nodes / web03 (push) Successful in 3m13s
Build all the nodes / web01 (push) Successful in 3m18s
Build all the nodes / storage01 (push) Successful in 3m40s
All checks were successful
Check meta / check_dns (pull_request) Successful in 15s
Check workflows / check_workflows (pull_request) Successful in 17s
Check meta / check_meta (pull_request) Successful in 20s
Build all the nodes / netcore01 (pull_request) Successful in 21s
Build all the nodes / ap01 (pull_request) Successful in 33s
Build the shell / build-shell (pull_request) Successful in 26s
Build all the nodes / netcore02 (pull_request) Successful in 41s
Build all the nodes / netaccess01 (pull_request) Successful in 42s
Run pre-commit on all files / pre-commit (pull_request) Successful in 59s
Build all the nodes / geo01 (pull_request) Successful in 2m0s
Build all the nodes / bridge01 (pull_request) Successful in 2m29s
Build all the nodes / storage01 (pull_request) Successful in 2m22s
Build all the nodes / vault01 (pull_request) Successful in 2m22s
Build all the nodes / hypervisor02 (pull_request) Successful in 2m32s
Build all the nodes / build01 (pull_request) Successful in 2m42s
Build all the nodes / tower01 (pull_request) Successful in 2m39s
Build all the nodes / hypervisor01 (pull_request) Successful in 2m50s
Build all the nodes / web02 (pull_request) Successful in 2m54s
Build all the nodes / geo02 (pull_request) Successful in 3m2s
Build all the nodes / rescue01 (pull_request) Successful in 2m59s
Build all the nodes / hypervisor03 (pull_request) Successful in 3m6s
Build all the nodes / web03 (pull_request) Successful in 3m5s
Build all the nodes / web01 (pull_request) Successful in 3m32s
Build all the nodes / compute01 (pull_request) Successful in 3m47s
Build all the nodes / ap01 (push) Successful in 1m8s
Build all the nodes / netcore01 (push) Successful in 28s
Build all the nodes / netaccess01 (push) Successful in 49s
Build all the nodes / netcore02 (push) Successful in 39s
Build all the nodes / hypervisor01 (push) Successful in 1m40s
Build all the nodes / bridge01 (push) Successful in 2m17s
Build all the nodes / hypervisor02 (push) Successful in 1m39s
Build the shell / build-shell (push) Successful in 25s
Build all the nodes / geo02 (push) Successful in 2m3s
Build all the nodes / geo01 (push) Successful in 2m36s
Run pre-commit on all files / pre-commit (push) Successful in 45s
Build all the nodes / hypervisor03 (push) Successful in 1m54s
Build all the nodes / compute01 (push) Successful in 2m46s
Build all the nodes / build01 (push) Successful in 2m55s
Build all the nodes / tower01 (push) Successful in 2m7s
Build all the nodes / vault01 (push) Successful in 2m27s
Build all the nodes / rescue01 (push) Successful in 2m51s
Build all the nodes / web02 (push) Successful in 2m44s
Build all the nodes / web03 (push) Successful in 3m13s
Build all the nodes / web01 (push) Successful in 3m18s
Build all the nodes / storage01 (push) Successful in 3m40s
removes the snat filtering of preliminar tests
This commit is contained in:
parent
5f5fae103f
commit
b3eb86c0a1
1 changed files with 55 additions and 13 deletions
|
@ -336,18 +336,58 @@ in
|
|||
] ++ userVlans;
|
||||
nftables = {
|
||||
enable = true;
|
||||
tables.nat = {
|
||||
family = "ip";
|
||||
content = ''
|
||||
chain postrouting {
|
||||
type nat hook postrouting priority 100;
|
||||
ip saddr 10.0.0.0/16 ip saddr != 10.0.255.0/24 snat ip to 129.199.195.130-129.199.195.157
|
||||
ether saddr { e0:2e:0b:bd:97:73, e8:d5:2b:0d:fe:4a } snat to 129.199.195.130 comment "Elias"
|
||||
ether saddr { 1c:1b:b5:14:9c:e5, e6:ce:e2:b6:e3:82 } snat to 129.199.195.131 comment "Lubin"
|
||||
ether saddr d0:49:7c:46:f6:39 snat to 129.199.195.132 comment "Jean-Marc"
|
||||
ether saddr { 5c:64:8e:f4:09:06 } snat to 129.199.195.158 comment "APs"
|
||||
}
|
||||
'';
|
||||
tables = {
|
||||
nat = {
|
||||
family = "ip";
|
||||
content = ''
|
||||
chain postrouting {
|
||||
type nat hook postrouting priority 100;
|
||||
ip saddr 10.0.0.0/16 ip daddr != 10.0.0.0/16 snat ip to 129.199.195.130-129.199.195.157
|
||||
}
|
||||
'';
|
||||
};
|
||||
filter = {
|
||||
family = "inet";
|
||||
content = ''
|
||||
chain forward {
|
||||
type filter hook forward priority filter; policy accept;
|
||||
ct state vmap {
|
||||
invalid: drop,
|
||||
established: accept,
|
||||
related: accept,
|
||||
new: jump forward_decide,
|
||||
untracked: jump forward_decide,
|
||||
};
|
||||
}
|
||||
chain forward_decide {
|
||||
# Block access to vpn
|
||||
ip daddr {
|
||||
10.10.17.0/30,
|
||||
100.80.0.0/16,
|
||||
} jump forward_reject;
|
||||
|
||||
# And administrative vlans
|
||||
ip6 daddr {
|
||||
fd26:baf9:d250::/48,
|
||||
} jump forward_reject;
|
||||
|
||||
# These are being deployed, and so are not trusted
|
||||
ip saddr 10.0.255.0/24 jump forward_reject;
|
||||
|
||||
# We only forward for ISP clients and our stuff
|
||||
ip saddr != 10.0.0.0/16 jump forward_reject;
|
||||
|
||||
# Can talk to us
|
||||
ip daddr 10.0.0.0/27 accept;
|
||||
|
||||
# Not others nor CRI
|
||||
ip daddr 10.0.0.0/8 jump forward_reject;
|
||||
}
|
||||
chain forward_reject {
|
||||
reject with icmpx type admin-prohibited;
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
firewall = {
|
||||
|
@ -355,7 +395,9 @@ in
|
|||
67
|
||||
1194
|
||||
];
|
||||
checkReversePath = false;
|
||||
# FIXME: I dont't remember why it's here, and it doesn't seems right
|
||||
# comes from https://git.dgnum.eu/DGNum/infrastructure/commit/411795c664374549e5e831722a80180b51fbf0d5
|
||||
# checkReversePath = false;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue