Troubleshoot: the server cannot reach anything outside
A server can talk to its neighbors but not to the internet. Work out whether it is a name problem or a route problem, find the wrong setting, and fix it with the command line.
Part of the path Linux server foundations (step 5 of 6), next: Install Ubuntu Server
Part of the path Troubleshooting (step 4 of 7), next: Troubleshoot: a desk went dead overnight
The report
From Priya Raman, developer
app01 cannot reach anything outside the office
I can SSH to app01 and it talks to the database server on our network, but nothing outside works. Pinging example.com fails, apt hangs, and the call to our payment provider times out. We did not change the app. IT moved the network cabinet last week, though.
Impact: Deploys are blocked and the nightly update job has failed twice.
What you will do
7 tasks1.See the problem for yourself
Ping a name and an address outside the network, and notice how the two failures differ.
2.Check the local network
Ping the neighbor at 10.0.1.20.
3.Look at where traffic for other networks goes
Names are one thing, but 8.8.8.8 needs no name and still failed, so this is not only a name problem.
4.Rule out the name server
Look at which name server the machine uses with cat /etc/resolv.conf.
5.Test the gateway
Ping the default gateway you found with ip route.
6.Make the change
Make the change that points the machine at the right gateway.
7.Prove it works
Ping example.com again, then fetch it with curl example.com.