Results 1 to 7 of 7

Thread: New Server, Ping Problem

  1. #1
    Join Date
    Jun 2005
    Location
    Michigan
    Beans
    26
    Distro
    Ubuntu 12.04 Precise Pangolin

    Question New Server, Ping Problem

    This is my first time setting up a ubuntu server and I'm doing it through the terminal. I've been using this guide; http://www.howtoforge.com/perfect-server-ubuntu8.04-lts, and after adjusting some settings I cannot ping the outside world. When I do ping -c 5 www.google.com, I get ping: unknown host www.google.com. If I try and ping my router or my laptop, I get responses.

    I set my static up;
    auto eth0
    iface eth0 inet static
    address 192.168.1.121
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1

    I made my hostname; dimension.example.com, would that be the problem?

  2. #2
    Join Date
    Apr 2008
    Location
    Far, far away
    Beans
    2,148
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: New Server, Ping Problem

    If you can ping your router then most likely there's nothing wrong with your setup locally. My guess is that your router or isp are blocking ICMP. Check the router as you can change settings there to allow/disallow ICMP protocol. My isp blocks ICMP - not sure why but I have never been able to ping public ips. If yours does that then there's not much you can do about it on your systems.

    Edit - Just saw your comment about unknown host. Probably not your hostname that's a problem but your nameserver lookup could be setup wrong. First check ping with a public ip value ie. ping 72.14.205.100 for google. If that works then don't worry about ping at the router etc. You need to check /etc/resolv.conf and make sure it has valid settings for name lookup. Typically you want to have your router's ip there and it will relay onto whatever dns server your isp provides. Doing it that way allows it to get updated if the isp changes nameservers.

    /etc/resolv.conf:

    nameserver 192.168.1.1
    Last edited by BkkBonanza; April 20th, 2009 at 04:16 AM.

  3. #3
    Join Date
    Jun 2005
    Location
    Michigan
    Beans
    26
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: New Server, Ping Problem

    My main problem is whenever I try to do apt-get update or upgrade I get failed responses.

  4. #4
    Join Date
    Apr 2008
    Location
    Far, far away
    Beans
    2,148
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: New Server, Ping Problem

    It sounds like you have name resolution problems. Try a quick check with,
    nslookup google.com
    If you don't get an ip value back then you need to look into your resolv.conf file and whether the problem is there or on your router.

  5. #5
    Join Date
    Jun 2005
    Location
    Michigan
    Beans
    26
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: New Server, Ping Problem

    nah it didnt respond with an ip

    my resolv.conf is

    search dimserver.example.com
    nameserver 192.168.1.121

  6. #6
    Join Date
    Apr 2008
    Location
    Far, far away
    Beans
    2,148
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: New Server, Ping Problem

    Take out the search line and change the 192.168.1.121 to 192.168.1.1
    It should tell your machine to look for names on your router.
    Then if it still doesn't work then check your router and make sure it is getting it's nameserver dynamically from the isp or has been set correctly with a static value.
    It should relay name requests to your isp nameserver.

  7. #7
    Join Date
    Jun 2005
    Location
    Michigan
    Beans
    26
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: New Server, Ping Problem

    Wow thanks! That did it, after I took out the search line and changed the name server too 192.168.1.1, I was able to ping & update!! I guess when I was fooling around in the resolv.conf I put the wrong thing DOH.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •