From c0e8c99380400a1ef4afc35d97643a0750d8294a Mon Sep 17 00:00:00 2001 From: lub Date: Sun, 15 Sep 2019 12:47:30 +0200 Subject: [PATCH] use $nat.protocol instead of hardcoded tcp --- example.yml | 2 +- expose_forwards.ps1 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example.yml b/example.yml index 91fac6c..1f3bb25 100644 --- a/example.yml +++ b/example.yml @@ -58,7 +58,7 @@ services: - "/gluster/docker/imninja_synapse/data/:/data/" ports: - "145.239.119.128:8448:8448" - - "145.239.119.128:42933:443" + - "145.239.119.128:42933:443/udp" networks: - homeserver - database diff --git a/expose_forwards.ps1 b/expose_forwards.ps1 index b7661ff..da2cf4d 100644 --- a/expose_forwards.ps1 +++ b/expose_forwards.ps1 @@ -160,8 +160,8 @@ foreach($yaml in (Get-ChildItem -Path $Stacks -Include '*.yml','*.yaml' -Recurse Write-Output ('Add rule for {0}:{1}' -f $nat.ip,$nat.port) $rule = @( - '-p','tcp' - '-m','tcp' + '-p',$nat.protocol + '-m',$nat.protocol '--destination',$nat.ip '--dport',$nat.port '-j','DNAT'