Chuleta
Chuleta
DHCP
/etc/dhcp/dhcpd.conf
subnet 192.168.1.0 netmask 255.255.255.0 { sudo systemctl {status|start|stop|restart} TODAS LAS MAQUINAS
range 192.168.1.3 192.168.1.20; isc-dhcp-server
option routers 192.168.1.1;
EN RED INTERNA!!!
default-lease-time 600; Conf especial de windows:
max-lease-time 600; En red -> ethernet -> red no identificada ->
} editar -> automatico DHCP
Para ping entre win y Ubuntu, desactivar
host equipo1 { firewall en WINDOWS
hardware ethernet xx:xx:xx:xx:xx:xx;
fixed-address 192.168.7.21;
}
DHCP Y FAILOVER
/etc/dhcp/dhcpd.conf primario /etc/dhcp/dhcpd.conf secundario
authoritative; authoritative;
ddns-update-style none; ddns-update-style none;
DNS MASTER
netplan** /etc/bind/named.conf.options^^ /etc/bind/named.conf.local@@
network: options { zone “zona1” in {
versión: 2 directory “var/cache/bind”; type master;
renderer: networkd file “/etc/bind/db.master.zona1”;
version “no disponible”; };
ethernets: zone “1.168.192.in-addr.arpa” in {
enp0s3: listen-on port 53 {any; }; type master;
#dhpc:true file “/etc/bind/db.192.168.1”
addresses: [192.168.1.2/24] recursion yes; };
gateway4: 192.168.1.1 allow-recursion { localnets; };
nameservers:
addresses: [192.168.1.2, x.x.x.x] allow-transfer { none; };
}
sudo named-checkzone zona1 /etc/bind/zona1 ->comprobar que está bien el fichero de zona directa
sudo named-checkconf ->comprobar que está bien el de la inversa
nslookup pc1.zona1 || nslookup 192.168.1.5 -> ver si resuelve directa e inversa
service /etc/init.d/bind9 {start|stop|reload|restart|force-reload|status}
sudo service bind9 {start|stop|reload|restart|force-reload|status}
systemctl restart bind9
DNS SLAVE
netplan (mirar **) /etc/bind/named.conf.options (mirar ^^) /etc/bind/named.conf.local (mirar @@)
addresses: [192.168.1.3/24] .. .. .. .. .. .. [[al final]] .. .. .. .. todo iwal pal maestro
nameservers: notify yes; zone “zona2” in {
addresses: [192.168.1.3, 192.168.1.2] type slave;
file “/etc/bind/db.slave.zona1”;
masters { 192.168.1.2; };
allow-notify { 192.168.1.2; };
};
DNS Y DELEGACION
netplan (mirar **) /etc/bind/named.conf.local db.master.zona3 (mirar ++)
/etc/bind/named.conf.options zone “zona3.zona1” in { MODIFICAR -> db.master.zona1 (al final)
(mirar ^^) type master; zona3.zona1. IN NS www.zona3.zona1.
192.168.1.4 file “/etc/bind/db.master.zona3”; www.zona3.zona1. IN A 192.168.1.4
};