curl-users
Re: FTP operation timeout when public DNS Server is used
Date: Tue, 3 May 2016 07:18:07 +0200
On Tue, May 03, 2016 at 09:56:17AM +0530, Ison wrote:
> I am developing a C program to upload file to an FTP Server. 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 (8.8.8.8) using the command
>
> echo nameserver 8.8.8.8 > /etc/resolv.conf
>
> The file is getting updated and the operation exits with error "Timeout was
> reached".
>
> I am able to "ping www.google.com" and "ping my_ftp_server" with 8.8.8.8 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 luck.
>
> If I replace the nameserver 8.8.8.8 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.
Can you use the Google DNS server manually? e.g. does "host www.google.com
8.8.8.8" or "dig www.google.com @8.8.8.8" return anything? Perhaps there's a
firewall somewhere in the path that's interfering.
>>> Dan
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-users
FAQ: https://curl.haxx.se/docs/faq.html
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-05-03