skip to content

A batch job in a subnet with no internet route must call partner APIs without ever being reachable — what do you add?

level: juniorimportance: must knowfreq 72%

answer

  1. two things, not one
  2. an address is not a path
  3. the default route names the exit
  4. translation happens on the way out
  5. no entry means no inbound delivery

basics

~20 s

Two things: a default route on that subnet naming an address-translating gateway, and the gateway itself on the routed side. Outbound flows leave translated; unsolicited inbound packets match no translation entry, so nothing outside can open a connection.

solid answer

~40 s

Reachability here is the sum of three separate decisions — the address the workload holds, the route its subnet uses, and the filter applied to the flow — and outbound-only is what you get when the first two are set one particular way. Leave the batch job holding a private address only. Place an address-translating gateway in a subnet that is itself routed toward the network's internet-facing attachment, then add a default route in the batch job's subnet whose target is that gateway. Flows the job starts are rewritten to the gateway's public source address and recorded, so the replies find their way back. Nothing outside can start a flow, because there is no recorded entry to deliver it to and no route that would carry a reply from a private address.

go deeper

for a junior

Recall the pair: a default route in the private subnet, and an address-translating gateway sitting on the routed side. Be able to say why the workload keeps only a private address.

for a middle

Explain the one-directional property mechanically: translation entries are created by flows starting inside, so an unsolicited inbound packet matches nothing and is discarded. Distinguish address, route and filter as three switches.

for a senior

Show you would check the gateway's own subnet has an outward route, and that you treat the shared gateway as a sized chokepoint rather than an always-available utility.

for a principal

Frame it as a standard: private by default, one documented egress path per environment, and an explicit owner for the small set of addresses the outside world sees your estate as.

## Reachability is three separate switches On a shared platform your workloads sit in a private address range you allocated, and whether one of them can talk outward, or be talked to, is decided by three independent mechanisms that people routinely collapse into one: - **The address it holds.** A private address is not routable on the public internet. A public address is — but holding one is an attribute, not a path. - **The route its subnet uses.** A route table says, for each destination prefix, which door a packet leaves by. With no matching route the packet is discarded inside your own network no matter what address it carries. - **The filter applied to the flow.** A separate permit-or-deny decision, evaluated independently of routing. **Outbound-only reachability** is the deliberate combination: private address, a route to a translating device, and permits only for the flows the workload starts. It is a positive construction, not the absence of configuration. ## The two pieces you add 1. **An address-translating gateway.** A managed device that rewrites the source address of flows leaving your network onto a public address it owns, and records an entry per flow so the reply can be mapped back to the workload that sent it. It must itself sit on the routed side — in a subnet whose own table carries a default route toward the network's internet-facing attachment. A gateway placed in an unrouted subnet translates into a dead end. 2. **A default route naming it.** In the batch job's subnet, an entry whose destination covers everything not matched by a more specific route, and whose target is that gateway. Creating the device attracts nothing on its own; the route is what sends traffic to it. | piece | what it does | symptom when it is missing | |---|---|---| | translating gateway | gives outbound flows a routable source address and remembers them | replies have no way back to a private address | | default route naming it | sends every unmatched destination to that gateway | traffic never leaves the subnet at all | | routed subnet beneath the gateway | carries the translated flow to the internet-facing attachment | the gateway receives traffic and has nowhere to forward it | ## Why inbound cannot piggyback on this The gateway's translation entries are created **only** by flows that start inside. An unsolicited packet arriving from outside carries a destination of the gateway's public address and some port, and the gateway has no entry mapping that pair to an inside workload — so it has nothing to deliver to and discards it. The one-directional property therefore comes from the **absence of state**, not from a rule someone wrote. That is why this shape is popular for a batch job that must call partner APIs: there is no rule to get wrong, and no inbound surface to defend. ## What it does not give you - **It is not authorization.** A path to the partner is not permission to call the partner; the partner still authenticates you, and your own filtering still decides which flows may start. - **It is not a filter.** The gateway permits whatever your filtering allowed out. Restricting which destinations the job may reach is a separate decision on a separate mechanism. - **It is not free of shared fate.** Every private subnet pointed at one gateway funnels its outbound traffic through one device, which becomes a chokepoint you have to size and place deliberately. - **It says nothing about the address the partner sees** beyond the fact that it is the gateway's. Whether that address is stable across rebuilds is a separate choice you have to make explicitly. ## Where this goes wrong in review - Someone gives the workload a public address to make the outbound call work. It works — and now the workload is addressable from the internet, which was the thing being avoided. - Someone creates the gateway and stops, because the console shows it as available. Without the route, nothing changes. - Someone points the route at a gateway sitting in a subnet that has no route of its own toward the internet-facing attachment; traffic reaches the gateway and dies there. - Someone assumes outbound works by default. Platforms differ here, and some default tables are deliberately bare: assume nothing leaves until a route says so. The short version an interviewer wants: name the **route** and the **translating gateway** as two separate things, and explain the one-directional property as a consequence of who creates the translation state.

  • What has to be true about the subnet the translating gateway itself sits in?
    Its own route table must carry a default route toward the network's internet-facing attachment. A gateway in a subnet with no outward route still receives the traffic you send it and then has nowhere to forward it, so the symptom looks identical to having no gateway at all.
  • Does adding this gateway change who is allowed to call your workload?
    No. It changes the path, not the permission. Nothing outside can start a flow toward the workload, but that is a consequence of translation state, not an authorization decision, and it grants the workload no rights at the partner either.
  • The job must also reach a second partner on a dedicated circuit. What changes?
    Add a more specific route for that partner's range whose target is the circuit. The default route still catches everything else and sends it to the translating gateway, because the longer prefix wins the lookup.

A hotel switchboard places outside calls for every room and notes which room made each one, so the reply gets back. A stranger dialling the switchboard reaches no room, because there is no note saying which one to ring.

saying these in an interview costs you the question

  • Says the workload needs its own public address to call out
  • Thinks creating the gateway is enough without a route naming it
  • Believes the gateway makes the workload reachable from outside
  • Assumes outbound reach exists by default in every subnet
  • Treats the outbound path as permission to call the partner