diff options
| author | Devin Finlinson <devin.finlinson@pm.me> | 2026-03-28 16:01:01 -0600 |
|---|---|---|
| committer | Devin Finlinson <devin.finlinson@pm.me> | 2026-03-28 16:01:01 -0600 |
| commit | b956f3ebd611c9354a4138e8dfa5bfbed5a45894 (patch) | |
| tree | 03135dc59e10237abfd2a4ce8669dc90010d3df7 /machines/biski/default.nix | |
| parent | cf31c63d296c728f5431bf8af0e7df80eb295bca (diff) | |
set up port forwarding module for list of ports
Diffstat (limited to 'machines/biski/default.nix')
| -rw-r--r-- | machines/biski/default.nix | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/machines/biski/default.nix b/machines/biski/default.nix index d4b33b8..d9944e6 100644 --- a/machines/biski/default.nix +++ b/machines/biski/default.nix @@ -10,6 +10,7 @@ ./hardware-configuration.nix # /tmp/etc/nixos/hardware-configuartion.nix ./disko.nix + ./portforward.nix ../../modules/users/git.nix ]; @@ -123,36 +124,8 @@ }; # Open ports in the firewall. - networking.firewall.allowedTCPPorts = [ 25565 25567]; + # networking.firewall.allowedTCPPorts = [ ... ]; networking.firewall.allowedUDPPorts = [ 10514 ]; - networking.nftables = { - enable = true; - ruleset = '' - table ip nat { - chain PREROUTING { - type nat hook prerouting priority dstnat; policy accept; - iifname "eno1" tcp dport 25565 dnat to 100.64.0.2:25565 - } - } - ''; - }; - networking.nat = { - enable = true; - internalInterfaces = [ "eno1" ]; - externalInterface = "tailscale0"; - forwardPorts = [ - { - sourcePort = 25565; - proto = "tcp"; - destination = "100.64.0.2:25565"; - } - { - sourcePort = 25567; - proto = "tcp"; - destination = "100.64.0.2:25567"; - } - ]; - }; # Or disable the firewall altogether. # networking.firewall.enable = false; |
