forked from nyanloutre/nixos-config
Ajout réseau spécial chinoiseries
This commit is contained in:
parent
fbcf3bcac2
commit
5c031c573d
@ -62,10 +62,16 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
vlans.bouyges = {
|
vlans = {
|
||||||
|
bouyges = {
|
||||||
id = 100;
|
id = 100;
|
||||||
interface = "eno1";
|
interface = "eno1";
|
||||||
};
|
};
|
||||||
|
chinoiseries = {
|
||||||
|
id = 20;
|
||||||
|
interface = "eno2";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
interfaces = {
|
interfaces = {
|
||||||
eno1.useDHCP = false;
|
eno1.useDHCP = false;
|
||||||
@ -78,6 +84,11 @@ in
|
|||||||
{ address = "10.30.0.1"; prefixLength = 16; }
|
{ address = "10.30.0.1"; prefixLength = 16; }
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
chinoiseries = {
|
||||||
|
ipv4.addresses = [
|
||||||
|
{ address = "10.40.0.1"; prefixLength = 16; }
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# NAT bouyges <-> eno2
|
# NAT bouyges <-> eno2
|
||||||
@ -86,8 +97,8 @@ in
|
|||||||
externalInterface = "bouyges";
|
externalInterface = "bouyges";
|
||||||
# Permet d'utiliser le SNAT plus rapide au lieu de MASQUERADE
|
# Permet d'utiliser le SNAT plus rapide au lieu de MASQUERADE
|
||||||
# externalIP = "0.0.0.0";
|
# externalIP = "0.0.0.0";
|
||||||
internalIPs = [ "10.30.0.0/16" ];
|
internalIPs = [ "10.30.0.0/16" "10.40.0.0/16" ];
|
||||||
internalInterfaces = [ "eno2" ];
|
internalInterfaces = [ "eno2" "chinoiseries" ];
|
||||||
forwardPorts = [
|
forwardPorts = [
|
||||||
{ destination = "10.30.0.1:22"; proto = "tcp"; sourcePort = 8443;}
|
{ destination = "10.30.0.1:22"; proto = "tcp"; sourcePort = 8443;}
|
||||||
{ destination = "10.30.135.35:25565"; proto = "tcp"; sourcePort = 25565; loopbackIPs=[ "195.36.180.44" ];}
|
{ destination = "10.30.135.35:25565"; proto = "tcp"; sourcePort = 25565; loopbackIPs=[ "195.36.180.44" ];}
|
||||||
@ -114,19 +125,29 @@ in
|
|||||||
|
|
||||||
services.dhcpd4 = {
|
services.dhcpd4 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
interfaces = [ "eno2" ];
|
interfaces = [ "eno2" "chinoiseries" ];
|
||||||
machines = [
|
machines = [
|
||||||
{ ethernetAddress = "50:c7:bf:b6:b8:ef"; hostName = "HS110"; ipAddress = "10.30.50.7"; }
|
{ ethernetAddress = "50:c7:bf:b6:b8:ef"; hostName = "HS110"; ipAddress = "10.30.50.7"; }
|
||||||
{ ethernetAddress = "ac:1f:6b:4b:01:15"; hostName = "IPMI"; ipAddress = "10.30.1.1"; }
|
{ ethernetAddress = "ac:1f:6b:4b:01:15"; hostName = "IPMI"; ipAddress = "10.30.1.1"; }
|
||||||
{ ethernetAddress = "00:1f:c6:6e:d1:f1"; hostName = "minecraftos"; ipAddress = "10.30.135.35"; }
|
{ ethernetAddress = "00:1f:c6:6e:d1:f1"; hostName = "minecraftos"; ipAddress = "10.30.135.35"; }
|
||||||
|
{ ethernetAddress = "b4:2e:99:ed:24:26"; hostName = "paul-fixe"; ipAddress = "10.30.135.71"; }
|
||||||
|
|
||||||
|
# YeeLights
|
||||||
|
{ ethernetAddress = "04:cf:8c:b5:7e:18"; hostName = "yeelink-light-color3_miap7e18"; ipAddress = "10.40.249.0"; }
|
||||||
|
{ ethernetAddress = "04:cf:8c:b5:2d:28"; hostName = "yeelink-light-color3_miap2d28"; ipAddress = "10.40.249.1"; }
|
||||||
|
{ ethernetAddress = "04:cf:8c:b5:71:04"; hostName = "yeelink-light-color3_miap7104"; ipAddress = "10.40.249.2"; }
|
||||||
];
|
];
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
option domain-name-servers 89.234.141.66, 80.67.169.12, 80.67.169.40;
|
option domain-name-servers 89.234.141.66, 80.67.169.12, 80.67.169.40;
|
||||||
option subnet-mask 255.255.0.0;
|
option subnet-mask 255.255.0.0;
|
||||||
option routers 10.30.0.1;
|
|
||||||
subnet 10.30.0.0 netmask 255.255.0.0 {
|
subnet 10.30.0.0 netmask 255.255.0.0 {
|
||||||
|
option routers 10.30.0.1;
|
||||||
range 10.30.50.0 10.30.250.0;
|
range 10.30.50.0 10.30.250.0;
|
||||||
}
|
}
|
||||||
|
subnet 10.40.0.0 netmask 255.255.0.0 {
|
||||||
|
option routers 10.40.0.1;
|
||||||
|
range 10.40.50.0 10.40.250.0;
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user