Test
This commit is contained in:
parent
f6e979f5f1
commit
db37fd0b1d
1 changed files with 0 additions and 8 deletions
|
@ -50,13 +50,9 @@
|
||||||
listenPort = 51820;
|
listenPort = 51820;
|
||||||
privateKeyFile = "/run/secrets/wireguard_keys/osaka-vultr-01";
|
privateKeyFile = "/run/secrets/wireguard_keys/osaka-vultr-01";
|
||||||
postSetup = ''
|
postSetup = ''
|
||||||
${pkgs.iptables}/bin/iptables -A FORWARD -i wireguard0 -j ACCEPT
|
|
||||||
${pkgs.iptables}/bin/iptables -A FORWARD -o wireguard0 -j ACCEPT
|
|
||||||
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o eno3 -j MASQUERADE
|
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o eno3 -j MASQUERADE
|
||||||
'';
|
'';
|
||||||
postShutdown = ''
|
postShutdown = ''
|
||||||
${pkgs.iptables}/bin/iptables -D FORWARD -i wireguard0 -j ACCEPT
|
|
||||||
${pkgs.iptables}/bin/iptables -D FORWARD -o wireguard0 -j ACCEPT
|
|
||||||
${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -o eno3 -j MASQUERADE
|
${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -o eno3 -j MASQUERADE
|
||||||
'';
|
'';
|
||||||
peers = [
|
peers = [
|
||||||
|
@ -91,9 +87,5 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
internalInterfaces = [ "wireguard0" ];
|
internalInterfaces = [ "wireguard0" ];
|
||||||
externalInterface = "eno3";
|
externalInterface = "eno3";
|
||||||
forwardPorts = [
|
|
||||||
{ sourcePort = 80; destination = "10.100.0.2:80"; }
|
|
||||||
{ sourcePort = 443; destination = "10.100.0.2:443"; }
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
Loading…
Reference in a new issue