1
0

Compare commits

..

2 Commits

Author SHA1 Message Date
f93c4a0d11 Enable IPv6 on guest net 2022-04-03 13:28:08 +02:00
82f22ef444 Add lutoma peering 2022-03-22 14:15:46 +01:00
2 changed files with 35 additions and 4 deletions

View File

@ -61,6 +61,7 @@
}; };
networking.interfaces."enp1s0.202".ipv6.addresses = [ networking.interfaces."enp1s0.202".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."enp1s0.202".ipv4.addresses = [ networking.interfaces."enp1s0.202".ipv4.addresses = [
{ address = "192.168.32.1"; prefixLength = 24; } { address = "192.168.32.1"; prefixLength = 24; }
@ -93,6 +94,12 @@
RDNSS fd00:152:152::1 {}; RDNSS fd00:152:152::1 {};
DNSSL net.clerie.de {}; DNSSL net.clerie.de {};
}; };
interface enp1s0.202 {
AdvSendAdvert on;
prefix 2001:4cd8:100:1313::/64 {};
route ::/0 {};
RDNSS 2620:fe::fe {}; # Quad 9
};
''; '';
services.kea.dhcp4 = { services.kea.dhcp4 = {
@ -258,10 +265,10 @@
networking.firewall.allowedTCPPorts = [ 53 ]; networking.firewall.allowedTCPPorts = [ 53 ];
networking.firewall.extraCommands = '' networking.firewall.extraCommands = ''
iptables -A FORWARD -i enp1s0.202 -o ppp-ntvdsl -j ACCEPT ip46tables -A FORWARD -i enp1s0.202 -o ppp-ntvdsl -j ACCEPT
iptables -A FORWARD -i enp1s0.202 -j DROP ip46tables -A FORWARD -i enp1s0.202 -j DROP
iptables -A FORWARD -i ppp-ntvdsl -o enp1s0.202 -j ACCEPT ip46tables -A FORWARD -i ppp-ntvdsl -o enp1s0.202 -j ACCEPT
iptables -A FORWARD -o enp1s0.202 -j DROP ip46tables -A FORWARD -o enp1s0.202 -j DROP
''; '';
services.pppd = { services.pppd = {

View File

@ -151,6 +151,26 @@
]; ];
privateKeyFile = "/var/src/secrets/wireguard/wg1302"; privateKeyFile = "/var/src/secrets/wireguard/wg1302";
}; };
# lutoma
wg4719 = {
ips = [
#"fe80::1/128"
# peer fe80::acab/128
];
postSetup = ''
ip addr add dev wg4719 fe80::1/128 peer fe80::acab/128
'';
listenPort = 54719;
allowedIPsAsRoutes = false;
peers = [
{
allowedIPs = [ "fe80::/10" "fd00::/8" ];
endpoint = "[2603:c020:8001:ed42::42]:42546";
publicKey = "MkVyCgIq0BOStFIu2/Wl91ofFuRvnG3ZqTWFfVs/VlQ=";
}
];
privateKeyFile = "/var/src/secrets/wireguard/wg4719";
};
}; };
petabyte.policyrouting = { petabyte.policyrouting = {
@ -301,6 +321,10 @@
source address fe80::a14e; source address fe80::a14e;
} }
protocol bgp peer_4719 from bgp_peer {
neighbor fe80::acab%wg4719 as 64719;
}
protocol device { protocol device {
scan time 10; scan time 10;
} }