0% found this document useful (0 votes)
13 views2 pages

Chuleta

The document provides instructions for configuring FTP, DHCP, and DNS services on Ubuntu servers. It includes steps for setting up vsftpd for FTP, isc-dhcp-server for DHCP, and Bind for DNS including configuration of master and slave DNS servers with zone delegation.

Uploaded by

apolion666
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views2 pages

Chuleta

The document provides instructions for configuring FTP, DHCP, and DNS services on Ubuntu servers. It includes steps for setting up vsftpd for FTP, isc-dhcp-server for DHCP, and Bind for DNS including configuration of master and slave DNS servers with zone delegation.

Uploaded by

apolion666
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

FTP

netplan sudo su;sesión root /etc/vsftpd.conf cat /var/log/vsftpd.log


network: ls -l /srv->/srv/ftp creado anonymous_enable=yes Ver log
versión: 2 local_enable=yes
renderer: networkd write_enable=yes
[allow_writeable_chroot=YES]
ethernets:
ps -ef |grep vsftpd[status] adduser nombre /etc/init.d/vsftpd stop
enp0s3:
crear ficheros [touch] en
#dhpc:true cada home y en /srv/ftp
addresses: [x.x.x.x/x] netstat -ltn [port 21 abierto] CONFIGURAR IP WIN y probar /etc/init.d/vsftpd start
gateway4: x.x.x.x cp /etc/vsftpd /etc/vsftpdcop Enjaular usu en su home /etc/init.d/vsftpd status
chroot_local_user=YES

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;

failover peer “FAILOVER” { failover peer “FAILOVER” {


primary; secondary;
address 192.168.1.2; address 192.168.1.3;
port 647; port 647;
peer address 192.168.1.3; peer address 192.168.1.2;
peer port 647; peer port 647;
max-unacked-updates 10; max-unacked-updates 10;
max-response-delay 30; max-response-delay 30;
load balance max seconds 3; load balance max seconds 3;
mclt 1800; }
split 128;
} subnet 192.168.1.0 netmask 255.255.255.0 {
option broadcast-address 192.168.1.255;
subnet 192.168.1.0 netmask 255.255.255.0 { option routers 192.168.1.1;
option broadcast-address 192.168.1.255; option domain.name-servers 8.8.8.8 8.8.4.4;
option routers 192.168.1.1; pool {
option domain.name-servers 8.8.8.8 8.8.4.4; failover peer “FAILOVER”;
pool { max-lease-time 3600;
failover peer “FAILOVER”; range 192.168.1.4 192.168.1.20;
max-lease-time 3600; }
range 192.168.1.4 192.168.1.20; }
}
}

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; };
}

db.master.zona1 (db.local) ++ db.192.168.1 (db.127)


$TTL 604800 $TTL 604800
@ IN SOA www.zona1. root.zona1. ( @ IN SOA www.zona1. root.zona1. {
2 ;Serial 2 ;Serial
604800 ;Refresh 604800 ;Refresh
86400 ;Restry 86400 ;Restry
2419200 ;Expire 2419200 ;Expire
604800 ) ;Negative Cache TTL 604800 ) ;Negative Cache TTL
; ;
@ IN NS www.zona1. @ IN NS zona1.
2 IN PTR www.zona1.
www IN A 192.168.1.2 5 IN PTR pc1.zona1.
pc1 IN A 192.168.1.5 6 IN PTR pc2.zona1.
pc2 IN A 192.168.1.6

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
};

Si da fallo y está todo bien modificar /etc/resolv.conf


nameserver 192.168.1.x ->poner ip del servidor con el que no se comunica

You might also like