Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Can't ping IPs or domains in Ubuntu Server 12.04

  1. #1
    Join Date
    Oct 2009
    Beans
    28

    Can't ping IPs or domains in Ubuntu Server 12.04

    On server...
    ping 127.0.0.1 works
    ping 192.168.1.104 (server's static IP address) works
    ping google.com does not work (unknown host google.com)
    ping 8.8.8.8 does not work (destination host unreachable)
    ping 192.168.1.147 (local network machine's IP address) does not work (destination host unreachable)
    ping 192.168.1.1 (router) does not work (destination host unreachable)

    On local network machine...
    ping 192.168.1.104 works

    /etc/network/interfaces

    auto lo
    iface lo inet loopback

    auto eth0
    iface eth0 inet static
    address 192.168.1.104
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1

    /etc/resolv.conf

    nameserver 192.168.1.1

    Any idea what's going on here?
    Last edited by TBBucs; January 9th, 2013 at 07:37 AM. Reason: Added info about pinging router

  2. #2
    Join Date
    Sep 2012
    Beans
    4

    Re: Can't ping IPs or domains in Ubuntu Server 12.04

    1- check out "iptables"
    2- ping 192.168.1.1 and 192.168.1.47 and then check "ARP Cache Table" with command
    Code:
    arp -n

  3. #3
    Join Date
    Oct 2009
    Beans
    28

    Re: Can't ping IPs or domains in Ubuntu Server 12.04

    iptables -L says lists the policy for INPUT, FORWARD, and OUTPUT as ACCEPT.

    arp -n lists both of the IPs I tried to ping and says that the HWaddress is incomplete.

  4. #4
    Join Date
    Jan 2009
    Location
    ::1
    Beans
    2,485

    Re: Can't ping IPs or domains in Ubuntu Server 12.04

    On the server, what's the out of 'ifconfig'? Post it here.

    And is the ethernet cable connected at all?

  5. #5
    Join Date
    Oct 2009
    Beans
    28

    Re: Can't ping IPs or domains in Ubuntu Server 12.04

    I feel like an idiot. Turns out the ethernet cable was slightly loose. But I'm still not out of the woods just yet. I can now ping Google's IP (8.8.8.8), but ping google.com gives me an unknown host error. I can ping my router and local network computer successfully, and my network computer can ping my server as well.

  6. #6
    Join Date
    Jan 2009
    Location
    ::1
    Beans
    2,485

    Re: Can't ping IPs or domains in Ubuntu Server 12.04

    Quote Originally Posted by TBBucs View Post
    I feel like an idiot. Turns out the ethernet cable was slightly loose. But I'm still not out of the woods just yet. I can now ping Google's IP (8.8.8.8), but ping google.com gives me an unknown host error. I can ping my router and local network computer successfully, and my network computer can ping my server as well.
    That means your name resolving is not working.

    How did your server get its IP address? Via DHCP, or ... ?

  7. #7
    Join Date
    Oct 2009
    Beans
    28

    Re: Can't ping IPs or domains in Ubuntu Server 12.04

    The server gets a static IP address of 192.168.1.104.

  8. #8
    Join Date
    Jan 2009
    Location
    ::1
    Beans
    2,485

    Re: Can't ping IPs or domains in Ubuntu Server 12.04

    Quote Originally Posted by TBBucs View Post
    The server gets a static IP address of 192.168.1.104.
    Gets via DHCP, or sets via static config ... ?

  9. #9
    Join Date
    Oct 2009
    Beans
    28

    Re: Can't ping IPs or domains in Ubuntu Server 12.04

    Via static config.

  10. #10
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: Can't ping IPs or domains in Ubuntu Server 12.04

    From 12.04 onwards you shouldn't edit resolv.conf directly as it gets rewritten by the system. Instead you should add the following line to your /etc/network/interfaces file:
    Code:
    auto eth0
    iface eth0 inet static
    address 192.168.1.104
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1
    dns-nameservers 192.168.1.1
    Cheesemill

Page 1 of 2 12 LastLast

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
  •