You are not logged in.

#1 2013-06-09 21:37:56

kastaldi
Member
Registered: 2013-06-09
Posts: 5

Ping works but wget, curl and lynx need ip address instead of www

Hi!

I've done a lot of tests but I can't solve this problem.

Ping, dnslookup and other tests work with (for example) www.google.it

Another example:

[root@archmauro grub]# wget aur.archlinux.org/packages/pm/pms/pms.tar.gz
--2013-06-09 23:41:39--  http://aur.archlinux.org/packages/pm/pms/pms.tar.gz
Risoluzione di aur.archlinux.org (aur.archlinux.org)... 2a01:4f8:120:34c2::2, 78.46.78.247
Connessione a aur.archlinux.org (aur.archlinux.org)|2a01:4f8:120:34c2::2|:80...

and it hangs.

Pacman works, updates, and so on.

Lynx, wget and curl cannot connect to named addresses but work only by using ip number. They resolve the name but it seems that connecting is the problem. I wonder if it is something related to ipv6 taking over ipv4.

Resolv.conf contains two lines (nameserver 192.168.89.1 and nameserver 8.8.8.8) and iptables is disabled by checking its status with systemctl.

Could you help me ? Thanks.

Last edited by kastaldi (2013-06-09 21:43:24)

Offline

#2 2013-06-09 21:46:45

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Ping works but wget, curl and lynx need ip address instead of www

Tryo using a different nameserver... it would certainly seem like a dns problem if you are able to ping IPs but not human readable addresses.

You can try using the dig utility to test various dns nameservers.  For example, if I wanted to see if I could resolve archlinux.org using the google nameservers, I would do "dig @8.8.8.8 archlinux.org" or "dig @8.8.4.4 archlinux.org".

Offline

#3 2013-06-09 21:53:24

kastaldi
Member
Registered: 2013-06-09
Posts: 5

Re: Ping works but wget, curl and lynx need ip address instead of www

WonderWoofy wrote:

Tryo using a different nameserver... it would certainly seem like a dns problem if you are able to ping IPs but not human readable addresses.

You can try using the dig utility to test various dns nameservers.  For example, if I wanted to see if I could resolve archlinux.org using the google nameservers, I would do "dig @8.8.8.8 archlinux.org" or "dig @8.8.4.4 archlinux.org".

Thank you for the answer but I am able to ping everything. The problem arises with other programs such as wget that resolve addresses but cannot connect to the website. I'm trying to disable ipv6 and see if it works. I was reading that you need to disable it in the kernel but I should read some more and find another way.

Offline

#4 2013-06-09 21:56:26

kastaldi
Member
Registered: 2013-06-09
Posts: 5

Re: Ping works but wget, curl and lynx need ip address instead of www

Ok I found out.

https://wiki.archlinux.org/index.php/IPv6

I created /etc/sysctl.d/ipv6.conf, disable ipv6 on my wireless nic and it works !!! Solved ! smile

Offline

#5 2013-06-09 21:57:42

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Ping works but wget, curl and lynx need ip address instead of www

Yes, it needs to be disabled in the kernel, but it couldn't get much easier to do so - you don't need to rebuild the kernel, just do the following:

systctl net.ipv6.conf.all.disable_ipv6 = 1

EDIT: too slow, glad you found it.

Last edited by Trilby (2013-06-09 21:58:01)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2013-06-09 21:57:43

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Ping works but wget, curl and lynx need ip address instead of www

I'm glad you got it working, but I don't think you understood at all what I was telling you there.

Offline

#7 2013-06-09 22:46:26

kastaldi
Member
Registered: 2013-06-09
Posts: 5

Re: Ping works but wget, curl and lynx need ip address instead of www

Trilby wrote:

Yes, it needs to be disabled in the kernel, but it couldn't get much easier to do so - you don't need to rebuild the kernel, just do the following:

systctl net.ipv6.conf.all.disable_ipv6 = 1

EDIT: too slow, glad you found it.

Yes, thank you for the answer. It took me a lot of tries but soon after I wrote the post, I found the solution. Weird. smile

Offline

#8 2013-06-09 22:55:55

kastaldi
Member
Registered: 2013-06-09
Posts: 5

Re: Ping works but wget, curl and lynx need ip address instead of www

WonderWoofy wrote:

I'm glad you got it working, but I don't think you understood at all what I was telling you there.

No no I understood. Dig shows me what the DNS servers return, right ? So maybe it could have been an ipv6 address.
Anyway, I never used dig so thank you for the tip, it will be useful in the future. smile

Offline

Board footer

Powered by FluxBB