`curl: (56) CONNECT tunnel failed, response 407`
BeginnerTroubleshootingCloud networking: VPC, firewalls, NAT, VPN and proxies
Answer
Likely causes → The forward proxy requires authentication (407 Proxy Authentication Required) and curl sent none, or wrong credentials, or the proxy wants NTLM/Kerberos instead of Basic.
Diagnose →
curl -v -x http://proxy.corp:8080 https://example.com 2>&1 | grep -i 'proxy-authenticate'
The Proxy-Authenticate header tells you the scheme (Basic, NTLM, Negotiate).
Fix →
curl -x http://proxy.corp:8080 --proxy-user 'svc_user:pass' https://example.com
curl -x http://proxy.corp:8080 --proxy-ntlm --proxy-user 'DOMAIN\svc_user' https://example.com
URL-encode special characters if credentials are inside HTTPS_PROXY=http://user:p%40ss@proxy:8080.
Prevent → For servers, ask for IP-based allow listing on the proxy or a dedicated service account, not personal credentials in env vars.
More on Cloud networking: VPC, firewalls, NAT, VPN and proxies
An EC2 instance in a private subnet hangs on `apt-get update` at `Connecting to archive.ubuntu.com`.BeginnerA new EC2 instance in a "public" subnet can't be reached over SSH from the internet; the SG allows port 22 from your IP.BeginnerThe SG allows inbound 443 and the app works from inside the VPC, but internet clients time out. The subnet NACL allows inbound 443.IntermediateA VPC peering connection is `Active`, but instances in the two VPCs can't ping each other.BeginnerALB targets are `unhealthy` with reason `Target.Timeout`, and VPC Flow Logs show `REJECT` from the ALB's IPs to the instances.BeginnerTwo VPCs are attached to a Transit Gateway, but traffic between them fails.Intermediate