Digitalocean droplet can not access internet, nor can be accessed from outside

2

I was working with my droplet (via ssh) and suddenly it disconnected so I went to the digital ocean control panel and did a hard reset. It restarted but it can't be reached from outside (ping, ssh) and it can not reach internet from inside. I will really appreciate any help since is my production server and can not just destroy the droplet. Screenshots of the terminal info

Network interfaces ifconfig

Marco Santana

Posted 2017-07-29T15:13:12.553

Reputation: 51

Since it's your production droplet then you have a backup right? Have you contacted Digital Ocean to verify the problem is the droplet not their hardware? – Ramhound – 2017-07-29T15:18:03.357

I was downloading my db and in that moment the connection broke up. I Will contact them – Marco Santana – 2017-07-29T16:34:45.093

when I restart the server it only has lo interface and only after service networking restart the other appear but it still doesn't work – Marco Santana – 2017-07-29T19:31:41.267

Answers

-1

It is possible there's a problem with the /etc/resolv.conf file (Probably empty or wrongly configured) since ping does not work, run dig google.com A +trace to trace the DNS paths.

Typically you should have output like

; <<>> DiG 9.10.3-P4-Ubuntu <<>> google.com A +trace
;; global options: +cmd
.           42083   IN  NS  a.root-servers.net.
.           42083   IN  NS  b.root-servers.net.
.           42083   IN  NS  c.root-servers.net.
.           42083   IN  NS  d.root-servers.net.
.           42083   IN  NS  e.root-servers.net.
.           42083   IN  NS  f.root-servers.net.
.           42083   IN  NS  g.root-servers.net.
.           42083   IN  NS  h.root-servers.net.
.           42083   IN  NS  i.root-servers.net.
.           42083   IN  NS  j.root-servers.net.
.           42083   IN  NS  k.root-servers.net.
.           42083   IN  NS  l.root-servers.net.
.           42083   IN  NS  m.root-servers.net.
.           42083   IN  RRSIG   NS 8 0 518400 20190212170000 20190130160000 16749 . eMPtAtRg5I5Rs5FG0dWDRxn/8/wDMavt/zz1YiIkLBeq6RaY1bfuWsmT Bo0zNzx1/hW4nh/aJpmgBOlTlOs9ZU0lAOJa2rHBnKJjNiu0dMJCkWDR uTxyDjG5Xi9orXw2yy0sa38gZkkZoZo/GGtZZRSXFXFFVg+S8iOjm6ZV AoYOLsiP3VranLSONnIadzdMVAw4WdeVYWvUdsXxOLtWzETR4bmOzdYK u9IXjBrwYEe7HQCyb0rRITkcpfULaFjD+u+4IG7Q2v5GnucKWbXeykLS PEOSUhuWL9D4pPpAR3KhC7qOqLQeGRkzaFPQgST2icfepNtpC863QJR8 Kl+FqA==
;; Received 525 bytes from 8.8.8.8#53(8.8.8.8) in 1 ms

The last line (in my paste, as it is longer) ;; Received 525 bytes from 8.8.8.8#53(8.8.8.8) in 1 ms shows a DNS server from which 525 bytes was received in 1ms if you do see an out similar to this then you would need to edit your /etc/resolv.conf... sudo nano /etc/resolv.conf add

nameserver 8.8.8.8
nameserver 8.8.4.4

Try to ping google again

REF : Digital Ocean unable to ping external websites

Hopefully that helps.

F.E Noel Nfebe

Posted 2017-07-29T15:13:12.553

Reputation: 99

How does this relate to the question? – RalfFriedl – 2019-02-02T17:15:22.877

@RalFriedl I don't understand your question. As you can clearly my answer is suggesting a possible cause and solution for why a droplet may not connect to the internet. – F.E Noel Nfebe – 2019-02-04T06:18:08.120

The question says "can't be reached from outside". That is not a resolver problem. – RalfFriedl – 2019-02-04T06:54:04.800

1and it can not reach internet from inside you should read details carefully! The server cannot be connected to from outside but addittionally, it can't access the internet from inside. That's even a possible cause of it's not being accesible from outside, hence the answer is in context. – F.E Noel Nfebe – 2019-02-04T07:46:04.367

Thanks a little time has passed scince I posted the question. And had to destroy the droplet and recreate it from a backup. I cannot replicate the porble so I can not test your solution but thanks and I hop eit helps someone else. – Marco Santana – 2019-02-06T23:00:28.070

Cool, I it added to document for future referencing of anyone who stumble on a similar problem. – F.E Noel Nfebe – 2019-02-06T23:03:28.250