TEst
This commit is contained in:
parent
555615203e
commit
f503574016
1 changed files with 4 additions and 4 deletions
|
@ -45,8 +45,8 @@
|
|||
ips = [ "10.100.0.1/24" ];
|
||||
listenPort = 51820;
|
||||
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'';
|
||||
postShutdown = ''${pkgs.iptables}/bin/iptables -t nat -D 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'';
|
||||
peers = [
|
||||
{ # nixos-rpi4-03
|
||||
publicKey = "trHvfNtQ7HKMiJjxEXo2Iubq5G6egjx7gHiBlDmJ5Ek=";
|
||||
|
@ -61,9 +61,9 @@
|
|||
|
||||
networking.nat = {
|
||||
enable = true;
|
||||
externalInterface = "eno3";
|
||||
internalInterfaces = [ "wireguard0" ];
|
||||
internalIPs = [ "10.100.0.0/24" ];
|
||||
externalInterface = "eno3";
|
||||
# extraCommands = ''iptables -t nat -A nixos-nat-post -d ${container.localAdress} --dport 80 -j SNAT --to-source ${container.hostAdress}'';
|
||||
forwardPorts = [
|
||||
{ sourcePort = 80; destination = "10.100.0.2:80"; }
|
||||
{ sourcePort = 443; destination = "10.100.0.2:443"; }
|
||||
|
|
Loading…
Reference in a new issue