chore: change wireguard subnet to avoid conflicts

This commit is contained in:
Ivan R. 2024-05-13 21:39:10 +05:00
parent de591bd560
commit f6eb3806a7
No known key found for this signature in database
GPG key ID: 56C7BAAE859B302C
4 changed files with 10 additions and 10 deletions

View file

@ -8,15 +8,15 @@
interface = "0.0.0.0";
access-control = [
"192.168.0.0/24 allow"
"10.100.0.0/24 allow"
"10.101.0.0/24 allow"
];
local-zone = [
"\"pp.comfycamp.space\" static"
"\"vault.comfycamp.space\" static"
];
local-data = [
"\"pp.comfycamp.space IN A 10.100.0.1\""
"\"vault.comfycamp.space IN A 10.100.0.1\""
"\"pp.comfycamp.space IN A 10.101.0.1\""
"\"vault.comfycamp.space IN A 10.101.0.1\""
];
};
forward-zone = [

View file

@ -7,14 +7,14 @@
};
networking.wireguard.interfaces.wg0 = {
ips = ["10.100.0.1/24" ];
ips = ["10.101.0.1/24" ];
listenPort = 51820;
postSetup = ''
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o enp7s0 -j MASQUERADE
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.101.0.0/24 -o enp7s0 -j MASQUERADE
'';
postShutdown = ''
${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -o enp7s0 -j MASQUERADE
${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.101.0.0/24 -o enp7s0 -j MASQUERADE
'';
privateKeyFile = "/var/lib/wireguard/privkey";
@ -23,12 +23,12 @@
{
# laptop
publicKey = "awAVP/tkl0Z9PKEMTABjIXhblWSGHhIvYjBFp3C7YUk=";
allowedIPs = [ "10.100.0.2/32" ];
allowedIPs = [ "10.101.0.2/32" ];
}
{
# phone
publicKey = "zPUl9jrC8dFaPWKk92btHptEzr09KNgGbdwSfiT7rEM=";
allowedIPs = [ "10.100.0.3/32" ];
allowedIPs = [ "10.101.0.3/32" ];
}
];
};

View file

@ -26,7 +26,7 @@
useACMEHost = "comfycamp.space";
forceSSL = true;
listenAddresses = [
"10.100.0.1"
"10.101.0.1"
];
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.photoprism.port}";

View file

@ -28,7 +28,7 @@
useACMEHost = "comfycamp.space";
forceSSL = true;
listenAddresses = [
"10.100.0.1"
"10.101.0.1"
];
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.vaultwarden.config.ROCKET_PORT}";