Skip to content

Commit

Permalink
quine: allow docker ipv4 forwarding
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramblurr committed Feb 26, 2025
1 parent 6f27194 commit 29a27f4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions hosts/quine/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ in
home.attic.enable = true;

networking.firewall.allowedTCPPorts = [
3000
8080
];
networking.firewall.allowedUDPPorts = [ 67 ];
Expand Down
4 changes: 4 additions & 0 deletions hosts/quine/networking.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
site = config.repo.secrets.site.site;
#systemd.services.systemd-networkd.serviceConfig.Environment = ["SYSTEMD_LOG_LEVEL=debug"];
systemd.network = {
config.networkConfig = {
IPv4Forwarding = true;
#IPv6Forwarding = false;
};
links = {
"10-lan0" = {
matchConfig.MACAddress = config.repo.secrets.local.lan0.mac;
Expand Down
4 changes: 2 additions & 2 deletions modules/site-net/network.nix
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ in
services.resolved.enable = lib.mkDefault true;
boot.kernelModules = lib.mkIf (hostGres != [ ]) [ "ip_gre" ];
systemd.network.config.networkConfig = {
IPv4Forwarding = hostConfig.isRouter;
IPv6Forwarding = hostConfig.isRouter;
IPv4Forwarding = lib.mkDefault hostConfig.isRouter;
IPv6Forwarding = lib.mkDefault hostConfig.isRouter;
};

systemd.network.enable = true;
Expand Down

0 comments on commit 29a27f4

Please sign in to comment.