https://github.com/elliotsecops/ufw-rules
A script to execute the essential UFW rules.
https://github.com/elliotsecops/ufw-rules
bash-script cybersecurity firewall firewall-management firewall-rules linux-administration sysadmin ufw-firewall
Last synced: 27 days ago
JSON representation
A script to execute the essential UFW rules.
- Host: GitHub
- URL: https://github.com/elliotsecops/ufw-rules
- Owner: elliotsecops
- Created: 2023-12-20T22:33:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-21T01:49:24.000Z (over 1 year ago)
- Last Synced: 2025-02-06T21:16:12.084Z (3 months ago)
- Topics: bash-script, cybersecurity, firewall, firewall-management, firewall-rules, linux-administration, sysadmin, ufw-firewall
- Language: Shell
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ufw rules
(EN) A script to execute the essential UFW rules.
(ES) Secuencias de comandos para ejecutar las reglas esenciales de UFW.# Configuración básica de UFW en Bash
Este script permite aplicar la configuración básica de seguridad del firewall UFW de forma automatizada mediante Bash.
## Objetivo
El objetivo del script es establecer las políticas predeterminadas de UFW en modo bloqueo (deny) y permitir sólo los puertos necesarios para poder navegar y acceder de forma remota al sistema de forma segura.
## Uso
1. Dar permisos de ejecución:
```
chmod +x ufw-config.sh
```
2. Ejecutar el script:```
./ufw-config.sh
```## Configuración
El script aplica la siguiente configuración de UFW:
- Habilita el firewall
- Establece políticas predeterminadas en deny para entrada y salida
- Permite la salida a través de la interfaz eth0
- Permite los puertos 80, 443 y 22 entrantes desde cualquier IPEste script está diseñado para configurar de forma básica UFW en sistemas Debian/Ubuntu y puede ser utilizado como punto de partida para implementar el firewall. Favor revisar y probar en un entorno aislado antes de usarlo en producción.
# Basic UFW configuration in Bash.
This script allows you to apply basic UFW firewall security configuration in an automated way using Bash.
## Objective.
The goal of the script is to set the default UFW policies to block (deny) mode and allow only the necessary ports to securely browse and remotely access the system.
## Usage
1. Set permissions to run the script:
```
chmod +x ufw-config.sh
```
2. Run the script:```
./ufw-config.sh
```## Configuration
The script applies the following UFW configuration:
- Enables the firewall
- Sets default policies on deny for ingress and egress
- Allow outbound through eth0 interface
- Allow incoming ports 80, 443 and 22 from any IPThis script is designed for basic UFW configuration on Debian/Ubuntu systems and can be used as a starting point for firewall implementation. Please review and test before using it in production.