2024-02-12 17:17:59 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
2024-04-07 13:57:51 +00:00
|
|
|
networking.firewall.enable = true;
|
2024-10-11 12:22:52 +00:00
|
|
|
networking.firewall.logRefusedConnections = false;
|
2024-04-07 14:25:08 +00:00
|
|
|
networking.nat.enable = true;
|
2024-02-12 17:17:59 +00:00
|
|
|
|
2024-04-07 13:57:51 +00:00
|
|
|
networking.nftables.enable = true;
|
|
|
|
networking.nftables.tables.nat = {
|
|
|
|
family = "ip";
|
|
|
|
content = ''
|
|
|
|
chain prerouting {
|
|
|
|
type nat hook prerouting priority -100
|
|
|
|
iifname enp35s0 tcp dport { 22 } dnat ${config.containers.forgejo.localAddress}:22
|
2024-02-25 16:53:54 +00:00
|
|
|
}
|
2024-04-07 13:57:51 +00:00
|
|
|
chain postrouting {
|
|
|
|
type nat hook postrouting priority 100
|
|
|
|
iifname lxcbr0 oifname enp35s0 masquerade
|
|
|
|
iifname ve-* oifname enp35s0 masquerade
|
2024-02-25 16:53:54 +00:00
|
|
|
}
|
2024-02-18 12:39:54 +00:00
|
|
|
'';
|
|
|
|
};
|
2024-02-12 17:17:59 +00:00
|
|
|
}
|