mirror of
https://github.com/MagicBOTAlex/nixos-server.git
synced 2026-05-06 18:12:30 +02:00
sync
This commit is contained in:
parent
38d26110e1
commit
f2bb1de7d8
15 changed files with 505 additions and 87 deletions
35
vms/kube-daddy/wg-snorre.nix
Normal file
35
vms/kube-daddy/wg-snorre.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
networking.wg-quick.interfaces = {
|
||||
wg0 = {
|
||||
# The local IP address for this interface
|
||||
address = [ "10.13.13.3/32" ];
|
||||
|
||||
# The DNS server to use when the tunnel is active
|
||||
dns = [ "10.0.101.1" ];
|
||||
|
||||
# The port to listen on
|
||||
listenPort = 51820;
|
||||
|
||||
# Path to the private key file (using age for security)
|
||||
privateKeyFile = "/root/wg/priv.key";
|
||||
|
||||
peers = [
|
||||
{
|
||||
# The public key of the remote peer
|
||||
publicKey = "QD36zS9c4IWYzqPAjP88hX9nx4wWJ9thB9YlO6vCtzo=";
|
||||
|
||||
# Path to the preshared key file (security best practice)
|
||||
presharedKeyFile = "/root/wg/pre.key";
|
||||
|
||||
# The remote endpoint and port
|
||||
endpoint = "37.49.130.171:51820";
|
||||
|
||||
# Traffic to route through the tunnel (0.0.0.0/0 sends everything)
|
||||
allowedIPs = [ "0.0.0.0/0" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue