Unverified Commit 2e1da4b4 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

feat: Use iptables multiport extension (#1030)

parent 7089e2f1
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -555,7 +555,11 @@ configureNAT() {
  exclude=$(getHostPorts)

  if [ -n "$exclude" ]; then
    exclude=" ! --dport ${exclude//,/ ! --dport }"
    if [[ "$exclude" != *","* ]]; then
      exclude=" ! --dport $exclude"
    else
      exclude=" -m multiport ! --dports $exclude"
    fi
  fi

  if ! iptables -t nat -A POSTROUTING -o "$VM_NET_DEV" -j MASQUERADE > /dev/null 2>&1; then