Ir al contenido principal

Entradas

ProxySQL con SSL/TLS

Entradas recientes

IPsets con UFW en Ubuntu

IPsets con UFW en Ubuntu Introducción Este es un ejemplo que te permite tener UFW e IPSet con una lista blanca de IP de forma dinamica para una implementacion comun de firewall en Ubuntu Primero necesitas un script systemd que crea un ipset al arraque del sistema, y posterior un script que integra el ipset con UFW para permitir el trafico especifico, se necesitará crear 2 conceptos principales. Un script de servicio systemd que crea y carga el ipset al inicio Un perfil de aplicación en UFW o editar de forma directa las reglas para utilizar el ipset para permitir el trafico Servicio Systemd para IPset 1. Crear el script de ipset Primero, crear un script para cargar el ipset . Llamaremos el script create_ipset.sh /usr/local/bin/create_ipset.sh #!/bin/bash # Nombre de la ipset IPSET_NAME= "whilelist" # Liberar si exite y crear ipset ipset -exist flush $IPSET_NAME ipset -exist create $IPSET_NAME hash :ip # Opcional, agregar IP's aqui o por un meca...

Javascript Service Worker with One Instance

 Working with Service Workers on Javascript. To ensure that only one Service Worker is installed and active per endpoint (or per scope), you need to be mindful of how Service Workers are scoped and how they manage their installation and activation process. Key Concepts: Service Worker Scope : A Service Worker controls a specific URL scope. The scope is determined by where the Service Worker script is located. By default, it controls the path where the script is located and its subpaths, but you can customize it when registering the Service Worker. Service Worker Installation and Activation : The Service Worker lifecycle involves the steps of installing, activating, and fetching. The Service Worker is installed once and only if there is no existing active Service Worker that matches the scope of the registration. Solution: Avoid Multiple Service Workers by Proper Registration You can ensure only one Service Worker is registered per endpoint (or scope) by controlling the reg...

Configurar dirección IP estatica en Linux Debian

Aclaración En este tutorial se indicará como configurar una dirección IP estática en Linux Debian, esto para la versión 10/11/12 El tutorial tomado (traducido en parte) de la versión en ingles que puedes ver aquí . Por default,al instalar se toma la dirección IP por DHCP. El cliente dhcp de Debian la obtiene del servidor DHCP que se tenga en la red, configurando también las direcciones DNS y Gateway. Vamos a mostrar como configurar estas direcciones IP's de forma estática, para este procedimiento se requiere tener acceso de usuario root. Procedimiento a realizar Acceder por SSH remoto al servidor. Esto con la dirección automática que obtuvo desde el servidor DHCP. Si no se tiene, será necesario tener acceso a la consola del servidor. Realizar un respaldo del archivo a modificar Configurar las direcciones IP, DNS y Gateway  Aplicar los cambios en el sistema operativo Paso 1. Acceder al servidor Si se tiene la dirección IP asignada automáticamente, se puede acceder por SSH al mismo....