Problema com dns no linux ubuntu

1. Problema com dns no linux ubuntu

Kleber de Souza
start107

(usa Linux Mint)

Enviado em 03/02/2017 - 11:40h

Pessoal meu computador não está conseguindo navegar
descobrir que ao trocar o dns para 8.8.8.8 8.8.4.4 ele funciona normal
porem toda vez que troco quando desligo o computador ele volta o endereço antigo
segue codigo para trocar dns
sudo nano /etc/resolv.conf

# 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
nameserver 8.8.8.8
nameserver 8.8.4.4
search dlinkrouter

como não permitir que esse arquivo volte ao normal quando o computador for reiniciado


  


2. Re: Problema com dns no linux ubuntu

Carlos A. P. Cunha
Carlos_Cunha

(usa Linux Mint)

Enviado em 03/02/2017 - 11:53h

start107 escreveu:

Pessoal meu computador não está conseguindo navegar
descobrir que ao trocar o dns para 8.8.8.8 8.8.4.4 ele funciona normal
porem toda vez que troco quando desligo o computador ele volta o endereço antigo
segue codigo para trocar dns
sudo nano /etc/resolv.conf

# 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
nameserver 8.8.8.8
nameserver 8.8.4.4
search dlinkrouter

como não permitir que esse arquivo volte ao normal quando o computador for reiniciado


Opa!!

Ele é bem claro no cabeçalho do arquivo "YOUR CHANGES WILL BE OVERWRITTEN" ou seja suas alterações serão apagadas....

Adicione no arquivo interface , no bloco da sua interface de rede

vim /etc/network/interfaces


dns-nameserver 8.8.8.8
dns-nameserver 8.8.4.4


Exemplos:


auto ens160
iface ens160 inet dchp
dns-nameserver 8.8.8.8
dns-nameserver 8.8.4.4


Reinicie para validar 100%

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

"Linux is cool"


3. Re: Problema com dns no linux ubuntu

Guilherme
Ghost_Shell

(usa Arch Linux)

Enviado em 03/02/2017 - 13:26h

start107 escreveu:

Pessoal meu computador não está conseguindo navegar
descobrir que ao trocar o dns para 8.8.8.8 8.8.4.4 ele funciona normal
porem toda vez que troco quando desligo o computador ele volta o endereço antigo
segue codigo para trocar dns
sudo nano /etc/resolv.conf

# 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
nameserver 8.8.8.8
nameserver 8.8.4.4
search dlinkrouter

como não permitir que esse arquivo volte ao normal quando o computador for reiniciado


Completando a resposta do colega eu usaria o opendns.

208.67.222.222
208.67.220.220

http://idgnow.com.br/internet/2013/10/31/google-remove-servico-de-dns-no-brasil-e-transfere-solicita...

Keep it simple stupid!


4. Re: Problema com dns no linux ubuntu

Agnaldo dos Santos Lucindo
SamsonBurke

(usa Arch Linux)

Enviado em 03/02/2017 - 13:58h

Ja tentou travar a configuraçao do resolv.conf?
chattr +i /etc/resolv.conf 

_________________________________________________________________________________________ O que sera que acontece com os pacotes de arroz que sao furados por ratos no supermercado?


5. Re: Problema com dns no linux ubuntu

Carlos A. P. Cunha
Carlos_Cunha

(usa Linux Mint)

Enviado em 03/02/2017 - 14:07h

SamsonBurke escreveu:

Ja tentou travar a configuraçao do resolv.conf?
chattr +i /etc/resolv.conf 

_________________________________________________________________________________________ O que sera que acontece com os pacotes de arroz que sao furados por ratos no supermercado?


Para que fazer gambiarra , quando se tem métodos "corretos" de se fazer...
:-D

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

"Linux is cool"


6. Re: Problema com dns no linux ubuntu

Perfil removido
removido

(usa Nenhuma)

Enviado em 03/02/2017 - 14:35h

Carlos_Cunha escreveu:

SamsonBurke escreveu:

Ja tentou travar a configuraçao do resolv.conf?
chattr +i /etc/resolv.conf 

_________________________________________________________________________________________ O que sera que acontece com os pacotes de arroz que sao furados por ratos no supermercado?


Para que fazer gambiarra , quando se tem métodos "corretos" de se fazer...
:-D

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

"Linux is cool"


KKKK


Não é pelo /etc/network/interfaces e nem pelo /etc/resolv.conf



7. Re: Problema com dns no linux ubuntu

Perfil removido
removido

(usa Nenhuma)

Enviado em 03/02/2017 - 14:42h

O link me fez lembrar do livro Google LOBO EM PELE DE CORDEIRO.

http://idgnow.com.br/internet/2013/10/31/google-remove-servico-de-dns-no-brasil-e-transfere-solicita...


8. Re: Problema com dns no linux ubuntu

Carlos A. P. Cunha
Carlos_Cunha

(usa Linux Mint)

Enviado em 03/02/2017 - 14:46h


Não é pelo /etc/network/interfaces e nem pelo /etc/resolv.conf


Existe inúmeras formas, mas uma das "corretas" e sim pelo interfaces...


If the resolvconf program is installed, you should not edit the resolv.conf configuration file manually as it will be dynamically changed by programs in the system. If you need to manually define the nameservers (as with a static interface), add a line something like the following to the interfaces configuration file at /etc/network/interfaces:

dns-nameservers 12.34.56.78 12.34.56.79

Place the line indented within an iface stanza, e.g., right after the gateway line. Enter the IP addresses of the nameservers you need to use after dns-nameservers. Put all of them on one line separated by spaces. Don't forget the "s" on the end of dns-nameservers.


https://wiki.debian.org/NetworkConfiguration#The_resolv.conf_configuration_file

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

"Linux is cool"


9. Re: Problema com dns no linux ubuntu

Perfil removido
removido

(usa Nenhuma)

Enviado em 03/02/2017 - 17:07h

Carlos_Cunha escreveu:


Não é pelo /etc/network/interfaces e nem pelo /etc/resolv.conf


Existe inúmeras formas, mas uma das "corretas" e sim pelo interfaces...


If the resolvconf program is installed, you should not edit the resolv.conf configuration file manually as it will be dynamically changed by programs in the system. If you need to manually define the nameservers (as with a static interface), add a line something like the following to the interfaces configuration file at /etc/network/interfaces:

dns-nameservers 12.34.56.78 12.34.56.79

Place the line indented within an iface stanza, e.g., right after the gateway line. Enter the IP addresses of the nameservers you need to use after dns-nameservers. Put all of them on one line separated by spaces. Don't forget the "s" on the end of dns-nameservers.


https://wiki.debian.org/NetworkConfiguration#The_resolv.conf_configuration_file

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

"Linux is cool"


Bloquear a alteração do dns não é pelo arquivo interfaces.


10. Re: Problema com dns no linux ubuntu

Carlos A. P. Cunha
Carlos_Cunha

(usa Linux Mint)

Enviado em 03/02/2017 - 17:09h

meianoite escreveu:

Carlos_Cunha escreveu:


Não é pelo /etc/network/interfaces e nem pelo /etc/resolv.conf


Existe inúmeras formas, mas uma das "corretas" e sim pelo interfaces...


If the resolvconf program is installed, you should not edit the resolv.conf configuration file manually as it will be dynamically changed by programs in the system. If you need to manually define the nameservers (as with a static interface), add a line something like the following to the interfaces configuration file at /etc/network/interfaces:

dns-nameservers 12.34.56.78 12.34.56.79

Place the line indented within an iface stanza, e.g., right after the gateway line. Enter the IP addresses of the nameservers you need to use after dns-nameservers. Put all of them on one line separated by spaces. Don't forget the "s" on the end of dns-nameservers.


https://wiki.debian.org/NetworkConfiguration#The_resolv.conf_configuration_file

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

"Linux is cool"


bloquear a alteração do dns não é pelo arquivo interfaces.


Mas não é para bloquear(gambiarra, não por favor), é para fixar um que se deseja usar.


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

"Linux is cool"


11. Re: Problema com dns no linux ubuntu

Perfil removido
removido

(usa Nenhuma)

Enviado em 05/02/2017 - 22:02h

Carlos_Cunha escreveu:

meianoite escreveu:

Carlos_Cunha escreveu:


Não é pelo /etc/network/interfaces e nem pelo /etc/resolv.conf


Existe inúmeras formas, mas uma das "corretas" e sim pelo interfaces...


If the resolvconf program is installed, you should not edit the resolv.conf configuration file manually as it will be dynamically changed by programs in the system. If you need to manually define the nameservers (as with a static interface), add a line something like the following to the interfaces configuration file at /etc/network/interfaces:

dns-nameservers 12.34.56.78 12.34.56.79

Place the line indented within an iface stanza, e.g., right after the gateway line. Enter the IP addresses of the nameservers you need to use after dns-nameservers. Put all of them on one line separated by spaces. Don't forget the "s" on the end of dns-nameservers.


https://wiki.debian.org/NetworkConfiguration#The_resolv.conf_configuration_file

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

"Linux is cool"


bloquear a alteração do dns não é pelo arquivo interfaces.


Mas não é para bloquear(gambiarra, não por favor), é para fixar um que se deseja usar.


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

"Linux is cool"


Eu acho que você não entendeu quando falo em bloquear a alteração do dns estou me referindo a fixar um DNS no resolv.conf que ao reiniciar o computador ele não seja alterado sem gambiarra.

Ex:

Em determinado acesso a internet para fixa o DNS no resolv.conf, não ser altera o /etc/network/interfaces e nem o /etc/resolv.conf por que ao reinicia o computador o DNS da operadora volta ( é dominante).

Já tive o mesmo problema e a solução não foi pelos arquivos /etc/network/interfaces e nem pelo /etc/resolv.conf para fixa DNS.

Já dei o caminho das pedras para você.





12. Re: Problema com dns no linux ubuntu

Clodoaldo Santos
clodoaldops

(usa Linux Mint)

Enviado em 05/02/2017 - 22:44h

-se seu problema é conecta e não navega tente esta dica
https://www.vivaolinux.com.br/dica/Ubuntu-1404-Conecta-mas-nao-navega-Resolvido-1


*******************************************
Meu Blog
http://dicaslinuxmint.blogspot.com.br/



01 02



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts