Sei sulla pagina 1di 3

Sudo passwd root %activar root

su
gedit /etc/lightdm/lightdm.conf % activar sudo
[SeatDefault]
greeter-session=unity-greeter
user-session=ubuntu
greeter-show-manual-login=true

apt-get update %actualizar paquetes

sudo nano /etc/network/interfaces % ip estatica

# interfaces(5) file used by ifup(8) and ifdown(8)


source /etc/network/interfaces.d/*

#the loopback network interfaces


auto lo
iface
lo inet loopback

#the primary network interfaces


auto emp0s3
iface emp0s3 inet static
address 192.168.1.10
netmask 255.255.255.0
network 192.168.1
broadcast 192.168.1.255
dns-nameservers 192.168.1.10

iface eth0 inet6 static


address ::1
netmask 128
dns-nameservers ::1

auto eth1
iface eth1 dhcp

sudo apt-get install bind9 % instalar bind9

sudo cp /etc/bind/named.conf.local /etc/bind/named.conf.local.copia % hacer una copia

cd /etc/bind/ % entramos para editar el archivo del dns


sudo gedit /etc/bind/named.conf.local % editamos el archivo

//zona de busqueda directa


zone"usb.local"{
type master;
file "/etc/bind/db.usb.local";
};

// zona de busqueda indirecta


zone"1.168.192.in-addr.arpa"{
type master;
file "/etc/bind/db.192.168.1";
};

//zone"1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa"{
type master;
file "/etc/bind/db.255";
};

named-checkconf % sirve para chequear la sintaxis de los ficheros de la conf. BIND

sudo cp /etc/bind/db.127 /etc/bind/db.192.168.1

sudo gedit /etc/bind/db.usb.local %Tabla de la búsqueda directa DNS


El siguiente archivo a editar es el que contendrá las tablas de la búsqueda directa
NS=NAME SERVER A=ADDRESS
;Bind data file for local loopback interface

$TIL 604800
@ IN SOA usb.com. root.usb.local. (
2 ;Serial
604800 ;Refresh
86400 ;Retry
2419200 ;Expire
604800 ) ;Negative cache TTL

;
@ IN NS usb.local.
@ IN A 192.168.1.10
server IN CNAME 192.168.1.10
server IN AAA ::1
www IN A 192.168.1.10
ns IN A 192.168.1.10

named-checkzone usb.local /etc/bind/db.usb.local % verificamos la sintaxis

sudo gedit /etc/bind/db.192.168.1 % tabla de redirreccionamiento inversa


;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA usb.local. root.usb.local. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.
10 IN PTR ns.usb.local.
10 IN PTR www.
10 IN PTR server.
10 IN PTR usb.local.

named-checkzone usb.local /etc/bind/db.192.168.1 % verificamos la sintaxis

sudo /etc/init.d/bind9 restart %iniciar server

reboot

iniciar la terminal
host ns.usb.local

nslookup
www.usb.local
usb.local
192.168.1.10
exit

sudo gedit /etc/resolv.conf


nameserver 192.168.1.10

nslookup
www.usb.local
192.168.1.10
exit

Potrebbero piacerti anche