IMD SolutionComputing LibraryShop main store

Troubleshooting

Which firewall port a Node-RED HTTP request needs

Edge computing and IIoT Published 5 min read By IMD Solution engineering team

Short answer

The destination port comes from the API URL, not from the node name: an http URL is outbound TCP port 80, an https URL is outbound TCP 443, and a port written in the URL is the port to permit. When the same flow reaches the API from one network but not another, the failing network's outbound firewall policy is the first check; the IOT2050's Example Image ships with no firewall activated.

On this page
  1. Read the port out of the API URL
  2. Confirm which side is blocking
  3. Prove it from the device before asking for a rule
  4. Hand the network owner a complete request
  5. Port 1880 is a different question
  6. Retest and close it out
  7. Questions asked

A Node-RED HTTP request node has no port of its own: the destination port is whatever the API URL says. When the identical flow, device and URL reach the API from one network and fail on another, the failing network's outbound firewall policy is the thing to change — not the flow, and not the device. An IOT2050 Advanced on Example Image 1.2.2 makes that even clearer, because that image activates no firewall of its own by default. Read the port out of the URL, confirm the network is the blocker, and hand the network owner one scoped rule.

Read the port out of the API URL #

The HTTP request node sends to the host, port and path written in its URL field, over TCP. The URL grammar is scheme://host:port/path: when no port is written, the scheme supplies the default; when a number is written after the host, that number wins. So the answer to "is it only the TLS port?" is: only when the URL says https. A plain http URL uses the other default, and a written port replaces either one.

API URL in the HTTP request node Destination port to permit
http://api.plantdata.example/telemetry TCP 80
https://api.plantdata.example/telemetry TCP 443
https://api.plantdata.example:8443/v1/telemetry TCP 8443

One permit admits TCP to that destination port, whatever rides inside it: TLS on that port can carry more than HTTPS, and MQTT to a cloud broker over TLS then needs ALPN, as explained in why MQTT over TLS to a cloud needs ALPN.

Worked example: read one URL, write one rule #

A flow on an IOT2050 Advanced posts a JSON payload to an API through an HTTP request node. Take the example URL https://api.plantdata.example:8443/v1/telemetry — an example address, not a real endpoint.

  1. Split the URL: scheme https, host api.plantdata.example, port written after the host 8443, path /v1/telemetry.
  2. Apply the precedence rule — a written port beats the scheme default: the scheme's default would be 443, the URL writes 8443, so the connection targets 8443, and a permit for the default alone would not carry this request.
  3. The egress permit is therefore: protocol TCP, source the device's address, destination the API host's address, destination port 8443.

The same flow with the port removed from the URL would fall back to the scheme default, and the table above gives that number. One URL, one permit; nothing else on the firewall needs to move.

Confirm which side is blocking #

The failure itself narrows the suspect list before anyone touches a firewall. The same flow, the same device and the same URL reach the API from a second network: that proves the application side and proves the API answers from outside the first network, so the only variable left is the network the device now sits on. Two checks keep the conclusion honest:

  • The device's own firewall. Example Image 1.2.2 activates no firewall by default, so an unmodified device does not drop its own outbound requests. Confirm nobody has enabled one on the device since it was flashed.
  • Where the API lives. An API reachable only inside the first network's intranet fails on every other network for routing reasons, not egress policy. The second working network rules this out only if it sits outside that first network — verify that before blaming the firewall.

Prove it from the device before asking for a rule #

Run the proof from the device itself; each step either clears the device or produces the evidence the network owner needs.

  1. Resolve the API hostname from the device. A name that does not resolve fails before any firewall is consulted, and the fix is DNS, not a rule.
  2. Open a TCP connection from the device to the API host on the destination port from the table, and watch how it fails.
  3. A silent drop leaves the attempt hanging until it times out; an explicit refusal comes back at once as a connection refused. Timeouts point at a stateful drop on the egress path, refusals at a reject rule or a host with nothing listening on that port.
  4. Repeat the two steps on the network where the flow works. The contrast between the two failure modes is the evidence you bring to the review.

If the device offers no shell, run the same test from a PC on the same segment behind the same egress path: per-host and per-subnet rules can differ, so a laptop on the office LAN proves nothing about the plant network.

Hand the network owner a complete request #

A rule request that arrives complete gets granted correctly on the first pass. State all of it:

  • direction: outbound, from the device's address;
  • protocol: TCP;
  • destination: the API host's address, on the destination port read from the URL;
  • justification: the flow posting production JSON to that API, and the second network where the identical flow already works.

Keep every permit scoped to one device, one destination and one port; an unrestricted outbound allowance quietly undoes the segmentation the plant firewall exists for. Because each permit widens the egress surface, record the flow — source, destination, port, owner — in the plant's written network policy; the page on process isolation responsibilities that follow written policy covers how that ownership is assigned. The same permit-per-flow review is what produces the outbound firewall ports for a plant remote access modem.

Port 1880 is a different question #

Do not open the editor port because of this failure. Port 1880 is where Node-RED itself listens — the editor and any HTTP in endpoints — and that traffic is inbound toward the device, the opposite direction from this node's outbound call, so opening it changes nothing here. For the other direction, reaching Node-RED's own server, see why Node-RED on an IOT2050 reports its editor port in use.

Retest and close it out #

When the rule is in place, rerun the flow unchanged: same URL, same payload, same node. Success is the API's own response status appearing in the debug sidebar, not merely the absence of an error; a confirmed acceptance on the API side is the only proof that counts. If it still fails, re-read the URL for a written port, and check whether the API host resolves to several addresses — a permit pinned to one address can miss the address the device actually lands on.

The decision, case by case: an http URL needs an outbound TCP permit for the default HTTP port, an https URL needs the TLS default, and a written port needs that exact number. Read the port from the URL, permit it once, and leave the flow and the device untouched.

Questions asked

Which port does a Node-RED HTTP request node actually use?

Whichever the API URL names. A plain http URL connects on outbound TCP port 80, an https URL on TCP 443, and a port written after a colon in the URL replaces the default — permit exactly that destination port. Opening the wrong one leaves the request timing out, which looks identical to an API outage.

Do I need to open port 1880 for the HTTP request node?

No. Node-RED itself listens on port 1880 for the editor and for HTTP in endpoints, and that is inbound traffic toward the device; an HTTP request node only makes outbound connections, so that port plays no part in them. Permit it only for the people or monitoring systems that must reach the editor, and keep that permit inbound and narrow.

The same flow works on one network and fails on another — is the device the problem?

Almost never, once a second network succeeds. The unchanged flow, device and URL prove the application side and prove the API answers from outside the first network; the remaining variable is the failing network's egress policy — or, less likely, a device firewall someone enabled after flashing, on an image that activates none by default. Keep the flow frozen during the review: a changed URL invalidates the evidence.

What does the node show when the firewall blocks the request?

A connection-level error in the debug sidebar, not an HTTP status: the request never completed, so no status code exists. A silently dropped egress shows up as a connect timeout; an explicit reject shows as connection refused. Capture the error text together with the device address, the API hostname and the destination port, and attach it to the rule request.

Keep reading

  • Explainer

    Why Node-RED needs no certificates for a Talk2m HTTPS API

    None. The HTTP Request node runs TLS because the URL is https, and an empty TLS configuration field leaves the runtime to negotiate the protocol version and validate the server chain against its built-in trust store. Talk2m dropped TLS 1.0 and 1.1 from its production servers, so your working request already proves the handshake succeeds; fill the certificate slots only when an actual error names a trust or client-authentication failure.

    Edge computing and IIoT

  • Troubleshooting

    Why a Node-RED HTTP page returns 404 on a groov EPIC

    The 404 is a URL routing error, not a node or firewall fault: on a groov EPIC, Node-RED and every page it serves are reached through the controller's HTTPS route on port 443, with the dashboard at /node-red/ui/ and its final slash required. Nothing listens externally on port 1880, so a firewall rule opened for that port forwards to no service and should be removed.

    Edge computing and IIoT

  • Troubleshooting

    Why MQTT over port 443 to a cloud needs ALPN

    AWS IoT Core accepts MQTT with TLS client authentication on port 443 only when the client sends the ALPN protocol name during the TLS handshake. An edge gateway whose MQTT interface has no ALPN setting cannot use 443, so keep outbound 8883 and scope the firewall rule to the gateway's source IP instead of enumerating the AWS address pool.

    Edge computing and IIoT

Why Kepware to ThingWorx uses AlwaysOn, not the firewall rule