Interview Prep/Networking/Cloud networking: VPC, firewalls, NAT, VPN and proxies

With `HTTPS_PROXY` set on a server, internet calls work but calls to `https://api.internal.corp` now fail with `502` from the proxy.

BeginnerTroubleshootingCloud networking: VPC, firewalls, NAT, VPN and proxies
Answer

Likely causes → The internal call is also being sent to the corporate proxy, which can't reach internal names. NO_PROXY doesn't include the internal domain or IP ranges.

Diagnose →

env | grep -i _proxy
curl -v https://api.internal.corp 2>&1 | grep -iE 'proxy|connected to'

Fix →

export NO_PROXY=localhost,127.0.0.1,.internal.corp,10.0.0.0/8,169.254.169.254
export no_proxy=$NO_PROXY

Use the leading-dot domain form; CIDR support varies by tool (curl and Go support it, some older tools don't), so also list key IPs if needed.

Prevent → Set both upper- and lowercase variants centrally (e.g. /etc/environment, systemd drop-ins), and always include the metadata IP and cluster ranges.

All Networking questions Roadmap: Networking for DevOps

More on Cloud networking: VPC, firewalls, NAT, VPN and proxies