Route IPv6 via Wireguard
This commit is contained in:
parent
ef69519de7
commit
156d8b04e5
@ -79,6 +79,9 @@ in
|
||||
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o ${
|
||||
config.systemd.network.networks."24-home".name
|
||||
} -j MASQUERADE
|
||||
ip6tables -t nat -A POSTROUTING -s fd00::0/128 -o ${
|
||||
config.systemd.network.networks."24-home".name
|
||||
} -j MASQUERADE
|
||||
'';
|
||||
};
|
||||
|
||||
@ -96,12 +99,18 @@ in
|
||||
# panacea
|
||||
{
|
||||
PublicKey = "XMkTztU2Y8hw6Fu/2o4Gszij+EmNacvFMXuZyHS1n38=";
|
||||
AllowedIPs = [ "10.8.0.2/32" ];
|
||||
AllowedIPs = [
|
||||
"10.8.0.2/32"
|
||||
"fd00::2/128"
|
||||
];
|
||||
}
|
||||
# caravanserai
|
||||
{
|
||||
PublicKey = "mCsTj09H7lfDDs8vMQkJOlItHtHQ6MPUyfGO5ZjBbVs=";
|
||||
AllowedIPs = [ "10.8.0.3/32" ];
|
||||
AllowedIPs = [
|
||||
"10.8.0.3/32"
|
||||
"fd00::3/128"
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
@ -109,8 +118,12 @@ in
|
||||
systemd.network.networks."wg0" = {
|
||||
matchConfig.Name = "wg0";
|
||||
networkConfig = {
|
||||
Address = "10.8.0.1/24";
|
||||
Address = [
|
||||
"10.8.0.1/24"
|
||||
"fd00::1/128"
|
||||
];
|
||||
IPv4Forwarding = true;
|
||||
IPv6Forwarding = true;
|
||||
};
|
||||
};
|
||||
|
||||
@ -126,6 +139,8 @@ in
|
||||
"127.0.0.1"
|
||||
"192.168.128.2"
|
||||
"10.8.0.1"
|
||||
"::1"
|
||||
"fd00::1"
|
||||
];
|
||||
bind-interfaces = true;
|
||||
server = [ "127.0.0.1#43" ];
|
||||
@ -135,8 +150,6 @@ in
|
||||
|
||||
conf-file = "${pkgs.dnsmasq}/share/dnsmasq/trust-anchors.conf";
|
||||
dnssec = false;
|
||||
|
||||
address = "/coolneng.duckdns.org/192.168.128.2";
|
||||
};
|
||||
};
|
||||
|
||||
@ -145,7 +158,10 @@ in
|
||||
enable = true;
|
||||
upstreamDefaults = true;
|
||||
settings = {
|
||||
listen_addresses = [ "127.0.0.1:43" ];
|
||||
listen_addresses = [
|
||||
"127.0.0.1:43"
|
||||
"[::1]:43"
|
||||
];
|
||||
sources.public-resolvers = {
|
||||
urls = [ "https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md" ];
|
||||
cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md";
|
||||
|
Loading…
Reference in New Issue
Block a user