[ns1] start wireguard on ns1
also add fallback dns to all vpn clients
This commit is contained in:
@@ -72,7 +72,7 @@ in
|
||||
mtu = 1340; #seems to be necessary to proxypass nginx traffic through vpn
|
||||
address = [ "${myPeer.address}/24" ];
|
||||
autostart = cfg.autostart;
|
||||
dns = [peers.ns1.address];
|
||||
dns = [peers.ns1.address "1.1.1.1"];
|
||||
listenPort = mkIf (myPeer.role == "server") myPeer.listenPort;
|
||||
|
||||
# This allows the wireguard server to route your traffic to the internet and hence be like a VPN
|
||||
|
||||
@@ -17,6 +17,7 @@ in
|
||||
../modules/sshd.nix
|
||||
../modules/minimal_tools.nix
|
||||
../modules/autoupdate.nix
|
||||
inputs.self.nixosModules.malobeo.vpn
|
||||
];
|
||||
|
||||
networking.firewall = {
|
||||
@@ -25,6 +26,14 @@ in
|
||||
allowedUDPPorts = [ 53 ];
|
||||
};
|
||||
|
||||
sops.defaultSopsFile = ./secrets.yaml;
|
||||
sops.secrets.wg_private = {};
|
||||
services.malobeo.vpn = {
|
||||
enable = true;
|
||||
name = "ns1";
|
||||
privateKeyFile = config.sops.secrets.wg_private.path;
|
||||
};
|
||||
|
||||
services.bind = {
|
||||
enable = true;
|
||||
forwarders = [
|
||||
|
||||
Reference in New Issue
Block a user