Sample Header Ad - 728x90

curl is not able to resolve host by default, --ipv4 switch works

0 votes
1 answer
463 views
I have a **Linux Alpine (v3.18.6)** container running on AKS. The curl command inside that container is not able to resolve a private DNS host. Also, nslookup throws **SERVFAIL**. However, when I provide --ipv4 switch, it's able to resolve and connect (please see attached screenshot, note that I have masked the **host** in **green** and corresponding IP address in **blue** as I can't share the actual host URL information for privacy). enter image description here Below are the OS details along with Nodejs and curl versions: enter image description here My question is, **why is curl not able to automatically use IPv4 address while connecting?**
Asked by Snehasish Karmakar (101 rep)
May 15, 2024, 08:27 AM
Last activity: May 16, 2024, 12:41 PM