1
0

Change to new networking setup and add guest network

This commit is contained in:
clerie 2021-08-01 13:32:48 +02:00
parent 6cec90bdfa
commit 008a51702a

View File

@ -32,23 +32,47 @@
{ address = "10.152.0.1"; prefixLength = 32; } # Anycast { address = "10.152.0.1"; prefixLength = 32; } # Anycast
]; ];
# Network # Network
## Uplink ## DSL-Uplink
networking.interfaces.enp1s0.useDHCP = true; networking.vlans."enp1s0.101" = {
## Local Network id = 101;
networking.interfaces.enp2s0.ipv6.addresses = [ interface = "enp1s0";
};
## LTE-Uplink
networking.vlans."enp1s0.102" = {
id = 102;
interface = "enp1s0";
};
networking.interfaces."enp1s0.102".useDHCP = true;
## Heimnetz
networking.vlans."enp1s0.201" = {
id = 201;
interface = "enp1s0";
};
networking.interfaces."enp1s0.201".ipv6.addresses = [
{ address = "fd00:152:152:4::1"; prefixLength = 64; } { address = "fd00:152:152:4::1"; prefixLength = 64; }
{ address = "2a01:4f8:1c0c:8221::1"; prefixLength = 64; } # public IPs for local network { address = "2a01:4f8:1c0c:8221::1"; prefixLength = 64; } # public IPs for local network
]; ];
networking.interfaces.enp2s0.ipv4.addresses = [ networking.interfaces."enp1s0.201".ipv4.addresses = [
{ address = "10.152.4.1"; prefixLength = 24; } { address = "10.152.4.1"; prefixLength = 24; }
]; ];
## Gastnetz
networking.vlans."enp1s0.202" = {
id = 202;
interface = "enp1s0";
};
networking.interfaces."enp1s0.202".ipv6.addresses = [
{ address = "fd00:3214:9453:4920::1"; prefixLength = 64; }
];
networking.interfaces."enp1s0.202".ipv4.addresses = [
{ address = "192.168.32.1"; prefixLength = 24; }
];
networking.nat = { networking.nat = {
enableIPv6 = true; enableIPv6 = true;
enable = true; enable = true;
externalInterface = "enp1s0"; externalInterface = "enp1s0.102";
internalIPv6s = [ "fd00:152:152::/48" ]; internalIPv6s = [ "fd00:152:152::/48" "fd00:3214:9453:4920::/64"];
internalIPs = [ "10.152.0.0/16" ]; internalIPs = [ "10.152.0.0/16" "192.168.32.0/24" ];
}; };
networking.wireguard.enable = true; networking.wireguard.enable = true;
@ -175,8 +199,8 @@
}; };
} }
protocol direct direct_enp2s0 { protocol direct direct_enp1s0_201 {
interface "enp2s0"; interface "enp1s0.201";
ipv6 { ipv6 {
table ospf6; table ospf6;
}; };