Re: Help, my 5.6 stable is insane : cant resolv dns inside programs (ftp and curl)
On Wed, Mar 04, 2015 at 06:47:38PM GMT, sven falempin wrote: # i did play around with the file resolv.conf # cat /etc/resolv.conf lookup file nameserver 127.0.0.1 nameserver 8.8.8.8 # because i dont get it i even did that # cat /etc/resolv.conf.tail nameserver 8.8.8.8 This is due to the fact that both 'host' and 'dig' are *DNS* lookup utilities - for obvious reasons, they care only about 'nameserver' entries in '/etc/resolv.conf'. For other utilities, which rely on gethostbyname(3) and gethostbyaddr(3), the 'lookup' option specifies the database and, if more than one, the order which is to be searched for host information. In your example above, 'lookup' is only set up for '/etc/hosts' hence utilities like 'ftp', or 'curl', fail - change it to 'lookup file bind' (or remove that line altogether) and everything will go back to normal. Remove 'nameserver' options from there and, as you might expect, DNS lookups themselves will fail. Raf
Re: Help, my 5.6 stable is insane : cant resolv dns inside programs (ftp and curl)
On Wed, Mar 04, 2015 at 07:15:58PM GMT, sven falempin wrote: YES, lookup file bind, (but i did delete the line completly and it wasnt working.) Hmmm... then the behaviour you describe seems to both contradict my own experience (double-checked a second ago) as well as the 'resolv.conf(5)' man page: If the lookup keyword is not used in the system's resolv.conf file then the assumed order is bind file. Furthermore, if the system's resolv.conf file does not exist, then the only database used is file. Fun fact , i actually know that but i fail to spot it . Thank you :-) No worries :^) Raf
Help, my 5.6 stable is insane : cant resolv dns inside programs (ftp and curl)
# i did play around with the file resolv.conf # cat /etc/resolv.conf lookup file nameserver 127.0.0.1 nameserver 8.8.8.8 # because i dont get it i even did that # cat /etc/resolv.conf.tail nameserver 8.8.8.8 [0]-[router]-[~] # host google.ca google.ca has address 173.194.45.47 google.ca has address 173.194.45.55 google.ca has address 173.194.45.56 google.ca has address 173.194.45.63 google.ca has IPv6 address 2a00:1450:4007:805::100f google.ca mail is handled by 30 alt2.aspmx.l.google.com. google.ca mail is handled by 20 alt1.aspmx.l.google.com. google.ca mail is handled by 40 alt3.aspmx.l.google.com. google.ca mail is handled by 50 alt4.aspmx.l.google.com. google.ca mail is handled by 10 aspmx.l.google.com. [0]-[router]-[~] # host google.ca 127.0.0.1 Using domain server: Name: 127.0.0.1 Address: 127.0.0.1#53 Aliases: google.ca has address 173.194.45.47 google.ca has address 173.194.45.55 google.ca has address 173.194.45.56 google.ca has address 173.194.45.63 google.ca has IPv6 address 2a00:1450:4007:805::100f google.ca mail is handled by 30 alt2.aspmx.l.google.com. google.ca mail is handled by 20 alt1.aspmx.l.google.com. google.ca mail is handled by 40 alt3.aspmx.l.google.com. google.ca mail is handled by 50 alt4.aspmx.l.google.com. google.ca mail is handled by 10 aspmx.l.google.com. [0]-[router]-[~] # host google.ca 8.8.8.8 Using domain server: Name: 8.8.8.8 Address: 8.8.8.8#53 Aliases: google.ca has address 216.58.211.99 google.ca has IPv6 address 2a00:1450:4007:806::1017 google.ca mail is handled by 40 alt3.aspmx.l.google.com. google.ca mail is handled by 50 alt4.aspmx.l.google.com. google.ca mail is handled by 10 aspmx.l.google.com. google.ca mail is handled by 20 alt1.aspmx.l.google.com. google.ca mail is handled by 30 alt2.aspmx.l.google.com. [0]-[router]-[~] # ftp -o /dev/null http://google.ca ftp: google.ca: no address associated with name [1]-[router]-[~] # # dig 127.0.0.1 google.fr [.also work ok.] -- - () ascii ribbon campaign - against html e-mail /\
Re: Help, my 5.6 stable is insane : cant resolv dns inside programs (ftp and curl)
On Wed, Mar 4, 2015 at 2:11 PM, Raf Czlonka rczlo...@gmail.com wrote: On Wed, Mar 04, 2015 at 06:47:38PM GMT, sven falempin wrote: # i did play around with the file resolv.conf # cat /etc/resolv.conf lookup file nameserver 127.0.0.1 nameserver 8.8.8.8 # because i dont get it i even did that # cat /etc/resolv.conf.tail nameserver 8.8.8.8 This is due to the fact that both 'host' and 'dig' are *DNS* lookup utilities - for obvious reasons, they care only about 'nameserver' entries in '/etc/resolv.conf'. For other utilities, which rely on gethostbyname(3) and gethostbyaddr(3), the 'lookup' option specifies the database and, if more than one, the order which is to be searched for host information. In your example above, 'lookup' is only set up for '/etc/hosts' hence utilities like 'ftp', or 'curl', fail - change it to 'lookup file bind' (or remove that line altogether) and everything will go back to normal. Remove 'nameserver' options from there and, as you might expect, DNS lookups themselves will fail. Raf YES, lookup file bind, (but i did delete the line completly and it wasnt working.) Fun fact , i actually know that but i fail to spot it . Thank you :-) -- - () ascii ribbon campaign - against html e-mail /\