ETLMCPData Conveyance Works
Log in Start free
Docs

'host not allowed': why etlmcp refuses a destination's host

Why a PostgreSQL or webhook destination fails with 'host not allowed', which address ranges etlmcp refuses, and how to give it a host it will accept.

host not allowed means etlmcp would not open a connection to the host of a PostgreSQL or webhook destination, because that host does not lead only to the public internet. Before it connects, etlmcp looks the name up and checks every address that comes back. If even one of them is private, loopback, link-local or in another range that is not publicly routable, it stops without sending anything. A database or an endpoint that only exists inside your office, your home network or a private cloud network cannot be a destination as it stands: you have to give it a public address first.

Among destinations, the rule applies only to the two that connect to a host you type: PostgreSQL (the Host field) and the webhook (the host part of the URL). CSV exports have no host to check.

Where you see it

etlmcp saves a destination without looking its host up, so the error does not appear when you add one. It appears in two places:

  • The Test button. Testing a destination runs the same connection code as a sync, so a refused host comes back as the test's message, host not allowed, and nothing is written.
  • A run. The host is checked at the delivery step, after your data has been fetched and stored, so the run ends as partial with host not allowed. etlmcp treats this as a failure that waiting cannot fix, so the run is not tried again. See run statuses and retries for how that shows on the run.

Because the lookup happens on every connection, a destination that worked yesterday can start failing today if someone changes its DNS records to point at an internal address.

Which addresses are refused

The guard refuses any address that Python's ipaddress module classes as private, loopback, link-local, reserved, multicast or unspecified. That module bases its private class on the special-purpose registries of the Internet Assigned Numbers Authority. On top of that, etlmcp blocks a few ranges by name. The common ones:

Range What it is
10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 IPv4 private-use networks
127.0.0.0/8, ::1 Loopback: the machine itself
169.254.0.0/16, fe80::/10 Link-local addresses
100.64.0.0/10 Shared address space, which etlmcp blocks by name
fc00::/7 IPv6 unique-local addresses
240.0.0.0/4, multicast, the unspecified address Reserved and special-use space
64:ff9b::/96, 64:ff9b:1::/48, 2002::/16, ::/96 IPv4-IPv6 translation, 6to4 and IPv4-compatible prefixes, all blocked by name

An IPv6 address that maps an IPv4 address is judged by the IPv4 address inside it, and one further address, fd00:ec2::254, is refused outright.

Other things that trigger it

The same message covers hosts that never get as far as the range check:

  • the name does not resolve, for example a typo or a record that was only just created;
  • the Host field holds more than a bare name or address, such as a port, a user@ prefix, a slash or a space;
  • the host is a number in an unusual form, such as hexadecimal, octal or a shortened dotted address. etlmcp treats those forms as ambiguous and accepts only the ordinary four-part dotted form.

How to fix it

  1. Check the host for typos and stray characters. On PostgreSQL, the port belongs in the Port field.
  2. Look the name up yourself and check every address it returns. A name with one public record and one private record is still refused.
  3. If the database or endpoint only has a private address, give it a public one: a public IP on the server, your cloud provider's public endpoint for the database, or a public load balancer in front of the webhook receiver.
  4. Restrict who can reach that public address. If your firewall allows connections by address, the destinations page in the app shows the address etlmcp connects from, when the server has one set.
  5. Press Test again before the next sync.

A webhook cannot get around the rule with a redirect. etlmcp does not follow redirects; a 3xx answer fails the delivery with webhook redirected. It also connects to the address it checked rather than looking the name up a second time, while still verifying your TLS certificate against the host name.

For the rest of each destination's setup and messages, see PostgreSQL, PostgreSQL errors and webhooks.

Related

Sources

  1. IPv4 Special-Purpose Address Space — www.iana.org, checked
  2. IPv6 Special-Purpose Address Space — www.iana.org, checked
  3. ipaddress — IPv4/IPv6 manipulation library — docs.python.org, checked