1
0

Compare commits

..

No commits in common. "58b8f27cbdbc980692ab0bbe09bb088326d33ffb" and "c3ed11df9f37a973504db2de1cc61f44ba226f64" have entirely different histories.

6 changed files with 15 additions and 62 deletions

View File

@ -288,11 +288,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1723637854, "lastModified": 1723362943,
"narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=", "narHash": "sha256-dFZRVSgmJkyM0bkPpaYRtG/kRMRTorUIDj8BxoOt1T4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c3aa7b8938b17aebd2deecf7be0636000d62a2b9", "rev": "a58bc8ad779655e790115244571758e8de055e3d",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -55,15 +55,6 @@
}; };
}; };
systemd.services.kea-dhcp4-server = {
after = [
"network-setup.service"
];
requires = [
"network-setup.service"
];
};
clerie.firewall.enable = true; clerie.firewall.enable = true;
clerie.monitoring = { clerie.monitoring = {

View File

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

View File

@ -14,6 +14,7 @@
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; }
@ -22,10 +23,7 @@
services.radvd.config = '' services.radvd.config = ''
interface net-heimnetz { interface net-heimnetz {
AdvSendAdvert on; AdvSendAdvert on;
prefix ::/64 { prefix 2001:4cd8:100:1337::/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,10 +23,7 @@
services.radvd.config = '' services.radvd.config = ''
interface net-iot { interface net-iot {
AdvSendAdvert on; AdvSendAdvert on;
prefix ::/64 { prefix fd00:152:152:205::/64 {};
AdvValidLifetime 60;
AdvPreferredLifetime 30;
};
RDNSS fd00:152:152::1 {}; RDNSS fd00:152:152::1 {};
DNSSL iot.clerie.de {}; DNSSL iot.clerie.de {};
}; };

View File

@ -57,32 +57,4 @@
ip46tables -t mangle -A forward-mangle -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1416 ip46tables -t mangle -A forward-mangle -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1416
''; '';
networking.interfaces.net-heimnetz.useDHCP = true;
networking.interfaces.ppp-dtagdsl.useDHCP = true;
networking.dhcpcd = {
enable = true;
allowInterfaces = [
"net-heimnetz"
"ppp-dtagdsl"
];
wait = "ipv6";
extraConfig = ''
ipv6only
noipv6rs
interface ppp-dtagdsl
ipv6rs
ia_pd 1/::/56 net-heimnetz/201/64
'';
};
environment.etc."ppp/ipv6-up" = {
text = ''
#!${pkgs.runtimeShell}
set -euo pipefail
${pkgs.dhcpcd}/bin/dhcpcd --renew $1
'';
};
} }