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: <LOOPBACK,UP,LOWER_UP> 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: <BROADCAST,MULTICAST,UP,LOWER_UP> 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: <BROADCAST,MULTICAST> 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 
  • What is the output of ls -l /etc/resolv.conf? – GAD3R Jan 16 '18 at 8:30
  • 1
    What is (are) the server's address(es) (ip a) and routes (ip r) ? – user4556274 Jan 16 '18 at 11:27
  • here is result for sudo cat /etc/resolv.conf : domain online.net search online.net nameserver nameserver – ab.islah Jan 16 '18 at 18:56
  • Can you ping X.X.214.129 ? It looks like a default route not working. – Shadur Jan 16 '18 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 '18 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 '18 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 '18 at 11:10
  • You were correct before about /etc/resolv.conf – multithr3at3d Jan 16 '18 at 15:44
  • You're right. I changed it back and left in the part regarding /etc/hosts. – Nasir Riley Jan 16 '18 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 '18 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 agree to our terms of service, privacy policy and cookie policy

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