Back to the notes

Notes

Enterprise proxy, PAC file and DNS governance

A large share of 'the internet is down' tickets are name resolution or proxy selection. Separate the two layers and diagnosis gets fast.

Situation

Proxy and PAC are the kind of infrastructure nobody thinks about while they work. The PAC file picked up an extra conditional branch every few months and nobody ever deleted a stale one; some clients carried the proxy’s IP address hard-coded instead of its name; and internal and external queries for the same name gave different answers. What that produces, in the end, is a queue of ‘the internet is down’ tickets that each have to be guessed from the beginning — when the actual cause may sit in browser settings, the PAC’s evaluation order, the proxy’s access policy, or one DNS zone. Those are four layers with nothing in common in how you examine them.

Approach

I treated this as a governance problem more than a troubleshooting problem. A single incident is easy to fix; the hard part is making it fixable by the next person. So the work concentrated on three things: cut the failure domains apart so a ticket can be classified on arrival, collapse the source of truth into one place with a way back, and turn the magic values baked into systems back into named infrastructure.

What I actually did

  • Defined three independently testable questions and put the commands for them into the first-line handbook: does this name resolve (queried against the internal resolver, not just the operating-system cache)? Can this client reach the proxy? Does the proxy allow this request (matched in the access log by user and time)? Answer those three and the ticket is already classified.
  • Brought the PAC under version control: split it into readable conditional blocks, removed stale and duplicated conditions, made the primary/secondary proxy and final direct-connection order explicit, and wrote the no-match default as a deliberate rule instead of leaving it to the browser’s own fallback.
  • Built a fixed test list — representative URLs covering internal systems, external services, internal devices that must not use the proxy, and edge cases — with expected outcomes, all run before any publication counted as done.
  • Replaced hard-coded proxy IPs with names and recorded the dependency in the change log. Retiring a piece of hardware should not require three teams on a call.
  • Inventoried DNS before touching it: every zone and its owner, record freshness and duplicates, whether the forwarder set and its order were deliberate or historical, and an agreed policy and owner for cleaning up stale records.
  • Confirmed that internal and external answers for the same name both matched intent. The outside half is the one most easily missed.
  • Applied change discipline: lower the TTL on affected records before a resolution change and allow cache time to expire, write the rollback explicitly (PAC to the previous version, forwarder to the previous value), and validate from both the client and the server side.

Outcome

The first result was separable tickets: first-line support could place ‘the internet is down’ into resolution, proxy reachability or proxy policy using three questions, instead of sending every one to me. The second was change quality — a PAC edit stopped being an overwrite of a live file and became a reviewed, versioned publication that reverts in one step. The third is quieter but paid best: the real state of proxy and DNS finally existed on paper, including the reason behind each exception. The reason is the part the next person actually needs.

What I would do differently

I would define the PAC’s no-match default as an explicit failure earlier rather than a silent direct connection. Silent direct is harmless on most days and becomes an unattributable ticket the moment a policy tightens. I would also insist earlier on a minimal diagnosable field on the client (which proxy it used, which resolver answered), because without anything on the client side a lot of tickets can only advance by asking someone to send a screenshot.