diff --git a/systems/LoutreOS/configuration.nix b/systems/LoutreOS/configuration.nix index e9de815..77a4c9b 100644 --- a/systems/LoutreOS/configuration.nix +++ b/systems/LoutreOS/configuration.nix @@ -48,6 +48,10 @@ hostName = "loutreos"; # Define your hostname. hostId = "7e66e347"; + hosts = { + "127.0.0.1" = [ "gitea.nyanlout.re" ]; + }; + useNetworkd = true; useDHCP = false; @@ -114,6 +118,7 @@ # Redirect local network request from server external IP to internal IP # Make the server available even without internet access + iptables -t nat -D PREROUTING -s 10.30.0.0/16 -d 176.180.172.105 -j DNAT --to 10.30.0.1 || true iptables -t nat -A PREROUTING -s 10.30.0.0/16 -d 176.180.172.105 -j DNAT --to 10.30.0.1 ''; }; @@ -223,7 +228,18 @@ }; }; - services.autossh.sessions = [ { extraArguments = "-N -R 0.0.0.0:2222:127.0.0.1:22 loutre@vps772619.ovh.net"; monitoringPort = 20000; name = "backup-ssh-reverse"; user = "autossh"; } ]; + # Options explanations + # -N disable shell + # -R 0.0.0.0:2222:127.0.0.1:22 redirect SSH port on VPS server on port 2222 + # -R 127.0.0.1:2525:127.0.0.1:25 redirect SMTP port on VPS port 2525 + services.autossh.sessions = [ + { + extraArguments = "-N -R 0.0.0.0:2222:127.0.0.1:22 -R 127.0.0.1:2525:127.0.0.1:25 loutre@vps772619.ovh.net"; + monitoringPort = 20000; + name = "backup-ssh-reverse"; + user = "autossh"; + } + ]; virtualisation.podman.enable = true;