Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I can't connect to the Internet from our server. I'm able to ping the default gateway, LAN connectivity works fine but I can't ping any public IP (say, 4.2.2.1, an open DNS server which I know replies to ping).

When I do a traceroute, I don't even see the first hop.

The configuration SEEMS to be fine (I'm no Linux expert, I might be missing something). I have the server's IP address set via DHCP, but the MAC address is bound to the IP. I wanted to see if that helped, but no:

root@linux:/home/user# ifconfig
eth0      Link encap:Ethernet  HWaddr b8:ac:6f:95:94:f4  
          inet addr:192.168.0.150  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::baac:6fff:fe95:94f4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1223325 errors:0 dropped:146 overruns:0 frame:0
          TX packets:974313 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:983138831 (937.5 MiB)  TX bytes:742552277 (708.1 MiB)
          Interrupt:16 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:5290 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5290 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:454378 (443.7 KiB)  TX bytes:454378 (443.7 KiB)

root@linux:/home/user# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
auto eth0
iface eth0 inet dhcp

root@linux:/home/user# cat /etc/resolv.conf 
domain REMOVED
search REMOVED
nameserver 4.2.2.1

root@linux:/home/user# ip route
192.168.0.0/24 dev eth0  proto kernel  scope link  src 192.168.0.150 
default via 192.168.0.1 dev eth0 
share|improve this question

closed as unclear what you're asking by Jeff Schaller, Stephen Kitt, dr01, jimmij, Archemar Jun 10 at 9:50

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

6  
That sounds like a problem with the gateway, not the server. – cjm Sep 18 '13 at 18:31
    
And your gateway just routes any traffic into the internet? – Nils Sep 18 '13 at 20:28
    
Can you resolve names from the Internet? (i.e. what does host www.google.com return?). Additionally, do you have any iptables configuration in the server? (i.e. what does iptables -nL return when run as root?) – Julian Garla Feb 18 '15 at 20:27