summaryrefslogtreecommitdiff
path: root/host/software
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-07-12 21:10:02 +0200
committerAdrian Kummerlaender2019-07-12 21:10:02 +0200
commit5e0bcefa419499f9c7b89c242c25e7a4ef6da18f (patch)
tree8a98dab363c35d717cc9977e70b011d24df074a5 /host/software
parent6f1d37ce028153d5348363c472ccc8fdd1b64ee5 (diff)
downloadnixos_system-5e0bcefa419499f9c7b89c242c25e7a4ef6da18f.tar
nixos_system-5e0bcefa419499f9c7b89c242c25e7a4ef6da18f.tar.gz
nixos_system-5e0bcefa419499f9c7b89c242c25e7a4ef6da18f.tar.bz2
nixos_system-5e0bcefa419499f9c7b89c242c25e7a4ef6da18f.tar.lz
nixos_system-5e0bcefa419499f9c7b89c242c25e7a4ef6da18f.tar.xz
nixos_system-5e0bcefa419499f9c7b89c242c25e7a4ef6da18f.tar.zst
nixos_system-5e0bcefa419499f9c7b89c242c25e7a4ef6da18f.zip
Enable NAT for wireguard server
Diffstat (limited to 'host/software')
-rw-r--r--host/software/server/wireguard.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/host/software/server/wireguard.nix b/host/software/server/wireguard.nix
index 21bf12a..cc4f2fa 100644
--- a/host/software/server/wireguard.nix
+++ b/host/software/server/wireguard.nix
@@ -3,6 +3,8 @@
allowedUDPPorts = [ 54321 ];
};
+ networking.nat.enable = true;
+
networking.wireguard.interfaces = {
wg0 = {
ips = [ "10.100.0.1/24" ];
@@ -14,15 +16,15 @@
peers = [
{ # obelix
publicKey = "RrsNZKZ17Ol1WHxZesLnenGKnqxiQlE0T8xFP6/5mBE=";
- allowedIPs = [ "10.100.0.2/32" ];
+ allowedIPs = [ "10.100.0.2" ];
}
{ # majestix
publicKey = "Tkoaewh9HB5rIuJVrFgClRF4x7prOtIlSJjiTYCpxis=";
- allowedIPs = [ "10.100.0.3/32" ];
+ allowedIPs = [ "10.100.0.3" ];
}
{ # athena
publicKey = "t4SzRV/olVdzAKauJOwFau3I0fTISUvbOAaKGZd6ezU=";
- allowedIPs = [ "10.100.0.4/32" ];
+ allowedIPs = [ "10.100.0.4" ];
}
];
};