Skip to Content
Services and HTTPS

What a target can be

Where a Service sends its traffic, as seen from the Device that hosts it, and which addresses are refused.

A Service's target is host:port as seen from the Device that hosts the Service. That Device connects to it for every visitor, so the target can be the Device itself or a computer the Device can reach on its own network.

TargetMeans
localhost:3000a program on the hosting Device itself (its loopback, 127.0.0.1)
192.168.1.20:8123another computer on the hosting Device's LAN, such as Home Assistant
printer.lan:631a name, resolved by the hosting Device

A Web Service's target always has a port. A TCP Service's target may leave it out when the Service lists its ports.

Names and addresses

  • A name is looked up by the hosting Device, once for each connection, and the connection goes to exactly the address it found. That address must be the Device's own loopback or on one of the Device's own networks; a name that points anywhere else is refused.
  • An address written out, such as 10.20.0.5:5432, may be anywhere the hosting Device can reach, except the addresses below.

Addresses that are always refused

The hosting Device never connects to these, even when the target names them:

RangeWhat it is
169.254.0.0/16IPv4 link-local, which includes cloud metadata services such as 169.254.169.254
fe80::/10IPv6 link-local
fd00:ec2::254the IPv6 metadata service of AWS
100.64.0.0/10Device and Service addresses: a Service cannot point back into the Network
fd7a:115c:a1e0::/48Device addresses in IPv6
0.0.0.0, ::, multicast and 255.255.255.255not addresses of a single computer

The console and the API refuse a link-local, multicast or unspecified address when you save the Service ("This target address is not allowed."). The hosting Device checks every connection again, including names that resolve to one of these, and the visitor gets Service unreachable with "The Service's target is an address this Device may not reach."

Blocking metadata addresses keeps a Service on a cloud server from handing out that server's credentials to anyone who may open the Service.

Web targets speak HTTP

A Web Service connects to its target over plain HTTP, and the target is written without http://. A program that only answers HTTPS, such as a NAS's management page on port 5001, needs its HTTP port instead; or create a TCP Service for it, and the browser speaks HTTPS to the program directly.

The program receives:

  • the name the visitor used in Host, such as gitea, so the links it builds keep working;
  • X-Forwarded-For set to the visitor's Device address, with X-Forwarded-Host and X-Forwarded-Proto;
  • WebSockets and streamed responses as they are.

Any Forwarded or X-Real-IP header the visitor sent is removed. For who the visitor is, see Identity headers.

Keep the program on localhost

If the program listens only on 127.0.0.1 and the Service's target is localhost:port, the Service is the only way to reach it. A program that also listens on the LAN can be opened from the LAN without Tiltas, and without its checks.

On this page

Ask AI about this page