From bc848547fde5933f8eca1fbb2053360e6e2e44a4 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 30 Sep 2022 17:39:07 +0800 Subject: [PATCH] aux: chiron port redirect --- aux-etc-nixos/configuration.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/aux-etc-nixos/configuration.nix b/aux-etc-nixos/configuration.nix index 2049535..734f3ec 100644 --- a/aux-etc-nixos/configuration.nix +++ b/aux-etc-nixos/configuration.nix @@ -75,6 +75,9 @@ in no-resolv + # Static IPv4s to make port redirections work + dhcp-host=chiron,192.168.14.201 + # Google can't do DNS geolocation correctly and slows down websites of everyone using # their shitty font cloud hosting. In HK, you sometimes get IPs behind the GFW that you # cannot reach. @@ -85,6 +88,9 @@ in enable = true; externalInterface = netifWan; internalInterfaces = [ netifLan netifWifi ]; + forwardPorts = [ + { sourcePort = 2201; destination = "192.168.14.201:22"; proto = "tcp"; } + ]; extraCommands = '' iptables -w -N block-lan-from-wifi iptables -w -A block-lan-from-wifi -i ${netifLan} -o ${netifWifi} -j DROP