swann: tighten up IPv6 config
This commit is contained in:
parent
564c803136
commit
4fb2a9e8e3
1 changed files with 23 additions and 6 deletions
|
@ -40,14 +40,17 @@ in {
|
||||||
interfaces = {
|
interfaces = {
|
||||||
ens-virginmedia = {
|
ens-virginmedia = {
|
||||||
useDHCP = true;
|
useDHCP = true;
|
||||||
ipv6.addresses = [
|
|
||||||
{ address = "2a02:88fd:f:d::2"; prefixLength = 64; }
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
ens-general = {
|
ens-general = {
|
||||||
ipv4.addresses = [
|
ipv4.addresses = [
|
||||||
{ address = "192.168.1.1"; prefixLength = 23; }
|
{ address = "192.168.1.1"; prefixLength = 23; }
|
||||||
];
|
];
|
||||||
|
ipv6.addresses = [
|
||||||
|
{ address = "2a02:88fd:f:d::2"; prefixLength = 64; }
|
||||||
|
];
|
||||||
|
ipv6.routes = [
|
||||||
|
{ address = "2a02:88fd:f:d::"; prefixLength = 64; options.metric = 100; }
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -225,9 +228,11 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
hosts = [
|
hosts = [
|
||||||
"8.8.8.8" # Google Public DNS
|
"8.8.8.8" # Google Public DNS
|
||||||
|
"2001:4860:4860::8888"
|
||||||
"youtube.com" "ads.google.com" "google.com"
|
"youtube.com" "ads.google.com" "google.com"
|
||||||
|
|
||||||
"1.1.1.1" # Cloudflare DNS
|
"1.1.1.1" # Cloudflare DNS
|
||||||
|
"2606:4700:4700::1111"
|
||||||
|
|
||||||
"twitter.com"
|
"twitter.com"
|
||||||
|
|
||||||
|
@ -245,11 +250,23 @@ in {
|
||||||
# This is cursed.
|
# This is cursed.
|
||||||
services.ndppd = {
|
services.ndppd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
proxies.ens-virginmedia.rules."2a02:88fd:f:d::/64" = {
|
proxies.ens-virginmedia = {
|
||||||
|
router = false;
|
||||||
|
rules."2a02:88fd:f:d::/64" = {
|
||||||
method = "iface";
|
method = "iface";
|
||||||
interface = "ens-general";
|
interface = "ens-general";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
networking.dhcpcd.extraConfig = ''
|
||||||
|
noipv6rs
|
||||||
|
|
||||||
|
interface ens-virginmedia
|
||||||
|
ipv6rs
|
||||||
|
iaid 1
|
||||||
|
ia_na 2
|
||||||
|
ia_pd 3 ens-general/1/64
|
||||||
|
'';
|
||||||
services.radvd = {
|
services.radvd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = ''
|
config = ''
|
||||||
|
|
Loading…
Reference in a new issue