Interview Prep/Linux/Networking, DNS and firewalls

`curl https://api.example.com` fails with `curl: (60) SSL certificate problem: unable to get local issuer certificate`.

IntermediateTroubleshootingNetworking, DNS and firewalls
Answer

Likely causes → The server doesn't send the intermediate certificate, the host's CA bundle is outdated, or a corporate TLS-inspecting proxy uses an internal CA not trusted by the host.

Diagnose →

openssl s_client -connect api.example.com:443 -servername api.example.com -showcerts </dev/null | grep -E 's:|i:'
rpm -q ca-certificates || dpkg -l ca-certificates

Fix → Fix the server's chain (send full chain). For an internal CA: copy it to /etc/pki/ca-trust/source/anchors/ and update-ca-trust (RHEL) or /usr/local/share/ca-certificates/ and update-ca-certificates (Debian). Never use curl -k as the fix.

Prevent → Keep ca-certificates updated; check chains in monitoring.

All Linux questions Roadmap: Linux

More on Networking, DNS and firewalls