test
This commit is contained in:
parent
10ba12e184
commit
de9d09362e
1 changed files with 3 additions and 1 deletions
|
@ -49,11 +49,13 @@
|
|||
postSetup = ''
|
||||
${pkgs.iptables}/bin/iptables -A FORWARD -i %i -j ACCEPT
|
||||
${pkgs.iptables}/bin/iptables -A FORWARD -o %i -j ACCEPT
|
||||
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -d 10.100.0.2 -o eno3 -p udp -m tcp --dport 80 -j MASQUERADE
|
||||
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o eno3 -j MASQUERADE
|
||||
'';
|
||||
postShutdown = ''
|
||||
${pkgs.iptables}/bin/iptables -D FORWARD -i %i -j ACCEPT
|
||||
${pkgs.iptables}/bin/iptables -D FORWARD -o %i -j ACCEPT
|
||||
${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -d 10.100.0.2 -o eno3 -p udp -m tcp --dport 80 -j MASQUERADE
|
||||
${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -o eno3 -j MASQUERADE
|
||||
'';
|
||||
# Testing
|
||||
|
@ -75,9 +77,9 @@
|
|||
internalInterfaces = [ "wireguard0" ];
|
||||
forwardPorts = [
|
||||
{
|
||||
sourcePort = 80;
|
||||
destination = "10.100.0.2:80";
|
||||
proto = "tcp";
|
||||
sourcePort = 80;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue