1
0

Compare commits

..

2 Commits

Author SHA1 Message Date
60376e7688
hosts/carbon: Remove static IPv6 addressing 2024-08-15 19:40:37 +02:00
ae4de7f03a
hosts/carbon: Move net-gastnetz to bridge 2024-08-15 19:36:01 +02:00
3 changed files with 23 additions and 13 deletions

View File

@ -7,18 +7,23 @@
id = 202; id = 202;
interface = "enp1s0"; interface = "enp1s0";
}; };
networking.interfaces."enp1s0.202".ipv6.addresses = [ networking.bridges."net-gastnetz".interfaces = [
{ address = "fd00:3214:9453:4920::1"; prefixLength = 64; } "enp1s0.202"
{ address = "2001:4cd8:100:1313::1"; prefixLength = 64; } # public IPs for local network
]; ];
networking.interfaces."enp1s0.202".ipv4.addresses = [ networking.interfaces."net-gastnetz".ipv6.addresses = [
{ address = "fd00:3214:9453:4920::1"; prefixLength = 64; }
];
networking.interfaces."net-gastnetz".ipv4.addresses = [
{ address = "192.168.32.1"; prefixLength = 24; } { address = "192.168.32.1"; prefixLength = 24; }
]; ];
services.radvd.config = '' services.radvd.config = ''
interface enp1s0.202 { interface net-gastnetz {
AdvSendAdvert on; AdvSendAdvert on;
prefix 2001:4cd8:100:1313::/64 {}; prefix ::/64 {
AdvValidLifetime 60;
AdvPreferredLifetime 30;
};
RDNSS 2620:fe::fe 2620:fe::9 {}; # Quad 9 RDNSS 2620:fe::fe 2620:fe::9 {}; # Quad 9
}; };
''; '';
@ -26,7 +31,7 @@
services.kea.dhcp4 = { services.kea.dhcp4 = {
settings = { settings = {
interfaces-config = { interfaces-config = {
interfaces = [ "enp1s0.202" ]; interfaces = [ "net-gastnetz" ];
}; };
subnet4 = [ subnet4 = [
# Gastnetz # Gastnetz
@ -55,9 +60,9 @@
# net-gastnetz can only access internet # net-gastnetz can only access internet
clerie.firewall.extraForwardFilterCommands = '' clerie.firewall.extraForwardFilterCommands = ''
ip46tables -A forward-filter -i enp1s0.202 -o ppp-dtagdsl -j ACCEPT ip46tables -A forward-filter -i net-gastnetz -o ppp-dtagdsl -j ACCEPT
ip46tables -A forward-filter -i enp1s0.202 -j DROP ip46tables -A forward-filter -i net-gastnetz -j DROP
ip46tables -A forward-filter -o enp1s0.202 -j DROP ip46tables -A forward-filter -o net-gastnetz -j DROP
''; '';
} }

View File

@ -14,7 +14,6 @@
networking.interfaces."net-heimnetz".ipv6.addresses = [ networking.interfaces."net-heimnetz".ipv6.addresses = [
{ address = "fe80::1"; prefixLength = 64; } { address = "fe80::1"; prefixLength = 64; }
{ address = "fd00:152:152:4::1"; prefixLength = 64; } { address = "fd00:152:152:4::1"; prefixLength = 64; }
{ address = "2001:4cd8:100:1337::1"; prefixLength = 64; } # public IPs for local network
]; ];
networking.interfaces."net-heimnetz".ipv4.addresses = [ networking.interfaces."net-heimnetz".ipv4.addresses = [
{ address = "10.152.4.1"; prefixLength = 24; } { address = "10.152.4.1"; prefixLength = 24; }
@ -23,7 +22,10 @@
services.radvd.config = '' services.radvd.config = ''
interface net-heimnetz { interface net-heimnetz {
AdvSendAdvert on; AdvSendAdvert on;
prefix 2001:4cd8:100:1337::/64 {}; prefix ::/64 {
AdvValidLifetime 60;
AdvPreferredLifetime 30;
};
RDNSS fd00:152:152::1 {}; RDNSS fd00:152:152::1 {};
DNSSL net.clerie.de {}; DNSSL net.clerie.de {};
}; };

View File

@ -23,7 +23,10 @@
services.radvd.config = '' services.radvd.config = ''
interface net-iot { interface net-iot {
AdvSendAdvert on; AdvSendAdvert on;
prefix fd00:152:152:205::/64 {}; prefix ::/64 {
AdvValidLifetime 60;
AdvPreferredLifetime 30;
};
RDNSS fd00:152:152::1 {}; RDNSS fd00:152:152::1 {};
DNSSL iot.clerie.de {}; DNSSL iot.clerie.de {};
}; };