diff options
author | Adrian Kummerlaender | 2019-07-12 21:10:02 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2019-07-12 21:10:02 +0200 |
commit | 5e0bcefa419499f9c7b89c242c25e7a4ef6da18f (patch) | |
tree | 8a98dab363c35d717cc9977e70b011d24df074a5 /host | |
parent | 6f1d37ce028153d5348363c472ccc8fdd1b64ee5 (diff) | |
download | nixos_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')
-rw-r--r-- | host/software/server/wireguard.nix | 8 |
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" ]; } ]; }; |