InnerWeb
Skip to main content

Alarm webhook in a network with no outbound traffic

A plant on-premise whose firewall blocks all outbound traffic from the application host does not have to open any port for an alarm to reach the duty officer. It is enough to reverse the direction of the connection: the application stores the webhook in a table, and an external poller collects the entries over an inbound channel. Below is a step-by-step rollout scenario, with the limits you need to know before you start.

89
entries in one poller batch
Source: karta
300 s
after this time the reservation returns to the pool
Source: karta
4
places in the system that send webhooks
Source: karta

Starting point: an alarm that never leaves the server

This concept applies to a production plant where the InnerWeb system runs on a server inside the plant network, and the IT department applies a default-deny policy to outbound traffic. The application host is not allowed to connect to any address on the internet or on any external network. This is a sound security policy, but it has a side effect on integrations.

A webhook sent directly from the application server requires an outbound connection to the recipient. On a network with such a block, that connection times out and the message is lost. For an informational webhook this is a nuisance. For an alarm webhook, for example about a worker who has not moved for too long, it is a gap in the response chain: the system knows about the event, but the duty officer never hears about it.

This exact case is why outbox mode was created. The mode was built for on-premise installations where the client network blocks all outbound traffic from the application host, and an alarm webhook sent directly was being lost.

The fix: reversing the direction of the connection

In outbox mode the application sends nothing on its own. It writes the webhook body to a table, and an external poller, running as an n8n workflow, collects the entries and forwards them with the same payload. The final recipient receives exactly the JSON it would have received with direct delivery, so nothing changes on its side.

What matters is who opens the connection. The poller connects to the application over an inbound channel, fetches a batch of entries, sends them to the recipients and confirms delivery. For the plant firewall this means only inbound traffic to the application, which every panel user already requires. The network administrator does not have to open anything in the outbound direction.

Where the webhooks come from

Webhooks leave the system from four places: work permit approvals, tasks, the no-movement alarm and rule automation actions. All of them write their result to the same table, so a single poller handles the whole event stream and not four separate integrations.

Limits of the outbox mechanism

Limits of the outbox mechanismHorizontal bar chart: 89 entries per batch, 300 seconds until the reservation is returned, 4 source places for webhooks.0100200300valueEntries in a batchEntries in a batch: 89 value89Seconds until the reservationis returnedSeconds until the reservation is returned: 300 value300Source places for webhooksSource places for webhooks: 4 value4
Source: Description of the Webhook Outbox feature (product documentation)

Step-by-step rollout scenario

The order below is a concept for a plant of the type described above. Each step can be closed with its own piece of evidence, which makes the handover to the IT department easier.

  • Step 1: the application administrator switches the webhook delivery mode from direct to outbox. Any value other than outbox is treated as direct, so a typo in the setting silently brings back direct delivery; after the change, verify it with a test event.
  • Step 2: the IT department creates a technical account for the poller and hands it over to the integrator (permission details are in a separate document on the technical account).
  • Step 3: the integrator runs the n8n workflow in a network segment that can reach the application and is also allowed to connect to the alarm recipient.
  • Step 4: trigger a test no-movement alarm and watch the entry: it appears as pending, the poller reserves it, sends it and confirms it as delivered.
  • Step 5: a negative test, meaning the poller is stopped for a few minutes; check that entries wait in the table and are delivered once the poller starts again.

What the mechanism guarantees and what it does not

Fetching pending entries reserves a batch of up to 89 entries atomically, under a write lock in a transaction. Two pollers therefore cannot take the same entry, and an alarm does not ring twice. An entry in the delivering state whose reservation lasts longer than 300 seconds returns to the pool and can be fetched again. This is a safeguard in case the poller crashes in the middle of its work.

The delivery acknowledgement accepts the status delivered or failed with an optional error description, and it is idempotent: acknowledging an entry that is already delivered changes nothing. A failed acknowledgement returns the entry to the pending state and increases the attempt counter, so the poller retries it without limit.

This last point has a second side that has to be stated openly. There is no retry limit, no delay between retries and no alert for stuck entries, and finished entries pile up in the table without a cleanup job. In the rollout, these functions must be replaced with a procedure: monitoring the number of pending entries and a periodic review of the table by the administrator.

Effect and conclusions for the plant

The effect is twofold. For network security: the firewall stays unchanged, and an auditor can see that the integration did not require an exception to the policy. For people's safety: an alarm that used to be lost at the network boundary reaches the duty officer, and the history of attempts is kept in the table.

There is one condition: the poller has to keep running. Choosing outbox means moving responsibility from the application to a component that someone must supervise. In practice this is a task for IT: monitoring the workflow, an alert when nothing is being collected, and a clearly named owner.

Video

Frequently asked questions

Does the network administrator have to open any outbound port?

No. The poller opens the connection to the application over an inbound channel, so the firewall needs no exception for outbound traffic from the application host. The poller does need access to the final recipient from its own network segment.

What happens when the poller stops working?

Entries wait in the table as pending. A reservation older than 300 seconds returns to the pool, so once the poller is running again the events will be delivered. There is no automatic alert for a stall, so IT needs monitoring.

Will the recipient see a different format than with direct delivery?

No. The poller sends the same payload that was stored in the table, so the recipient needs no changes.

A plant with outbound traffic blocked?

Tell us about your network. We will show how to deliver alarm webhooks without changing the firewall.

Let's talk