/etc/network/interfaces address 192.168.10.x network 192.168.10.0 netmask 255.255.255.0 broadcast 192.168.10.255 gateway 192.168.10.254 192.168.20.x network 192.168.20.0 netmask 255.255.255.0 broadcast 192.168.20.255 gateway 192.168.20.254 192.168.21.x network 192.168.21.0 netmask 255.255.255.0 broadcast 192.168.21.255 gateway 192.168.21.254 apagar la interfaz ifdown enp0s3 encender la interfaz ifup enp0s3 --- --- --- --- --- Apache2 /var/www/html VirtualHost /etc/apache2/sites-available/ --- --- --- --- --- apt install proftpd /etc/proftpd/proftpd.conf UseIPv6 off DefaultRoot ~ reiniciar el demonio systemctl restart proftpd --- --- --- --- --- UserDir sudo a2enmod userdir Editar el archivo de configuración de userdir /etc/apache2/mods-enabled/userdir.conf En la línea 7 agregar AllowOverride All comentar las ultimas 5 líneas con # /etc/apache2/mods-enabled/php7.4.conf reiniciar el apache2 systemctl restart apache2 --- --- --- --- --- MySQL apt install gnupg cd /tmp wget https://repo.mysql.com/mysql-apt-config_0.8.33-1_all.deb sudo dpkg -i mysql-apt-config* apt install default-mysql-server otorgar todos los permisos al usuario phpmyadmin mysql -u root -p use mysql; GRANT ALL PRIVILEGES ON *.* TO 'phpmyadmin'@'localhost' IDENTIFIED BY 'debian' WITH GRANT OPTION; FLUSH PRIVILEGES; EXIT; apt install phpmyadmin apt remove phpmyadmin apt purge phpmyadmin apt clean phpmyadmin DHCP apt install isc-dhcp-server /etc/default/isc-dhcp-server INTERFACESV4="enp0s8" /etc/dhcp/dhcpd.conf dns-update-style none; option domain-name "fimaz.net"; option domain-name-servers 192.168.1.100, 192.168.1.1; default-lease-time 600; max-lease-time 7200; authoritative; ## SubNet fimaz.net subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.32 192.168.1.63; option routers 192.168.1.254; option broadcast-address 192.168.1.255; } ## Asignacion de direccionamiento ip estatico host desktop { hardware ethernet 00:00:00:00:00:11; fixed-address 192.168.1.2; } IPTables cd /etc mkdir iptables cd iptables nano iptables.sh #!/bin/sh iptables="/sbin/iptables" /sbin/modprobe ip_tables /sbin/modprobe iptable_nat /sbin/modprobe ip_conntrack_ftp /sbin/modprobe ip_nat_ftp /sbin/modprobe ipt_REDIRECT /sbin/modprobe ip_conntrack /sbin/modprobe iptable_filter /sbin/modprobe ipt_MASQUERADE echo "Refrescando las reglas" /sbin/iptables -F /sbin/iptables -F -t nat /sbin/iptables -A FORWARD -j ACCEPT echo "1" > /proc/sys/net/ipv4/ip_forward echo "1" >/proc/sys/net/ipv4/tcp_syncookies /sbin/iptables -t nat -A POSTROUTING -s 192.168.1.0/255.255.255.0 -d 0/0 -o enp0s3 -j MASQUERADE bash iptables.sh CronTab nano /etc/crontab al final del archivo agregar lo siguiente * * * * * root bash /etc/iptables/iptables.sh hacer pruebas de comunicacion hacia el internet publico de alguna pc cliente dentro del dhcp