2024-07-14 00:37:48 +02:00
|
|
|
{ ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
## Gastnetz
|
|
|
|
networking.vlans."enp1s0.202" = {
|
|
|
|
id = 202;
|
|
|
|
interface = "enp1s0";
|
|
|
|
};
|
2024-08-15 19:36:01 +02:00
|
|
|
networking.bridges."net-gastnetz".interfaces = [
|
|
|
|
"enp1s0.202"
|
|
|
|
];
|
|
|
|
networking.interfaces."net-gastnetz".ipv6.addresses = [
|
2024-07-14 00:37:48 +02:00
|
|
|
{ address = "fd00:3214:9453:4920::1"; prefixLength = 64; }
|
|
|
|
];
|
2024-08-15 19:36:01 +02:00
|
|
|
networking.interfaces."net-gastnetz".ipv4.addresses = [
|
2024-07-14 00:37:48 +02:00
|
|
|
{ address = "192.168.32.1"; prefixLength = 24; }
|
|
|
|
];
|
|
|
|
|
|
|
|
services.radvd.config = ''
|
2024-08-15 19:36:01 +02:00
|
|
|
interface net-gastnetz {
|
2024-07-14 00:37:48 +02:00
|
|
|
AdvSendAdvert on;
|
2024-11-10 19:52:47 +01:00
|
|
|
MaxRtrAdvInterval 30;
|
2024-08-15 19:40:37 +02:00
|
|
|
prefix ::/64 {
|
2024-11-10 19:52:47 +01:00
|
|
|
AdvValidLifetime 300;
|
|
|
|
AdvPreferredLifetime 120;
|
2024-08-15 19:40:37 +02:00
|
|
|
};
|
2024-07-14 00:37:48 +02:00
|
|
|
RDNSS 2620:fe::fe 2620:fe::9 {}; # Quad 9
|
|
|
|
};
|
|
|
|
'';
|
|
|
|
|
|
|
|
services.kea.dhcp4 = {
|
|
|
|
settings = {
|
|
|
|
interfaces-config = {
|
2024-08-15 19:36:01 +02:00
|
|
|
interfaces = [ "net-gastnetz" ];
|
2024-07-14 00:37:48 +02:00
|
|
|
};
|
|
|
|
subnet4 = [
|
|
|
|
# Gastnetz
|
|
|
|
{
|
|
|
|
id = 202;
|
|
|
|
subnet = "192.168.32.0/24";
|
|
|
|
pools = [
|
|
|
|
{
|
|
|
|
pool = "192.168.32.100 - 192.168.32.240";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
option-data = [
|
|
|
|
{
|
|
|
|
name = "routers";
|
|
|
|
data = "192.168.32.1";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "domain-name-servers";
|
|
|
|
data = "9.9.9.9,149.112.112.112"; # Quad 9
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# net-gastnetz can only access internet
|
|
|
|
clerie.firewall.extraForwardFilterCommands = ''
|
2024-08-15 19:36:01 +02:00
|
|
|
ip46tables -A forward-filter -i net-gastnetz -o ppp-dtagdsl -j ACCEPT
|
|
|
|
ip46tables -A forward-filter -i net-gastnetz -j DROP
|
|
|
|
ip46tables -A forward-filter -o net-gastnetz -j DROP
|
2024-07-14 00:37:48 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
}
|