Para configurar el dns en linux tenemos que modificar el fichero /etc/resolv.conf y /etc/network/interfaces.
Para añadirlo en el fichero /etc/resolv.conf basta con añadir la linea nameserver IP_SERVIDOR_DNS, quedando el fichero de una manera similar a esta:
root@pre:~# more /etc/resolv.conf
nameserver 10.0.10.25
Por otro lado tendremos que modificar el fichero /etc/network/interfaces y añadirle la propiedad dns-nameservers IP_SERVIDOR_DNS, quedando de una manera similar a esta:
root@pre:~# vi /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 10.0.10.66
netmask 255.255.255.128
network 10.0.10.0
broadcast 10.0.10.255
gateway 10.0.10.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 10.0.10.25
No hay comentarios:
Publicar un comentario