I have a debian 8 server running a ruby application, we had a problem with the application so we restarted the server and since then i can't resolve any IP adresse or DNS (beside localhost and the server's own public IP) here is what i did so far:

  • Tried to ping multiple IPs and DNS but all the packets are lost and no packets received
  • Restarted the networking service (both with sudo service networking restart and sudo /etc/init.d/networking restart
  • Tried Traceroute but all i've got is multiple '*'
  • flushed iptables
  • restarted the server again

Someone had the same problem before ? any solutions or suggestions?

Thank you.


here is result for sudo cat /etc/resolv.conf :

search online.net

I've tried to change the nameservers to and

and here is the results for cat /etc/network/interfaces:

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

results for cat /etc/hosts :   localhost

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

results for ip a (please note that i changed some numbers to X, Y and Z since i don't know the security implications of giving out the full IPs and mac adresses) :

1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0:  mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether Y:Y:Y:1b:41:55 brd ff:ff:ff:ff:ff:ff
    inet X.X.214.212/25 brd X.X.214.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 Z::Z:Z:fe1b:4155/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1:  mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether Y:Y:Y:1b:41:56 brd ff:ff:ff:ff:ff:ff

results for ip r :

default via X.X.214.129 dev eth0 
X.X.214.128/25 dev eth0  proto kernel  scope link  src X.X.214.212 

I am sorry for pasting all these infos, i am not very good at networking or linux administration and been troubleshooting this for the last two days without any luck.

Thank you.

  • What is the output of ls -l /etc/resolv.conf? – GAD3R Jan 16 at 8:30
  • 1
    What is (are) the server's address(es) (ip a) and routes (ip r) ? – user4556274 Jan 16 at 11:27
  • here is result for sudo cat /etc/resolv.conf : domain online.net search online.net nameserver nameserver – ab.islah Jan 16 at 18:56
  • Can you ping X.X.214.129 ? It looks like a default route not working. – Shadur Jan 16 at 21:17
  • can't ping it, all the packets are lost, I should add that the server responds to requests from the browser and the app is running – ab.islah Jan 16 at 23:31

Check your /etc/network/interfaces file and make sure that the IP info is correct in the primary network interface section. If you have a static IP which I'm assuming you do as this is a server, your IP, subnet mask, gateway, etc should be there.

Also, check your /etc/resolve.conf file and make sure that DNS info is available and correct and make sure that the /etc/hosts file has the static ip and the FQDN if it applies

Lastly, make sure that your network service is enabled and running.

  • 2
    The first part does not apply to Debian. – multithr3at3d Jan 16 at 5:26
  • I've corrected the mistake. I've gotten so used to using RHEL that it slipped my mind that the config files are in different places in the Debian family. – Nasir Riley Jan 16 at 11:10
  • You were correct before about /etc/resolv.conf – multithr3at3d Jan 16 at 15:44
  • You're right. I changed it back and left in the part regarding /etc/hosts. – Nasir Riley Jan 16 at 17:05
  • I edited my post with all the infos, sorry for pasting all these infos but i don't know what's the correct config for all these files, thanks for your help – ab.islah Jan 16 at 19:28

Your /etc/network/interfaces indicates you're using DHCP, and the eth0 interface has an IP address and a default gateway is defined. Yet the traceroute fails.

I'd suggest contacting your network administrator (or possibly the service provider): you cannot troubleshoot this much further alone. It looks like you have some local connectivity, but maybe no connection beyond your local network segment. In other words, the device that is acting as your default gateway may have failed, or it may be rejecting your traffic for some reason.

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.