You rebind a legacy app to loopback behind an on-host identity front door - what can an intruder still reach, and what breaks?
answer
- you moved the boundary, did not remove it
- who else has code on that host
- the app now sees one caller for everyone
- direct machine callers nobody wrote down
- if the front door dies, nothing answers
basics
~20 sLoopback removes network reach, not local reach: any process or account on that host still opens the port, and the app cannot tell callers apart. It also silently cuts every batch job and integration that connected directly.
solid answer
~50 sRebinding from a routable address to `127.0.0.1` converts the threat from *anyone who can route to this host* into *anyone who can run code on this host* - it moves the trust boundary onto the machine rather than removing it. A compromised service account, a second application on the same server, or an interactive maintenance session all still reach the old no-login behaviour, and the app now sees every request as one local connection, so its own log can no longer name a caller: the front door's log becomes the only place identity exists. The second half of the bill is the cutover. Batch jobs, monitoring pollers, the reporting server and a few forgotten scripts spoke straight to that port; each needs a service identity and a route through the front door before you flip it, and whatever you missed fails at 02:00 in the outage window.
code
text · 7 linesbefore
0.0.0.0:5555 erp-app reachable by every host that can route here
after
127.0.0.1:5555 erp-app reachable by every process on this host
0.0.0.0:443 identity-proxy forwards to 127.0.0.1:5555 after authenticating
...go deeper
Know that a loopback listener is reachable only from the machine itself, and that this changes who can connect over the network without changing what the application asks of a caller.
Explain both blind spots precisely: local processes and accounts still reach the port, and the application can no longer tell callers apart because they all arrive as one local connection.
Talk about the cutover before the design - how you discover the machine callers, what the rollback is, and the availability engineering the front door now needs because the app is unreachable without it.
Be ready to argue whether this on-host pattern is worth standardising across dozens of hosts, given that it makes every application host its own enforcement point and its own operational risk.
### What the move actually is The estate has no gateway anywhere in the east-west path - the applications sit in a routed fabric and talk to each other directly. So the only place an enforcement point can go is **on the application's own host**: the app is rebound from a routable address to loopback (or to a single management address), and an identity-aware front door is installed on that same server as the only listener the network can reach. It is crude, and for an application that cannot be modified it is often the only thing available. ### What it buys Before the change, the set of callers is *every host that can route to this address*. After it, the set of callers over the network is *whoever passes the front door*, which for the first time is a set of authenticated humans with a record of who they were. That is a genuine gain and it arrives in weeks rather than years. ### What it does not buy, and this is the interview question **1. Local reach is untouched.** A loopback listener is open to every process on the host. The operating system does not restrict it to the front-door process by default, so a compromised service account, a vulnerability in another application co-located on the same server, or anyone with an interactive session reaches the application exactly as before - with no login, because the application still has none. The host has become the trust boundary, which means the host's own account hygiene, patching and co-tenancy now carry the security of the application. **2. The application cannot attribute anything.** Every request now arrives from one local peer. If the app has a log at all, it records that peer, so the only place a user name exists is the front door's own record. That has consequences you should state before someone else discovers them: the audit trail lives in a different system from the application's data, and joining them later means correlating by timestamp and connection unless the front door can inject an identity the app is willing to log. **3. The decision granularity is connection-shaped.** The front door decides who may reach the application. It does not decide who may approve a purchase order or release a batch - the application's internal permissions, if any, are unchanged. ### The listener picture Before and after, the same host looks like this: - **before** - the application listens on a routable address and every host in the routed fabric is a potential caller; - **after** - the application listens on loopback, and the identity front door is the only listener bound to a routable address, forwarding to it. The thing to notice is that the second line of the *after* picture still says *anything local*. ### The cutover bill This is where these projects go wrong. In an estate where reaching the app was the whole authentication, most of its callers are machines that never needed a credential: a nightly batch that pulls orders, a monitoring poller, a reporting server, an integration a vendor wrote, and a script on a retired engineer's desktop that still runs. None of them appear in any document. Each of them needs either a service identity the front door accepts or an explicit bypass, and the population is discovered, not looked up - typically by logging the existing connections for a fortnight before touching anything, then chasing the source addresses. Whatever you miss stops working the moment you rebind, which is why this change is scheduled into an outage window with a rollback that is one configuration line - put the application back on the routable address. ### Failure posture, stated deliberately Because the application is now on loopback, if the front-door process dies the application is unreachable from the network. That is fail-closed by construction, and it is a decision someone has to accept rather than discover: if the application is the shop-floor scheduler, an unavailable front door stops production. Either that trade is accepted in writing, or the front door needs the availability engineering - supervision, restart, a tested restore - that its new role demands.
- Every request now arrives from 127.0.0.1 - what does that do to the application's own audit log?It collapses. All callers look identical to the app, so its log can no longer distinguish them and any user field it has records whatever it is told, or nothing. The front door's record becomes the authoritative one, and you either inject an identity value the app will store or accept that reconstructing who did what means joining two systems on time and connection.
- How do you find the machine callers before you rebind?Observe rather than ask. Record the connections to that port for a period long enough to cover monthly and quarter-end jobs, resolve the source addresses to owners, and treat the resulting list as the project's real scope. Documentation and tribal memory reliably miss the scripts, and the ones they miss are the ones that fail during the cutover.
- Does putting the front door on the host mean an intruder on that host is out of scope?No - it means the opposite. The host is now the boundary, so local code execution defeats the control entirely. That raises the value of the server's own account separation, of not co-locating other exposed applications on it, and of watching for interactive sessions on a machine that should have very few.
saying these in an interview costs you the question
- Claims loopback binding authenticates the caller
- Forgets local accounts and co-located services on the same host
- Cuts over without discovering the direct machine callers
- Treats the front door's log as optional rather than the only identity record
- Never states who absorbs the outage if the front door stops