Test
This commit is contained in:
parent
f503574016
commit
92a489bf42
1 changed files with 3 additions and 3 deletions
|
@ -45,8 +45,8 @@
|
||||||
ips = [ "10.100.0.1/24" ];
|
ips = [ "10.100.0.1/24" ];
|
||||||
listenPort = 51820;
|
listenPort = 51820;
|
||||||
privateKeyFile = "/run/secrets/wireguard_keys/osaka-vultr-01";
|
privateKeyFile = "/run/secrets/wireguard_keys/osaka-vultr-01";
|
||||||
# postSetup = ''${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o eno3 -j MASQUERADE'';
|
postSetup = ''${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o eno3 -j MASQUERADE'';
|
||||||
# postShutdown = ''${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -o eno3 -j MASQUERADE'';
|
postShutdown = ''${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -o eno3 -j MASQUERADE'';
|
||||||
peers = [
|
peers = [
|
||||||
{ # nixos-rpi4-03
|
{ # nixos-rpi4-03
|
||||||
publicKey = "trHvfNtQ7HKMiJjxEXo2Iubq5G6egjx7gHiBlDmJ5Ek=";
|
publicKey = "trHvfNtQ7HKMiJjxEXo2Iubq5G6egjx7gHiBlDmJ5Ek=";
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
internalInterfaces = [ "wireguard0" ];
|
internalInterfaces = [ "wireguard0" ];
|
||||||
externalInterface = "eno3";
|
externalInterface = "eno3";
|
||||||
# extraCommands = ''iptables -t nat -A nixos-nat-post -d ${container.localAdress} --dport 80 -j SNAT --to-source ${container.hostAdress}'';
|
extraCommands = ''iptables -t nat -A nixos-nat-post -d 10.100.0.2 --dport 80 -j SNAT --to-source 10.100.0.1'';
|
||||||
forwardPorts = [
|
forwardPorts = [
|
||||||
{ sourcePort = 80; destination = "10.100.0.2:80"; }
|
{ sourcePort = 80; destination = "10.100.0.2:80"; }
|
||||||
{ sourcePort = 443; destination = "10.100.0.2:443"; }
|
{ sourcePort = 443; destination = "10.100.0.2:443"; }
|
||||||
|
|
Loading…
Add table
Reference in a new issue