Unverified Commit 8102578c authored by Thomas Ritter's avatar Thomas Ritter Committed by GitHub
Browse files

fix: Add MASQUERADE rule for bridge (#969)

parent ef179be6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -558,6 +558,10 @@ configureNAT() {
    warn "$tables" && return 1
  fi

  if ! iptables -t nat -A POSTROUTING -o "$VM_NET_BRIDGE" -j MASQUERADE; then
    warn "$tables" && return 1
  fi

  # shellcheck disable=SC2086
  if ! iptables -t nat -A PREROUTING -i "$VM_NET_DEV" -d "$IP" -p tcp${exclude} -j DNAT --to "$ip"; then
    warn "failed to configure IP tables!" && return 1