configure port forwarding
This commit is contained in:
parent
ba822b5b8b
commit
14530a926c
1 changed files with 16 additions and 0 deletions
|
@ -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
|
||||
# ----------------
|
||||
|
|
Loading…
Reference in a new issue