cURL / Mailing Lists / curl-library / Single Mail


FTP operation timeout when public DNS Server is used

From: Ison <>
Date: Tue, 03 May 2016 14:06:49 +0530


I am developing a C program to upload file to an FTP Server in Debian
Linux(Beaglebone black). The system provides options to setup the
ethernet interface statically or via dhcp. I am able to upload my file
when my eth interface is setup using dhcp. The /etc/resolv.conf file
gets updated with my local network's DNS nameservers in this case. But,
when static ethernet configuration is used, after setting the IP
Address, Netmask and gateway, I am overwriting the /etc/resolv.conf file
with google public DNS server address ( using the command

echo nameserver > /etc/resolv.conf

The file is getting updated and the operation exits with error "Timeout
was reached".

I am able to "ping" and "ping my_ftp_server" with
as the only entry in the resolv.conf file, but the curl operation fails.

I tried using OpenDNS namserver insted of google's DNS but there is no

If I replace the nameserver with the local DNS IP address that I
received during dhcp operation, as follows:

echo nameserver "local dns server ip" > /etc/resolv.conf,

I am able to complete the FTP operation.

Request help to understand the cause of the issue. Thanks in advance.


Ison Thomas
List admin:
Received on 2016-05-03