From c5c0df3f5ef2004a294ca99e3975d9860449a8c6 Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Tue, 5 Sep 2023 15:02:02 +0100 Subject: [PATCH] [no ci] feat: now got ssh access to skynet.skynet.ie --- machines/skynet.nix | 45 +++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/machines/skynet.nix b/machines/skynet.nix index 51d7dc9..1a47492 100644 --- a/machines/skynet.nix +++ b/machines/skynet.nix @@ -35,12 +35,10 @@ in { # it has two network devices so two skynet_dns.records = [ - #{record=name; r_type="A"; value=ip_pub; server=true;} - {record=name; r_type="A"; value=ip_priv; server=true; } - {record="ext"; r_type="A"; value=ip_pub; server=false;} - - {record="${name}.int"; r_type="A"; value=ip_priv; server=true;} - {record=ip_priv; r_type="PTR"; value=hostname_int;} + {record=name; r_type="A"; value=ip_pub; server=true;} + {record="${name}.int"; r_type="A"; value=ip_priv; server=true;} + {record=ip_pub; r_type="PTR"; value=hostname;} + {record=ip_priv; r_type="PTR"; value=hostname_int;} ]; services.skynet_backup = { @@ -59,24 +57,31 @@ in { }; proxmoxLXC.manageNetwork = true; - networking.hostName = name; - networking.interfaces = { - eth0.ipv4.addresses = [ - { - address = ip_priv; - prefixLength = 26; - } - ]; - eth1.ipv4.addresses = [ - { - address = ip_pub; - prefixLength = 28; - } - ]; + networking = { + hostName = name; + # needed to use the dmz first + defaultGateway = lib.mkForce "193.1.96.161"; + + interfaces = { + eth0.ipv4.addresses = [ + { + address = ip_priv; + prefixLength = 26; + } + ]; + # primary ip for logging in + eth1.ipv4.addresses = [ + { + address = ip_pub; + prefixLength = 28; + } + ]; + }; }; services.skynet = { host = { + # website is still hosted on the internal IP ip = ip_priv; name = name; };