0

wget is not working properly on my debian server.

if I wget http://www.google.com, it says it cannot resolve the host, when I ping google.com, I receive a successful pong and when I wget http://www.debian.org it works.

I cannot wget anything else than debian.org ... pretty weird.

  • How are you using wget ? – petrus Sep 27 '11 at 09:59
  • Can you add in the output of `wget -O /dev/null -d http://www.google.com` – SmallClanger Sep 27 '11 at 10:05
  • root@dragon:/etc# wget -O /dev/null -d http://www.google.com #RETURN# DEBUG output created by Wget 1.12 on linux-gnu. #RETURN# --2011-09-27 13:18:55-- http://www.google.com/ #RETURN# Resolving www.google.com... failed: Name or service not known. #return# wget: unable to resolve host address `www.google.com' #return# root@dragon:/etc# – Jack Lomberg Sep 27 '11 at 18:19
  • how does it help ? (added #RETURN# because serverfault doesn't allow lines return) – Jack Lomberg Sep 27 '11 at 18:20
  • wget IP_OF_GOOGLE works tho... so I really don't know what's the problem – Jack Lomberg Sep 27 '11 at 18:44

1 Answers1

2

Check your DNS cat /etc/resolv.conf, and the table lookup for host names cat /etc/hosts. Try changing to Google's DNS:

echo "8.8.8.8" > /etc/resolv.conf
echo "8.8.4.4" >> /etc/resolv.conf
quanta
  • 51,413
  • 19
  • 159
  • 217