🎉 First working proof of concept

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
2021-05-31 11:14:16 +00:00
commit 4389fb0e6f
3 changed files with 147 additions and 0 deletions

16
firewall/nat.conf Executable file
View File

@ -0,0 +1,16 @@
#!/usr/sbin/nft -f
flush ruleset
table ip nat {
chain prerouting {
type nat hook prerouting priority 0; policy accept;
}
chain postrouting {
type nat hook postrouting priority 0; policy accept;
ip saddr 10.2.1.0/30 masquerade;
ip saddr 172.17.0.0/16 masquerade;
}
}

17
firewall/restrict-http.conf Executable file
View File

@ -0,0 +1,17 @@
#!/usr/sbin/nft -f
flush ruleset
table inet filter {
chain input {
type filter hook input priority 0;
}
chain forward {
type filter hook forward priority 0; policy accept
tcp dport { 80 } reject;
accept
}
chain output {
type filter hook output priority 0;
}
}