DNS não resolve nomes.

1. DNS não resolve nomes.

Allan Belém
4o8o4

(usa CentOS)

Enviado em 14/10/2016 - 19:02h

Boa noite,
Uso uma VM de centos para as atividades da minha facul que focam muito em centos. Estou com essa dificuldade, só consigo dar ping para ip's, gostaria de resolver com ajuda de vocês, entendo pouco de linux, editei meu /etc/resolv.conf para o dns 8.8.8.8... não resolveu.


  


2. Re: DNS não resolve nomes.

Carlos A. P. Cunha
Carlos_Cunha

(usa Linux Mint)

Enviado em 15/10/2016 - 16:03h

4o8o4 escreveu:

Boa noite,
Uso uma VM de centos para as atividades da minha facul que focam muito em centos. Estou com essa dificuldade, só consigo dar ping para ip's, gostaria de resolver com ajuda de vocês, entendo pouco de linux, editei meu /etc/resolv.conf para o dns 8.8.8.8... não resolveu.


Deixe seu /etc/resolv.conf assim:

echo "nameserver 8.8.8.8" > /etc/resolv.conf
echo "nameserver 8.8.4.4" >> /etc/resolv.conf


Se isso não funcionar, pode ser que os DNS do google estejam bloqueado na sua faculdade.

#-------------------------------------------------------------------------------------#

"Linux is cool"


3. Re: DNS não resolve nomes.

Allan Belém
4o8o4

(usa CentOS)

Enviado em 15/10/2016 - 20:12h

Fiz como você me passou,dns secundário e primário, não resolveu... eu acesso de casa, inclusive criada em casa foi retirada da minha outra máquina.

Talves isso possa ser importante, se aqui for o firewall está assim:
/etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
#$IPTABLES -P FORWARD DROP
#$IPTABLES -P INPUT DROP




4. Re: DNS não resolve nomes.

Estefanio Brunhara
stefaniobrunhara

(usa CentOS)

Enviado em 15/10/2016 - 21:31h

sua vm tem routa default ?
veja abaixo a minha tem o 254 como sendo o route default




route -n
Tabela de Roteamento IP do Kernel
Destino Roteador MáscaraGen. Opções Métrica Ref Uso Iface
192.168.0.0 0.0.0.0 255.255.252.0 U 0 0 0 eth0
0.0.0.0 192.168.0.254 0.0.0.0 UG 0 0 0 eth0



5. Re: DNS não resolve nomes.

Carlos A. P. Cunha
Carlos_Cunha

(usa Linux Mint)

Enviado em 16/10/2016 - 10:42h

4o8o4 escreveu:

Fiz como você me passou,dns secundário e primário, não resolveu... eu acesso de casa, inclusive criada em casa foi retirada da minha outra máquina.

Talves isso possa ser importante, se aqui for o firewall está assim:
/etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
#$IPTABLES -P FORWARD DROP
#$IPTABLES -P INPUT DROP



Os DNS server que usou foi o que passei do Google né?
Consegue pingar o ip 8.8.8.8 ??
Cole a saída dos dois comandos abaixo:

Ip r
Ip r g 8.8.8.8



#-------------------------------------------------------------------------------------#

"Linux is cool"


6. Re: DNS não resolve nomes.

Allan Belém
4o8o4

(usa CentOS)

Enviado em 16/10/2016 - 16:32h

Tabela de Roteamento IP do Kernel
Destino Roteador MáscaraGen. Opções Métrica Ref Uso Iface
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 0 eth0


Parece ter :/

Ops. desculpa, ficou faltando um procedimento que me pediu

ip r g 8.8.8.8
192.168.2.0/24 dev eth0 proto kernel scope link src 192.168.2.139
169.254.0.0/16 dev eth0 scope link metric 1002
default via 192.168.2.1 dev eth0

ip r
8.8.8.8 via 192.168.2.1 dev eth0 src 192.168.2.139
cache mtu 1500 advmss 1460 hoplimit 64


Sim! Aí que está, dou ping para qualquer ip de sites, inclusive o dns 8.8.8.8.




7. Re: DNS não resolve nomes.

Carlos A. P. Cunha
Carlos_Cunha

(usa Linux Mint)

Enviado em 16/10/2016 - 18:18h

Execute so 2 comando e poste aqui:

mtr -n --report --report-cycles=10 8.8.8.8

e

dig www.google.com @8.8.8.8


#-------------------------------------------------------------------------------------#

"Linux is cool"


8. Re: DNS não resolve nomes.

Allan Belém
4o8o4

(usa CentOS)

Enviado em 16/10/2016 - 19:26h

Carlos_Cunha escreveu:

Execute so 2 comando e poste aqui:

mtr -n --report --report-cycles=10 8.8.8.8

e

dig www.google.com @8.8.8.8



mtr -n --report --report-cycles=10 8.8.8.8
HOST: allan                       Loss%   Snt   Last   Avg  Best  Wrst StDev
1. 192.168.2.1 0.0% 10 1.3 2.1 1.2 6.7 1.7
2. 177.85.169.1 0.0% 10 9.5 9.3 5.3 16.4 3.1
3. 177.19.169.1 0.0% 10 30.5 34.2 20.6 54.9 12.8
4. 186.215.130.21 0.0% 10 30.6 33.1 24.4 59.1 10.2
5. 201.86.56.94 0.0% 10 51.3 41.4 29.7 51.3 7.2
6. 189.59.253.62 0.0% 10 55.4 51.7 36.7 79.0 12.3
7. 201.86.56.187 0.0% 10 52.6 58.8 50.3 81.6 9.9
8. 201.22.64.99 0.0% 10 51.6 53.6 48.4 65.2 5.2
9. 72.14.197.255 0.0% 10 65.5 56.5 45.7 88.5 12.8
10. 209.85.250.147 0.0% 10 54.5 51.4 47.1 55.0 2.9
11. 64.233.175.5 0.0% 10 100.3 110.4 98.9 134.4 10.9
12. 72.14.234.179 0.0% 10 98.0 108.1 98.0 133.9 10.3
13. ??? 100.0 10 0.0 0.0 0.0 0.0 0.0


dig www.google.com @8.8.8.8

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.37.rc1.el6 <<>> www.google.com @8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15272
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.google.com. IN A

;; ANSWER SECTION:
www.google.com. 84 IN A 216.58.202.4

;; Query time: 28 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sat Oct 8 15:50:52 2016
;; MSG SIZE rcvd: 48






9. Re: DNS não resolve nomes.

Carlos A. P. Cunha
Carlos_Cunha

(usa Linux Mint)

Enviado em 16/10/2016 - 19:37h

4o8o4 escreveu:

Carlos_Cunha escreveu:

Execute so 2 comando e poste aqui:

mtr -n --report --report-cycles=10 8.8.8.8

e

dig www.google.com @8.8.8.8



mtr -n --report --report-cycles=10 8.8.8.8
HOST: allan                       Loss%   Snt   Last   Avg  Best  Wrst StDev
1. 192.168.2.1 0.0% 10 1.3 2.1 1.2 6.7 1.7
2. 177.85.169.1 0.0% 10 9.5 9.3 5.3 16.4 3.1
3. 177.19.169.1 0.0% 10 30.5 34.2 20.6 54.9 12.8
4. 186.215.130.21 0.0% 10 30.6 33.1 24.4 59.1 10.2
5. 201.86.56.94 0.0% 10 51.3 41.4 29.7 51.3 7.2
6. 189.59.253.62 0.0% 10 55.4 51.7 36.7 79.0 12.3
7. 201.86.56.187 0.0% 10 52.6 58.8 50.3 81.6 9.9
8. 201.22.64.99 0.0% 10 51.6 53.6 48.4 65.2 5.2
9. 72.14.197.255 0.0% 10 65.5 56.5 45.7 88.5 12.8
10. 209.85.250.147 0.0% 10 54.5 51.4 47.1 55.0 2.9
11. 64.233.175.5 0.0% 10 100.3 110.4 98.9 134.4 10.9
12. 72.14.234.179 0.0% 10 98.0 108.1 98.0 133.9 10.3
13. ??? 100.0 10 0.0 0.0 0.0 0.0 0.0


dig www.google.com @8.8.8.8

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.37.rc1.el6 <<>> www.google.com @8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15272
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.google.com. IN A

;; ANSWER SECTION:
www.google.com. 84 IN A 216.58.202.4

;; Query time: 28 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sat Oct 8 15:50:52 2016
;; MSG SIZE rcvd: 48





Esta tudo certo tanto com Roteamento quando solicitando a o DNS Direto:
Poste a saída dos dois comando

cat /etc/resolv.conf
e
dig www.google.com
:




#-------------------------------------------------------------------------------------#

"Linux is cool"


10. Re: DNS não resolve nomes.

Allan Belém
4o8o4

(usa CentOS)

Enviado em 16/10/2016 - 21:09h

; generated by /sbin/dhclient-script
nameserver 8.8.8.8
nameserver 8.8.4.4



; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.37.rc1.el6 <<>> www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52831
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.google.com. IN A

;; ANSWER SECTION:
www.google.com. 15 IN A 216.58.202.4

;; Query time: 17 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sat Oct 8 17:05:32 2016
;; MSG SIZE rcvd: 48


ping: unknown host www.google.com

Percebo tbm que o yum não tá procurando e nem fazendo downloads.


11. Re: DNS não resolve nomes.

Carlos A. P. Cunha
Carlos_Cunha

(usa Linux Mint)

Enviado em 16/10/2016 - 21:17h

Seu problema não é mais DNS, pelo que consigo ver ali...
Do yum precisaria ver o erro que esta dando
Poste aqui
#-------------------------------------------------------------------------------------#

"Linux is cool"


12. Re: DNS não resolve nomes.

Allan Belém
4o8o4

(usa CentOS)

Enviado em 16/10/2016 - 22:46h

Carlos_Cunha escreveu:

Seu problema não é mais DNS, pelo que consigo ver ali...
Do yum precisaria ver o erro que esta dando
Poste aqui
#-------------------------------------------------------------------------------------#

"Linux is cool"


yum install tree
Plugins carregados: fastestmirror, security
Configurando o processo de instalação
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=i386&repo=os&infra=stock error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"



Tanto o search quanto install.





01 02



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts