0

This question already has an answer here:

I've recently received an image of CentOS 7 and I'm having issues with resolving hosts. I'm currently on a company's VPN and all company's resources are available to me.

The problem is: nothing else is available. I've been trying to access websites like google.com and github.com and I'm getting errors like

unknown host google.com

How do I configure my resolver to fix this?

Contents of my /etc/resolv.conf:

# Generated by NetworkManager
search vbox
nameserver 10.3.1.1
nameserver 10.3.1.2
nameserver 172.23.28.7
# NOTE: the libc resolver may not support more than 3 nameservers.
# The nameservers listed below may not be recognized.
nameserver 172.23.28.8

Result of host google.com 8.8.8.8

Using domain server:
Name: 8.8.8.8
Address: 8.8.8.8#53
Aliases:

google.com has address 216.58.208.142
google.com has IPv6 address 2a00:1450:4009:803::200e
google.com mail is handled by 10 aspmx.l.google.com.
google.com mail is handled by 20 alt1.aspmx.l.google.com.
google.com mail is handled by 50 alt4.aspmx.l.google.com.
google.com mail is handled by 40 alt3.aspmx.l.google.com.
google.com mail is handled by 30 alt2.aspmx.l.google.com.

Result of dig @8.8.8.8 google.com

; <<>> DiG 9.9.4-RedHat-9.9.4-29.el7_2.3 <<>> @8.8.8.8 google.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57064
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;google.com.                    IN      A

;; ANSWER SECTION:
google.com.             299     IN      A       216.58.208.174

;; Query time: 25 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri Dec 02 11:13:43 GMT 2016
;; MSG SIZE  rcvd: 55

marked as duplicate by Christopher, HalosGhost, Wouter Verhelst, Eric Renouf, mdpc Dec 2 '16 at 17:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Can you reach any of the nameserver 10.3.1.1,10.3.1.2,172.23.28.7,172.23.28.8? and if you are, are you sure that the one you can reach is working correct ? – Wissam Roujoulah Dec 2 '16 at 10:48
  • @WissamAl-Roujoulah Yes, I can ping them all by IP – SergeyOvchinnik Dec 2 '16 at 10:50
  • 2
    @WissamAl-Roujoulah I've tried adding 8.8.8.8 as a nameserver to /etc/resolv.conf but seems like nothing changes, it still can't resolve google.com – SergeyOvchinnik Dec 2 '16 at 10:54
  • 1
    can you ping 8.8.8.8 ? – Wissam Roujoulah Dec 2 '16 at 10:57
  • 1
    @WissamAl-Roujoulah I've added the outputs of both to my question – SergeyOvchinnik Dec 2 '16 at 11:18
0

So far I've just added line nameserver 8.8.8.8 into my /etc/resolv.conf before all other nameserver lines and that fixed the issue. I'm still concerned about this change getting overwritten by NetworkManager though

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