From 0f28540bc9ac15639062214dccc038717475fb16 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Wed, 13 Mar 2019 22:47:39 +0100 Subject: [PATCH 1/4] partage NFS steam mode asynchrone --- systems/LoutreOS/services.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systems/LoutreOS/services.nix b/systems/LoutreOS/services.nix index 57a2a6b..c7138f6 100644 --- a/systems/LoutreOS/services.nix +++ b/systems/LoutreOS/services.nix @@ -184,7 +184,7 @@ in enable = true; exports = '' /mnt/medias 192.168.0.0/16(ro,no_root_squash) - /exports/steam 192.168.0.0/24(rw,no_root_squash) + /exports/steam 192.168.0.0/24(rw,async,no_root_squash) ''; statdPort = 4000; lockdPort = 4001; From 32badf4d627f99a223ef939ac1cf0c64467840ac Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Tue, 26 Mar 2019 11:20:05 +0100 Subject: [PATCH 2/4] vsftpd: changement mot de passe claire --- containers/vsftpd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/containers/vsftpd.nix b/containers/vsftpd.nix index 730b35a..02fab55 100644 --- a/containers/vsftpd.nix +++ b/containers/vsftpd.nix @@ -26,7 +26,7 @@ users.extraUsers = { claire = { isNormalUser = true; - hashedPassword = "$6$ZyXB0fvcTbScnrM$6YQSr18QlGyjxPwaVrKkJxUShNoX0DjsmhlVnoVZwlELP7r9gSoGskfM4qBF3GSUdtfQOn5TOHIls5QVUmVAW0"; + hashedPassword = "$6$DjEjaibh$cRoOEHH.CjUgXXwyVphgnOGMhD3AVjPtawQb9BxvNSmWNqfcxoNH.6HhdxYa7PM0y0yctYXjsAc.vnkIov/NA/"; description = "Claire TREHIOU"; }; From c4be6b797692dc1fe7f81af3d04258057698bb02 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Tue, 26 Mar 2019 11:22:08 +0100 Subject: [PATCH 3/4] update --- systems/LoutreOS/configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systems/LoutreOS/configuration.nix b/systems/LoutreOS/configuration.nix index d7f246b..aefe0da 100644 --- a/systems/LoutreOS/configuration.nix +++ b/systems/LoutreOS/configuration.nix @@ -5,7 +5,7 @@ { config, pkgs, ... }: let - gitRev = "7d77db315d44ef6059a5d184f61eb584cfcf2d46"; + gitRev = "afca3f977175280668aaed92112eb42a171510d2"; nixpkgs = fetchTarball "https://github.com/nyanloutre/nixpkgs/archive/${gitRev}.tar.gz"; in { From 3ce21d6e7b363373022a0e958b96afc250ceb504 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Thu, 4 Apr 2019 23:47:24 +0200 Subject: [PATCH 4/4] configuration NAT --- systems/LoutreOS/configuration.nix | 76 ++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/systems/LoutreOS/configuration.nix b/systems/LoutreOS/configuration.nix index aefe0da..6415262 100644 --- a/systems/LoutreOS/configuration.nix +++ b/systems/LoutreOS/configuration.nix @@ -40,9 +40,85 @@ in autoScrub.enable = true; }; + # eno1 -> VLAN100 -> Internet + # eno2 -> LAN + # eno3 -> accès serveur + # eno4 -> Wifi ? + networking = { hostName = "loutreos"; # Define your hostname. hostId = "7e66e347"; + + # firewall.trustedInterfaces = [ "eno3" ]; + # interface.eno3 = { + # ipv4.addresses = [ + # { address = "10.30.0.5"; prefixLength = 24; } + # ]; + # }; + + vlans.bouyges = { + id = 100; + interface = "eno1"; + }; + + interfaces = { + bouyges = { + # Adresse MAC BBox ? https://lafibre.info/remplacer-bbox/informations-de-connexion-ftth/msg598303/#msg598303 + macAddress = "00:11:22:33:44:55"; + }; + eno2 = { + ipv4.addresses = [ + { address = "10.30.0.1"; prefixLength = 16; } + ]; + }; + }; + + # NAT bouyges <-> eno2 + nat = { + enable = true; + externalInterface = "bouyges"; + # Permet d'utiliser le SNAT plus rapide au lieu de MASQUERADE + # externalIP = "0.0.0.0"; + forwardPorts = [ + # FTP + { destination = "10.30.0.5"; proto = "tcp"; sourcePort = 20; } + { destination = "10.30.0.5"; proto = "tcp"; sourcePort = 21; } + { destination = "10.30.0.5"; proto = "tcp"; sourcePort = "64000:65535"; } + # SSH + { destination = "10.30.0.5"; proto = "tcp"; sourcePort = 22; } + # Mails + { destination = "10.30.0.5"; proto = "tcp"; sourcePort = 25; } + { destination = "10.30.0.5"; proto = "tcp"; sourcePort = 143; } + { destination = "10.30.0.5"; proto = "tcp"; sourcePort = 587; } + { destination = "10.30.0.5"; proto = "tcp"; sourcePort = 4190; } + # HAProxy + { destination = "10.30.0.5"; proto = "tcp"; sourcePort = 80; } + { destination = "10.30.0.5"; proto = "tcp"; sourcePort = 443; } + # Matrix + { destination = "10.30.0.5"; proto = "tcp"; sourcePort = 8448; } + # Syncthing + { destination = "10.30.0.5"; proto = "tcp"; sourcePort = 22000; } + # Transmission + { destination = "10.30.0.5"; proto = "tcp"; sourcePort = 51413; } + { destination = "10.30.0.5"; proto = "udp"; sourcePort = 51413; } + ]; + internalIPs = [ "10.30.0.0/16" ]; + internalInterfaces = [ "eno2" ]; + }; + + }; + + services.dhcpd4 = { + enable = true; + interfaces = [ "eno2" ]; + extraConfig = '' + option domain-name-servers 89.234.141.66, 80.67.169.12, 80.67.169.40; + option subnet-mask 255.255.0.0; + option routers 10.30.0.1; + subnet 10.30.0.0 netmask 255.255.0.0 { + range 10.30.50.0 10.30.250.0; + } + ''; }; nixpkgs.overlays = [