configure port forwarding

This commit is contained in:
Ingolf Wagner 2022-09-11 10:39:35 +02:00
parent ba822b5b8b
commit 14530a926c
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B

View file

@ -138,6 +138,15 @@ in
# notify me when download finished
script-torrent-done-enabled = true;
script-torrent-done-filename = completionScript;
# Encryption preference.
# 0 = Prefer unencrypted connections,
# 1 = Prefer encrypted connections,
# 2 = Require encrypted connections;
# default = 1
# Encryption may help get around some ISP filtering, but at the cost of slightly
# higher CPU use
encryption = 2;
};
};
@ -168,6 +177,13 @@ in
networking.nat.enable = true;
networking.nat.internalInterfaces = [ "ve-torrent" ];
networking.nat.externalInterface = hostInterface;
networking.nat.forwardPorts = [
{ destination = "${containerAddress}:51413"; proto = "tcp"; sourcePort = 51413; }
];
networking.firewall = {
allowedTCPPorts = [ 51413 ];
allowedUDPPorts = [ 51413 ];
};
# host nginx setup
# ----------------