ping 8.8.8.8 works but ping www.google.com doesn't
up vote
5
down vote
favorite
I'm running ubuntu server 16.04.2 and apt-get update
returns temporary failure resolving "everything on the list".
- When I ping www.google.com, it responds with unknown host.
- When I ping with 8.8.8.8, I get packets sent with no errors etc.
I have tried every "fix" I can find in Ubuntu forums and all over the
rest of the internet world and nothing works. The resolv.conf
is
empty, ifconfig shows nic is functioning, firewall is off, and I
threw away the hammer just in case. Unfortunately, I am typing this
on another computer on the same network but can't attach text from the
various outputs to show whats going on. Need help on this please.
The resolv.conf file contains these lines:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
search 8.8.8.8 8.8.4.4
The last line is placed their by the interfaces file when you reboot the system. This is new for 16.04LTS. I'm thinking Windows NT4 wasn't so bad and neither was Ubuntu Server 12.
networking server internet dns
|
show 5 more comments
up vote
5
down vote
favorite
I'm running ubuntu server 16.04.2 and apt-get update
returns temporary failure resolving "everything on the list".
- When I ping www.google.com, it responds with unknown host.
- When I ping with 8.8.8.8, I get packets sent with no errors etc.
I have tried every "fix" I can find in Ubuntu forums and all over the
rest of the internet world and nothing works. The resolv.conf
is
empty, ifconfig shows nic is functioning, firewall is off, and I
threw away the hammer just in case. Unfortunately, I am typing this
on another computer on the same network but can't attach text from the
various outputs to show whats going on. Need help on this please.
The resolv.conf file contains these lines:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
search 8.8.8.8 8.8.4.4
The last line is placed their by the interfaces file when you reboot the system. This is new for 16.04LTS. I'm thinking Windows NT4 wasn't so bad and neither was Ubuntu Server 12.
networking server internet dns
1
How is your system getting it's IP address? Is it coming from a DHCP server? It is a static IP? Being able to ping the IP address will work without a DNS server IP setup. But it sounds like you don't have a DNS address setup or your DHCP is not supplying it.
– Terrance
Feb 23 '17 at 4:43
IP is static. I never setup the DNS server when I installed the server software.
– Gary Mercer
Feb 23 '17 at 4:47
Look at askubuntu.com/questions/143819/… and add your DNS entry for like the Google DNS Servers at 8.8.8.8 and 8.8.4.4
– Terrance
Feb 23 '17 at 4:50
I did all that. My static ip is coming from at&t vdsl box. Im using their dns name-servers and dns-search ip's. Only thing I can deduce is that at&t is blocking the dns querys.
– Gary Mercer
Feb 23 '17 at 4:56
Interesting. Maybe you might want to contact AT&T and see if they are blocking it in anyway. I guess you could try replacing their DNS servers with the Google DNS servers and see if that works.
– Terrance
Feb 23 '17 at 5:03
|
show 5 more comments
up vote
5
down vote
favorite
up vote
5
down vote
favorite
I'm running ubuntu server 16.04.2 and apt-get update
returns temporary failure resolving "everything on the list".
- When I ping www.google.com, it responds with unknown host.
- When I ping with 8.8.8.8, I get packets sent with no errors etc.
I have tried every "fix" I can find in Ubuntu forums and all over the
rest of the internet world and nothing works. The resolv.conf
is
empty, ifconfig shows nic is functioning, firewall is off, and I
threw away the hammer just in case. Unfortunately, I am typing this
on another computer on the same network but can't attach text from the
various outputs to show whats going on. Need help on this please.
The resolv.conf file contains these lines:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
search 8.8.8.8 8.8.4.4
The last line is placed their by the interfaces file when you reboot the system. This is new for 16.04LTS. I'm thinking Windows NT4 wasn't so bad and neither was Ubuntu Server 12.
networking server internet dns
I'm running ubuntu server 16.04.2 and apt-get update
returns temporary failure resolving "everything on the list".
- When I ping www.google.com, it responds with unknown host.
- When I ping with 8.8.8.8, I get packets sent with no errors etc.
I have tried every "fix" I can find in Ubuntu forums and all over the
rest of the internet world and nothing works. The resolv.conf
is
empty, ifconfig shows nic is functioning, firewall is off, and I
threw away the hammer just in case. Unfortunately, I am typing this
on another computer on the same network but can't attach text from the
various outputs to show whats going on. Need help on this please.
The resolv.conf file contains these lines:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
search 8.8.8.8 8.8.4.4
The last line is placed their by the interfaces file when you reboot the system. This is new for 16.04LTS. I'm thinking Windows NT4 wasn't so bad and neither was Ubuntu Server 12.
networking server internet dns
networking server internet dns
edited Feb 23 '17 at 6:09
asked Feb 23 '17 at 4:20
Gary Mercer
11115
11115
1
How is your system getting it's IP address? Is it coming from a DHCP server? It is a static IP? Being able to ping the IP address will work without a DNS server IP setup. But it sounds like you don't have a DNS address setup or your DHCP is not supplying it.
– Terrance
Feb 23 '17 at 4:43
IP is static. I never setup the DNS server when I installed the server software.
– Gary Mercer
Feb 23 '17 at 4:47
Look at askubuntu.com/questions/143819/… and add your DNS entry for like the Google DNS Servers at 8.8.8.8 and 8.8.4.4
– Terrance
Feb 23 '17 at 4:50
I did all that. My static ip is coming from at&t vdsl box. Im using their dns name-servers and dns-search ip's. Only thing I can deduce is that at&t is blocking the dns querys.
– Gary Mercer
Feb 23 '17 at 4:56
Interesting. Maybe you might want to contact AT&T and see if they are blocking it in anyway. I guess you could try replacing their DNS servers with the Google DNS servers and see if that works.
– Terrance
Feb 23 '17 at 5:03
|
show 5 more comments
1
How is your system getting it's IP address? Is it coming from a DHCP server? It is a static IP? Being able to ping the IP address will work without a DNS server IP setup. But it sounds like you don't have a DNS address setup or your DHCP is not supplying it.
– Terrance
Feb 23 '17 at 4:43
IP is static. I never setup the DNS server when I installed the server software.
– Gary Mercer
Feb 23 '17 at 4:47
Look at askubuntu.com/questions/143819/… and add your DNS entry for like the Google DNS Servers at 8.8.8.8 and 8.8.4.4
– Terrance
Feb 23 '17 at 4:50
I did all that. My static ip is coming from at&t vdsl box. Im using their dns name-servers and dns-search ip's. Only thing I can deduce is that at&t is blocking the dns querys.
– Gary Mercer
Feb 23 '17 at 4:56
Interesting. Maybe you might want to contact AT&T and see if they are blocking it in anyway. I guess you could try replacing their DNS servers with the Google DNS servers and see if that works.
– Terrance
Feb 23 '17 at 5:03
1
1
How is your system getting it's IP address? Is it coming from a DHCP server? It is a static IP? Being able to ping the IP address will work without a DNS server IP setup. But it sounds like you don't have a DNS address setup or your DHCP is not supplying it.
– Terrance
Feb 23 '17 at 4:43
How is your system getting it's IP address? Is it coming from a DHCP server? It is a static IP? Being able to ping the IP address will work without a DNS server IP setup. But it sounds like you don't have a DNS address setup or your DHCP is not supplying it.
– Terrance
Feb 23 '17 at 4:43
IP is static. I never setup the DNS server when I installed the server software.
– Gary Mercer
Feb 23 '17 at 4:47
IP is static. I never setup the DNS server when I installed the server software.
– Gary Mercer
Feb 23 '17 at 4:47
Look at askubuntu.com/questions/143819/… and add your DNS entry for like the Google DNS Servers at 8.8.8.8 and 8.8.4.4
– Terrance
Feb 23 '17 at 4:50
Look at askubuntu.com/questions/143819/… and add your DNS entry for like the Google DNS Servers at 8.8.8.8 and 8.8.4.4
– Terrance
Feb 23 '17 at 4:50
I did all that. My static ip is coming from at&t vdsl box. Im using their dns name-servers and dns-search ip's. Only thing I can deduce is that at&t is blocking the dns querys.
– Gary Mercer
Feb 23 '17 at 4:56
I did all that. My static ip is coming from at&t vdsl box. Im using their dns name-servers and dns-search ip's. Only thing I can deduce is that at&t is blocking the dns querys.
– Gary Mercer
Feb 23 '17 at 4:56
Interesting. Maybe you might want to contact AT&T and see if they are blocking it in anyway. I guess you could try replacing their DNS servers with the Google DNS servers and see if that works.
– Terrance
Feb 23 '17 at 5:03
Interesting. Maybe you might want to contact AT&T and see if they are blocking it in anyway. I guess you could try replacing their DNS servers with the Google DNS servers and see if that works.
– Terrance
Feb 23 '17 at 5:03
|
show 5 more comments
6 Answers
6
active
oldest
votes
up vote
7
down vote
accepted
You need a Name Server in your /etc/resolv.conf
file. Edit your /etc/resolv.conf
and add a working Name Server. Google provides a free one, 8.8.8.8
.
Do this:
$ nano /etc/resolv.conf
Place this as the first non-commented line:
nameserver 8.8.8.8
You can verify this functionality with:
$ ping -c10 www.google.com
You can make this change permanent by adding the line to this file your /etc/resolvconf/resolv.conf.d/head
file.
Whoopie! Success! excuse me, 36 straight hours banging on this box... It worked. I even put in the at&t ip's and it worked. Thanks to all you guys for your help and quickness. (Mr. Moderator, these guys needed a pat on the back so ease up on the whole emotionless junk)
– Gary Mercer
Feb 23 '17 at 6:26
add a comment |
up vote
2
down vote
Could you post a link to the page that told you that file resolv.conf should be empty? My guess is that it is misleading at best.
Edit that file with command sudo nano /etc/resolv.conf
and put there a single line:
nameserver 8.8.8.8
That should fix your name resolution and the various programs that use it - ping, apt-get, etc.
You also ought to investigate why resolv.conf is empty. Perhaps your DHCP server isn't configured properly.
This is what the file contains: # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN search 8.8.8.8 8.8.4.4 The last line is placed their by the interfaces file when you reboot the system.
– Gary Mercer
Feb 23 '17 at 5:12
@GaryMercer please add that to your question. It's difficult to read in a comment.
– wjandrea
Feb 23 '17 at 5:44
add a comment |
up vote
1
down vote
The marked answer actually doesn't work on Ubuntu 18.04.01. To fix this issue, here's what I did:
- Execute
sudo gedit /usr/lib/systemd/resolv.conf
- Paste
nameserver 8.8.8.8
(and/or any other nameserver(s) you want), then save and exit. - Add a symlink by executing
sudo ln -sf /usr/lib/systemd/resolv.conf /etc/resolv.conf
Credits to https://askubuntu.com/a/1050280/899241
add a comment |
up vote
0
down vote
Not an good idea on Ubuntu 16.04.x just overwriting /etc/resolv.conf
. The OS will overwrite it for its own most likely.
The file /etc/resolv.conf
is usually a symbolic link to another file:
ls -lisa /etc/resolv.conf
1310924 0 lrwxrwxrwx 1 root root 29 Jul 13 2016 /etc/resolv.conf -> ../run/resolvconf/resolv.conf
which means it is correct and you can edit it, but most likely another program is going to overwrite it. I'm going to guess you have NetworkManager installed. To my knowledge this service manages the content of your resolve. So you really should try to setup that one. (On other Hand NetworkManager could be disabled on you system. You might have to tell me.)
Try nmtui
and add there the correct DNS Server. I also would use 8.8.8.8
only as secondary DNS. Your primary DNS should be a machine or router nearby your local network or whatever you have there...
No network-manager. Its a server with no gui. I did get dnsutils installed before it quit connecting to the repositories.
– Gary Mercer
Feb 23 '17 at 6:04
@Gary Mercer: how do you bring the network interface then? (ifup and ifdown?) The Network Managers GUI is an optional component.nmtui
is the text-based of that one.
– Gerhard Stein
Feb 23 '17 at 14:49
I bring the nic up by rebooting the system. Since its a server, it never gets turned "off." I have found that using restart services doesn't always work because of the other inter-related components that make up all the services that use the interface. Its just easier and most efficient to restart all the services with a simple reboot command.
– Gary Mercer
Feb 24 '17 at 4:23
By rebooting your system something "a manager" has to bring your devices. In which did you configure the static IP Addresses?
– Gerhard Stein
Feb 24 '17 at 12:40
add a comment |
up vote
0
down vote
You are facing a problem related to DNS Server that you have specified for you system. Check your nameserver entry in /etc/resolv.conf.
The problem is , ping command is not able to identify what is "www.google.com" because your DNS server is not able to resolve it and provide google actual IP address(every server can only be accessed by its IP address)
Solution
Edit the entry in /etc/resolv.conf
Either provide a correct DNS server of a choice in /etc/resolve.conf that can resolve "www.google.com"
or
You can specify your local system resolver whose IP address is 127.0.0.53 by adding line
nameserver 127.0.0.53
or
provide google's DNS server IP(any one of them)
8.8.8.8 or 8.8.4.4
nameserver 8.8.8.8
P.S You can get the actual working of DNS to understand better
https://www.dnsknowledge.com/whatis/how-domain-name-servers-work/
add a comment |
up vote
-2
down vote
The issue we addressed here is one that boiled down to resolving domain names to an ip address internally. Since version 15 of Ubuntu server, i believe, uses a system of dynamic configuration files that change every time the service or system is restarted or rebooted. If the administrator makes a change to resolv.conf file, those changes are deleted when the resolver service is restarted.
To make changes permanent, Ubuntu has made a way to make user changes permanent without affecting the dynamic configuration of the config files. The suggestion from L.D. James (above) was to add the changes I needed to make to the /etc/resolvconf/resolv.conf.d/head
file.
This made the changes permanent and solved the problem of resolving domain names error message host not found
. It is the solution to setting the dns nameserver in the interfaces file and then getting it to the resolver as well. Thank you all for your supreme efforts in solving this puzzle.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f886359%2fping-8-8-8-8-works-but-ping-www-google-com-doesnt%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
6 Answers
6
active
oldest
votes
6 Answers
6
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
7
down vote
accepted
You need a Name Server in your /etc/resolv.conf
file. Edit your /etc/resolv.conf
and add a working Name Server. Google provides a free one, 8.8.8.8
.
Do this:
$ nano /etc/resolv.conf
Place this as the first non-commented line:
nameserver 8.8.8.8
You can verify this functionality with:
$ ping -c10 www.google.com
You can make this change permanent by adding the line to this file your /etc/resolvconf/resolv.conf.d/head
file.
Whoopie! Success! excuse me, 36 straight hours banging on this box... It worked. I even put in the at&t ip's and it worked. Thanks to all you guys for your help and quickness. (Mr. Moderator, these guys needed a pat on the back so ease up on the whole emotionless junk)
– Gary Mercer
Feb 23 '17 at 6:26
add a comment |
up vote
7
down vote
accepted
You need a Name Server in your /etc/resolv.conf
file. Edit your /etc/resolv.conf
and add a working Name Server. Google provides a free one, 8.8.8.8
.
Do this:
$ nano /etc/resolv.conf
Place this as the first non-commented line:
nameserver 8.8.8.8
You can verify this functionality with:
$ ping -c10 www.google.com
You can make this change permanent by adding the line to this file your /etc/resolvconf/resolv.conf.d/head
file.
Whoopie! Success! excuse me, 36 straight hours banging on this box... It worked. I even put in the at&t ip's and it worked. Thanks to all you guys for your help and quickness. (Mr. Moderator, these guys needed a pat on the back so ease up on the whole emotionless junk)
– Gary Mercer
Feb 23 '17 at 6:26
add a comment |
up vote
7
down vote
accepted
up vote
7
down vote
accepted
You need a Name Server in your /etc/resolv.conf
file. Edit your /etc/resolv.conf
and add a working Name Server. Google provides a free one, 8.8.8.8
.
Do this:
$ nano /etc/resolv.conf
Place this as the first non-commented line:
nameserver 8.8.8.8
You can verify this functionality with:
$ ping -c10 www.google.com
You can make this change permanent by adding the line to this file your /etc/resolvconf/resolv.conf.d/head
file.
You need a Name Server in your /etc/resolv.conf
file. Edit your /etc/resolv.conf
and add a working Name Server. Google provides a free one, 8.8.8.8
.
Do this:
$ nano /etc/resolv.conf
Place this as the first non-commented line:
nameserver 8.8.8.8
You can verify this functionality with:
$ ping -c10 www.google.com
You can make this change permanent by adding the line to this file your /etc/resolvconf/resolv.conf.d/head
file.
answered Feb 23 '17 at 6:08
L. D. James
18k43584
18k43584
Whoopie! Success! excuse me, 36 straight hours banging on this box... It worked. I even put in the at&t ip's and it worked. Thanks to all you guys for your help and quickness. (Mr. Moderator, these guys needed a pat on the back so ease up on the whole emotionless junk)
– Gary Mercer
Feb 23 '17 at 6:26
add a comment |
Whoopie! Success! excuse me, 36 straight hours banging on this box... It worked. I even put in the at&t ip's and it worked. Thanks to all you guys for your help and quickness. (Mr. Moderator, these guys needed a pat on the back so ease up on the whole emotionless junk)
– Gary Mercer
Feb 23 '17 at 6:26
Whoopie! Success! excuse me, 36 straight hours banging on this box... It worked. I even put in the at&t ip's and it worked. Thanks to all you guys for your help and quickness. (Mr. Moderator, these guys needed a pat on the back so ease up on the whole emotionless junk)
– Gary Mercer
Feb 23 '17 at 6:26
Whoopie! Success! excuse me, 36 straight hours banging on this box... It worked. I even put in the at&t ip's and it worked. Thanks to all you guys for your help and quickness. (Mr. Moderator, these guys needed a pat on the back so ease up on the whole emotionless junk)
– Gary Mercer
Feb 23 '17 at 6:26
add a comment |
up vote
2
down vote
Could you post a link to the page that told you that file resolv.conf should be empty? My guess is that it is misleading at best.
Edit that file with command sudo nano /etc/resolv.conf
and put there a single line:
nameserver 8.8.8.8
That should fix your name resolution and the various programs that use it - ping, apt-get, etc.
You also ought to investigate why resolv.conf is empty. Perhaps your DHCP server isn't configured properly.
This is what the file contains: # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN search 8.8.8.8 8.8.4.4 The last line is placed their by the interfaces file when you reboot the system.
– Gary Mercer
Feb 23 '17 at 5:12
@GaryMercer please add that to your question. It's difficult to read in a comment.
– wjandrea
Feb 23 '17 at 5:44
add a comment |
up vote
2
down vote
Could you post a link to the page that told you that file resolv.conf should be empty? My guess is that it is misleading at best.
Edit that file with command sudo nano /etc/resolv.conf
and put there a single line:
nameserver 8.8.8.8
That should fix your name resolution and the various programs that use it - ping, apt-get, etc.
You also ought to investigate why resolv.conf is empty. Perhaps your DHCP server isn't configured properly.
This is what the file contains: # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN search 8.8.8.8 8.8.4.4 The last line is placed their by the interfaces file when you reboot the system.
– Gary Mercer
Feb 23 '17 at 5:12
@GaryMercer please add that to your question. It's difficult to read in a comment.
– wjandrea
Feb 23 '17 at 5:44
add a comment |
up vote
2
down vote
up vote
2
down vote
Could you post a link to the page that told you that file resolv.conf should be empty? My guess is that it is misleading at best.
Edit that file with command sudo nano /etc/resolv.conf
and put there a single line:
nameserver 8.8.8.8
That should fix your name resolution and the various programs that use it - ping, apt-get, etc.
You also ought to investigate why resolv.conf is empty. Perhaps your DHCP server isn't configured properly.
Could you post a link to the page that told you that file resolv.conf should be empty? My guess is that it is misleading at best.
Edit that file with command sudo nano /etc/resolv.conf
and put there a single line:
nameserver 8.8.8.8
That should fix your name resolution and the various programs that use it - ping, apt-get, etc.
You also ought to investigate why resolv.conf is empty. Perhaps your DHCP server isn't configured properly.
answered Feb 23 '17 at 4:49
sмurf
4,06611526
4,06611526
This is what the file contains: # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN search 8.8.8.8 8.8.4.4 The last line is placed their by the interfaces file when you reboot the system.
– Gary Mercer
Feb 23 '17 at 5:12
@GaryMercer please add that to your question. It's difficult to read in a comment.
– wjandrea
Feb 23 '17 at 5:44
add a comment |
This is what the file contains: # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN search 8.8.8.8 8.8.4.4 The last line is placed their by the interfaces file when you reboot the system.
– Gary Mercer
Feb 23 '17 at 5:12
@GaryMercer please add that to your question. It's difficult to read in a comment.
– wjandrea
Feb 23 '17 at 5:44
This is what the file contains: # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN search 8.8.8.8 8.8.4.4 The last line is placed their by the interfaces file when you reboot the system.
– Gary Mercer
Feb 23 '17 at 5:12
This is what the file contains: # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN search 8.8.8.8 8.8.4.4 The last line is placed their by the interfaces file when you reboot the system.
– Gary Mercer
Feb 23 '17 at 5:12
@GaryMercer please add that to your question. It's difficult to read in a comment.
– wjandrea
Feb 23 '17 at 5:44
@GaryMercer please add that to your question. It's difficult to read in a comment.
– wjandrea
Feb 23 '17 at 5:44
add a comment |
up vote
1
down vote
The marked answer actually doesn't work on Ubuntu 18.04.01. To fix this issue, here's what I did:
- Execute
sudo gedit /usr/lib/systemd/resolv.conf
- Paste
nameserver 8.8.8.8
(and/or any other nameserver(s) you want), then save and exit. - Add a symlink by executing
sudo ln -sf /usr/lib/systemd/resolv.conf /etc/resolv.conf
Credits to https://askubuntu.com/a/1050280/899241
add a comment |
up vote
1
down vote
The marked answer actually doesn't work on Ubuntu 18.04.01. To fix this issue, here's what I did:
- Execute
sudo gedit /usr/lib/systemd/resolv.conf
- Paste
nameserver 8.8.8.8
(and/or any other nameserver(s) you want), then save and exit. - Add a symlink by executing
sudo ln -sf /usr/lib/systemd/resolv.conf /etc/resolv.conf
Credits to https://askubuntu.com/a/1050280/899241
add a comment |
up vote
1
down vote
up vote
1
down vote
The marked answer actually doesn't work on Ubuntu 18.04.01. To fix this issue, here's what I did:
- Execute
sudo gedit /usr/lib/systemd/resolv.conf
- Paste
nameserver 8.8.8.8
(and/or any other nameserver(s) you want), then save and exit. - Add a symlink by executing
sudo ln -sf /usr/lib/systemd/resolv.conf /etc/resolv.conf
Credits to https://askubuntu.com/a/1050280/899241
The marked answer actually doesn't work on Ubuntu 18.04.01. To fix this issue, here's what I did:
- Execute
sudo gedit /usr/lib/systemd/resolv.conf
- Paste
nameserver 8.8.8.8
(and/or any other nameserver(s) you want), then save and exit. - Add a symlink by executing
sudo ln -sf /usr/lib/systemd/resolv.conf /etc/resolv.conf
Credits to https://askubuntu.com/a/1050280/899241
edited Dec 3 at 2:51
answered Dec 2 at 20:24
Ragy Morkos
112
112
add a comment |
add a comment |
up vote
0
down vote
Not an good idea on Ubuntu 16.04.x just overwriting /etc/resolv.conf
. The OS will overwrite it for its own most likely.
The file /etc/resolv.conf
is usually a symbolic link to another file:
ls -lisa /etc/resolv.conf
1310924 0 lrwxrwxrwx 1 root root 29 Jul 13 2016 /etc/resolv.conf -> ../run/resolvconf/resolv.conf
which means it is correct and you can edit it, but most likely another program is going to overwrite it. I'm going to guess you have NetworkManager installed. To my knowledge this service manages the content of your resolve. So you really should try to setup that one. (On other Hand NetworkManager could be disabled on you system. You might have to tell me.)
Try nmtui
and add there the correct DNS Server. I also would use 8.8.8.8
only as secondary DNS. Your primary DNS should be a machine or router nearby your local network or whatever you have there...
No network-manager. Its a server with no gui. I did get dnsutils installed before it quit connecting to the repositories.
– Gary Mercer
Feb 23 '17 at 6:04
@Gary Mercer: how do you bring the network interface then? (ifup and ifdown?) The Network Managers GUI is an optional component.nmtui
is the text-based of that one.
– Gerhard Stein
Feb 23 '17 at 14:49
I bring the nic up by rebooting the system. Since its a server, it never gets turned "off." I have found that using restart services doesn't always work because of the other inter-related components that make up all the services that use the interface. Its just easier and most efficient to restart all the services with a simple reboot command.
– Gary Mercer
Feb 24 '17 at 4:23
By rebooting your system something "a manager" has to bring your devices. In which did you configure the static IP Addresses?
– Gerhard Stein
Feb 24 '17 at 12:40
add a comment |
up vote
0
down vote
Not an good idea on Ubuntu 16.04.x just overwriting /etc/resolv.conf
. The OS will overwrite it for its own most likely.
The file /etc/resolv.conf
is usually a symbolic link to another file:
ls -lisa /etc/resolv.conf
1310924 0 lrwxrwxrwx 1 root root 29 Jul 13 2016 /etc/resolv.conf -> ../run/resolvconf/resolv.conf
which means it is correct and you can edit it, but most likely another program is going to overwrite it. I'm going to guess you have NetworkManager installed. To my knowledge this service manages the content of your resolve. So you really should try to setup that one. (On other Hand NetworkManager could be disabled on you system. You might have to tell me.)
Try nmtui
and add there the correct DNS Server. I also would use 8.8.8.8
only as secondary DNS. Your primary DNS should be a machine or router nearby your local network or whatever you have there...
No network-manager. Its a server with no gui. I did get dnsutils installed before it quit connecting to the repositories.
– Gary Mercer
Feb 23 '17 at 6:04
@Gary Mercer: how do you bring the network interface then? (ifup and ifdown?) The Network Managers GUI is an optional component.nmtui
is the text-based of that one.
– Gerhard Stein
Feb 23 '17 at 14:49
I bring the nic up by rebooting the system. Since its a server, it never gets turned "off." I have found that using restart services doesn't always work because of the other inter-related components that make up all the services that use the interface. Its just easier and most efficient to restart all the services with a simple reboot command.
– Gary Mercer
Feb 24 '17 at 4:23
By rebooting your system something "a manager" has to bring your devices. In which did you configure the static IP Addresses?
– Gerhard Stein
Feb 24 '17 at 12:40
add a comment |
up vote
0
down vote
up vote
0
down vote
Not an good idea on Ubuntu 16.04.x just overwriting /etc/resolv.conf
. The OS will overwrite it for its own most likely.
The file /etc/resolv.conf
is usually a symbolic link to another file:
ls -lisa /etc/resolv.conf
1310924 0 lrwxrwxrwx 1 root root 29 Jul 13 2016 /etc/resolv.conf -> ../run/resolvconf/resolv.conf
which means it is correct and you can edit it, but most likely another program is going to overwrite it. I'm going to guess you have NetworkManager installed. To my knowledge this service manages the content of your resolve. So you really should try to setup that one. (On other Hand NetworkManager could be disabled on you system. You might have to tell me.)
Try nmtui
and add there the correct DNS Server. I also would use 8.8.8.8
only as secondary DNS. Your primary DNS should be a machine or router nearby your local network or whatever you have there...
Not an good idea on Ubuntu 16.04.x just overwriting /etc/resolv.conf
. The OS will overwrite it for its own most likely.
The file /etc/resolv.conf
is usually a symbolic link to another file:
ls -lisa /etc/resolv.conf
1310924 0 lrwxrwxrwx 1 root root 29 Jul 13 2016 /etc/resolv.conf -> ../run/resolvconf/resolv.conf
which means it is correct and you can edit it, but most likely another program is going to overwrite it. I'm going to guess you have NetworkManager installed. To my knowledge this service manages the content of your resolve. So you really should try to setup that one. (On other Hand NetworkManager could be disabled on you system. You might have to tell me.)
Try nmtui
and add there the correct DNS Server. I also would use 8.8.8.8
only as secondary DNS. Your primary DNS should be a machine or router nearby your local network or whatever you have there...
answered Feb 23 '17 at 5:37
Gerhard Stein
54956
54956
No network-manager. Its a server with no gui. I did get dnsutils installed before it quit connecting to the repositories.
– Gary Mercer
Feb 23 '17 at 6:04
@Gary Mercer: how do you bring the network interface then? (ifup and ifdown?) The Network Managers GUI is an optional component.nmtui
is the text-based of that one.
– Gerhard Stein
Feb 23 '17 at 14:49
I bring the nic up by rebooting the system. Since its a server, it never gets turned "off." I have found that using restart services doesn't always work because of the other inter-related components that make up all the services that use the interface. Its just easier and most efficient to restart all the services with a simple reboot command.
– Gary Mercer
Feb 24 '17 at 4:23
By rebooting your system something "a manager" has to bring your devices. In which did you configure the static IP Addresses?
– Gerhard Stein
Feb 24 '17 at 12:40
add a comment |
No network-manager. Its a server with no gui. I did get dnsutils installed before it quit connecting to the repositories.
– Gary Mercer
Feb 23 '17 at 6:04
@Gary Mercer: how do you bring the network interface then? (ifup and ifdown?) The Network Managers GUI is an optional component.nmtui
is the text-based of that one.
– Gerhard Stein
Feb 23 '17 at 14:49
I bring the nic up by rebooting the system. Since its a server, it never gets turned "off." I have found that using restart services doesn't always work because of the other inter-related components that make up all the services that use the interface. Its just easier and most efficient to restart all the services with a simple reboot command.
– Gary Mercer
Feb 24 '17 at 4:23
By rebooting your system something "a manager" has to bring your devices. In which did you configure the static IP Addresses?
– Gerhard Stein
Feb 24 '17 at 12:40
No network-manager. Its a server with no gui. I did get dnsutils installed before it quit connecting to the repositories.
– Gary Mercer
Feb 23 '17 at 6:04
No network-manager. Its a server with no gui. I did get dnsutils installed before it quit connecting to the repositories.
– Gary Mercer
Feb 23 '17 at 6:04
@Gary Mercer: how do you bring the network interface then? (ifup and ifdown?) The Network Managers GUI is an optional component.
nmtui
is the text-based of that one.– Gerhard Stein
Feb 23 '17 at 14:49
@Gary Mercer: how do you bring the network interface then? (ifup and ifdown?) The Network Managers GUI is an optional component.
nmtui
is the text-based of that one.– Gerhard Stein
Feb 23 '17 at 14:49
I bring the nic up by rebooting the system. Since its a server, it never gets turned "off." I have found that using restart services doesn't always work because of the other inter-related components that make up all the services that use the interface. Its just easier and most efficient to restart all the services with a simple reboot command.
– Gary Mercer
Feb 24 '17 at 4:23
I bring the nic up by rebooting the system. Since its a server, it never gets turned "off." I have found that using restart services doesn't always work because of the other inter-related components that make up all the services that use the interface. Its just easier and most efficient to restart all the services with a simple reboot command.
– Gary Mercer
Feb 24 '17 at 4:23
By rebooting your system something "a manager" has to bring your devices. In which did you configure the static IP Addresses?
– Gerhard Stein
Feb 24 '17 at 12:40
By rebooting your system something "a manager" has to bring your devices. In which did you configure the static IP Addresses?
– Gerhard Stein
Feb 24 '17 at 12:40
add a comment |
up vote
0
down vote
You are facing a problem related to DNS Server that you have specified for you system. Check your nameserver entry in /etc/resolv.conf.
The problem is , ping command is not able to identify what is "www.google.com" because your DNS server is not able to resolve it and provide google actual IP address(every server can only be accessed by its IP address)
Solution
Edit the entry in /etc/resolv.conf
Either provide a correct DNS server of a choice in /etc/resolve.conf that can resolve "www.google.com"
or
You can specify your local system resolver whose IP address is 127.0.0.53 by adding line
nameserver 127.0.0.53
or
provide google's DNS server IP(any one of them)
8.8.8.8 or 8.8.4.4
nameserver 8.8.8.8
P.S You can get the actual working of DNS to understand better
https://www.dnsknowledge.com/whatis/how-domain-name-servers-work/
add a comment |
up vote
0
down vote
You are facing a problem related to DNS Server that you have specified for you system. Check your nameserver entry in /etc/resolv.conf.
The problem is , ping command is not able to identify what is "www.google.com" because your DNS server is not able to resolve it and provide google actual IP address(every server can only be accessed by its IP address)
Solution
Edit the entry in /etc/resolv.conf
Either provide a correct DNS server of a choice in /etc/resolve.conf that can resolve "www.google.com"
or
You can specify your local system resolver whose IP address is 127.0.0.53 by adding line
nameserver 127.0.0.53
or
provide google's DNS server IP(any one of them)
8.8.8.8 or 8.8.4.4
nameserver 8.8.8.8
P.S You can get the actual working of DNS to understand better
https://www.dnsknowledge.com/whatis/how-domain-name-servers-work/
add a comment |
up vote
0
down vote
up vote
0
down vote
You are facing a problem related to DNS Server that you have specified for you system. Check your nameserver entry in /etc/resolv.conf.
The problem is , ping command is not able to identify what is "www.google.com" because your DNS server is not able to resolve it and provide google actual IP address(every server can only be accessed by its IP address)
Solution
Edit the entry in /etc/resolv.conf
Either provide a correct DNS server of a choice in /etc/resolve.conf that can resolve "www.google.com"
or
You can specify your local system resolver whose IP address is 127.0.0.53 by adding line
nameserver 127.0.0.53
or
provide google's DNS server IP(any one of them)
8.8.8.8 or 8.8.4.4
nameserver 8.8.8.8
P.S You can get the actual working of DNS to understand better
https://www.dnsknowledge.com/whatis/how-domain-name-servers-work/
You are facing a problem related to DNS Server that you have specified for you system. Check your nameserver entry in /etc/resolv.conf.
The problem is , ping command is not able to identify what is "www.google.com" because your DNS server is not able to resolve it and provide google actual IP address(every server can only be accessed by its IP address)
Solution
Edit the entry in /etc/resolv.conf
Either provide a correct DNS server of a choice in /etc/resolve.conf that can resolve "www.google.com"
or
You can specify your local system resolver whose IP address is 127.0.0.53 by adding line
nameserver 127.0.0.53
or
provide google's DNS server IP(any one of them)
8.8.8.8 or 8.8.4.4
nameserver 8.8.8.8
P.S You can get the actual working of DNS to understand better
https://www.dnsknowledge.com/whatis/how-domain-name-servers-work/
answered Aug 22 at 11:37
Shubham gosain
1
1
add a comment |
add a comment |
up vote
-2
down vote
The issue we addressed here is one that boiled down to resolving domain names to an ip address internally. Since version 15 of Ubuntu server, i believe, uses a system of dynamic configuration files that change every time the service or system is restarted or rebooted. If the administrator makes a change to resolv.conf file, those changes are deleted when the resolver service is restarted.
To make changes permanent, Ubuntu has made a way to make user changes permanent without affecting the dynamic configuration of the config files. The suggestion from L.D. James (above) was to add the changes I needed to make to the /etc/resolvconf/resolv.conf.d/head
file.
This made the changes permanent and solved the problem of resolving domain names error message host not found
. It is the solution to setting the dns nameserver in the interfaces file and then getting it to the resolver as well. Thank you all for your supreme efforts in solving this puzzle.
add a comment |
up vote
-2
down vote
The issue we addressed here is one that boiled down to resolving domain names to an ip address internally. Since version 15 of Ubuntu server, i believe, uses a system of dynamic configuration files that change every time the service or system is restarted or rebooted. If the administrator makes a change to resolv.conf file, those changes are deleted when the resolver service is restarted.
To make changes permanent, Ubuntu has made a way to make user changes permanent without affecting the dynamic configuration of the config files. The suggestion from L.D. James (above) was to add the changes I needed to make to the /etc/resolvconf/resolv.conf.d/head
file.
This made the changes permanent and solved the problem of resolving domain names error message host not found
. It is the solution to setting the dns nameserver in the interfaces file and then getting it to the resolver as well. Thank you all for your supreme efforts in solving this puzzle.
add a comment |
up vote
-2
down vote
up vote
-2
down vote
The issue we addressed here is one that boiled down to resolving domain names to an ip address internally. Since version 15 of Ubuntu server, i believe, uses a system of dynamic configuration files that change every time the service or system is restarted or rebooted. If the administrator makes a change to resolv.conf file, those changes are deleted when the resolver service is restarted.
To make changes permanent, Ubuntu has made a way to make user changes permanent without affecting the dynamic configuration of the config files. The suggestion from L.D. James (above) was to add the changes I needed to make to the /etc/resolvconf/resolv.conf.d/head
file.
This made the changes permanent and solved the problem of resolving domain names error message host not found
. It is the solution to setting the dns nameserver in the interfaces file and then getting it to the resolver as well. Thank you all for your supreme efforts in solving this puzzle.
The issue we addressed here is one that boiled down to resolving domain names to an ip address internally. Since version 15 of Ubuntu server, i believe, uses a system of dynamic configuration files that change every time the service or system is restarted or rebooted. If the administrator makes a change to resolv.conf file, those changes are deleted when the resolver service is restarted.
To make changes permanent, Ubuntu has made a way to make user changes permanent without affecting the dynamic configuration of the config files. The suggestion from L.D. James (above) was to add the changes I needed to make to the /etc/resolvconf/resolv.conf.d/head
file.
This made the changes permanent and solved the problem of resolving domain names error message host not found
. It is the solution to setting the dns nameserver in the interfaces file and then getting it to the resolver as well. Thank you all for your supreme efforts in solving this puzzle.
answered Feb 24 '17 at 4:39
Gary Mercer
11115
11115
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f886359%2fping-8-8-8-8-works-but-ping-www-google-com-doesnt%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
How is your system getting it's IP address? Is it coming from a DHCP server? It is a static IP? Being able to ping the IP address will work without a DNS server IP setup. But it sounds like you don't have a DNS address setup or your DHCP is not supplying it.
– Terrance
Feb 23 '17 at 4:43
IP is static. I never setup the DNS server when I installed the server software.
– Gary Mercer
Feb 23 '17 at 4:47
Look at askubuntu.com/questions/143819/… and add your DNS entry for like the Google DNS Servers at 8.8.8.8 and 8.8.4.4
– Terrance
Feb 23 '17 at 4:50
I did all that. My static ip is coming from at&t vdsl box. Im using their dns name-servers and dns-search ip's. Only thing I can deduce is that at&t is blocking the dns querys.
– Gary Mercer
Feb 23 '17 at 4:56
Interesting. Maybe you might want to contact AT&T and see if they are blocking it in anyway. I guess you could try replacing their DNS servers with the Google DNS servers and see if that works.
– Terrance
Feb 23 '17 at 5:03