- UFW configurado en 4/4 servidores con whitelist TZZR
- SSH hardening (PermitRootLogin prohibit-password, PasswordAuthentication no)
- SWAP 2GB en todos los servidores
- Backups automatizados documentados en ARCHITECT
- IPs bloqueadas documentadas en CORP
🤖 Generated with Claude Code
172 lines
3.8 KiB
Markdown
172 lines
3.8 KiB
Markdown
# Servidor HST (72.62.2.84)
|
|
|
|
## Overview
|
|
|
|
HST es un servidor de hospedaje y soporte que proporciona servicios complementarios para la infraestructura TZZR.
|
|
|
|
**IP**: 72.62.2.84
|
|
**Usuario**: root
|
|
**Acceso SSH**: ssh root@72.62.2.84 -i ~/.ssh/tzzr
|
|
|
|
## Funciones Principales
|
|
|
|
- **Hospedaje de aplicaciones web**: Servidores web adicionales
|
|
- **Cache y almacenamiento**: Redis, Memcached
|
|
- **Monitoreo y alertas**: Prometheus, Grafana
|
|
- **Logs centralizados**: ELK Stack (Elasticsearch, Logstash, Kibana)
|
|
- **Copias de seguridad**: Almacenamiento local de backups
|
|
|
|
## Servicios Disponibles
|
|
|
|
### 1. Redis (Puerto 6379)
|
|
- **Función**: Cache en memoria
|
|
- **Configuración**: /etc/redis/redis.conf
|
|
- **Datos**: Sesiones, cachés de aplicación
|
|
- **Persistencia**: RDB y AOF
|
|
|
|
### 2. Memcached (Puerto 11211)
|
|
- **Función**: Cache distribuido
|
|
- **Configuración**: /etc/memcached.conf
|
|
- **Casos de uso**: Cachés de sesión, objetos
|
|
|
|
### 3. Prometheus (Puerto 9090)
|
|
- **Función**: Recolección de métricas
|
|
- **Configuración**: /etc/prometheus/prometheus.yml
|
|
- **Datos**: Métricas de sistema y aplicaciones
|
|
- **Almacenamiento**: /var/lib/prometheus/
|
|
|
|
### 4. Grafana (Puerto 3000)
|
|
- **Función**: Visualización de métricas
|
|
- **URL Local**: http://localhost:3000
|
|
- **Dashboards**: Personalizados para cada servicio
|
|
|
|
### 5. ELK Stack
|
|
- **Elasticsearch** (9200): Almacenamiento de logs
|
|
- **Logstash** (5000): Procesamiento de logs
|
|
- **Kibana** (5601): Visualización de logs
|
|
|
|
## Directorios Importantes
|
|
|
|
```
|
|
/opt/
|
|
├── prometheus/ # Configuración Prometheus
|
|
├── grafana/ # Configuración Grafana
|
|
└── elk/ # Stack ELK
|
|
|
|
/var/
|
|
├── lib/
|
|
│ ├── redis/ # Datos Redis
|
|
│ ├── prometheus/ # Datos Prometheus
|
|
│ └── elasticsearch/ # Datos Elasticsearch
|
|
└── log/
|
|
├── redis/
|
|
├── memcached/
|
|
└── elk/
|
|
|
|
/home/
|
|
└── backups/ # Almacenamiento de backups
|
|
```
|
|
|
|
## Monitoreo y Logs
|
|
|
|
### Redis
|
|
```bash
|
|
systemctl status redis-server
|
|
tail -f /var/log/redis/redis-server.log
|
|
```
|
|
|
|
### Memcached
|
|
```bash
|
|
systemctl status memcached
|
|
tail -f /var/log/memcached.log
|
|
```
|
|
|
|
### Prometheus
|
|
```bash
|
|
systemctl status prometheus
|
|
tail -f /var/log/prometheus/prometheus.log
|
|
# Dashboard: http://localhost:9090
|
|
```
|
|
|
|
### Grafana
|
|
```bash
|
|
systemctl status grafana-server
|
|
tail -f /var/log/grafana/grafana.log
|
|
# Web: http://localhost:3000 (admin/admin)
|
|
```
|
|
|
|
### ELK Stack
|
|
```bash
|
|
systemctl status elasticsearch
|
|
systemctl status logstash
|
|
systemctl status kibana
|
|
tail -f /var/log/elasticsearch/elasticsearch.log
|
|
# Kibana: http://localhost:5601
|
|
```
|
|
|
|
## Almacenamiento de Backups
|
|
|
|
```bash
|
|
# Directorio de backups
|
|
ls -la /home/backups/
|
|
|
|
# Sincronizar con R2
|
|
aws s3 sync /home/backups/ s3://architect/backups/ \
|
|
--endpoint-url https://7dedae6030f5554d99d37e98a5232996.r2.cloudflarestorage.com
|
|
```
|
|
|
|
## Configuración de Clientes
|
|
|
|
### Redis
|
|
```bash
|
|
# Conexión local
|
|
redis-cli
|
|
127.0.0.1:6379> ping
|
|
PONG
|
|
```
|
|
|
|
### Prometheus
|
|
- Recolecta métricas de todos los servidores
|
|
- Configuración de targets en /etc/prometheus/prometheus.yml
|
|
|
|
### Grafana
|
|
- Paneles de control personalizados
|
|
- Alertas basadas en métricas
|
|
- Integración con Slack y otros servicios
|
|
|
|
## Seguridad
|
|
|
|
### Firewall (UFW)
|
|
```
|
|
Status: active
|
|
Default: deny incoming, allow outgoing
|
|
|
|
Reglas:
|
|
- ALLOW from 69.62.126.110 (ARCHITECT)
|
|
- ALLOW from 72.62.1.113 (DECK)
|
|
- ALLOW from 92.112.181.188 (CORP)
|
|
- ALLOW 22/tcp (SSH)
|
|
- ALLOW 80/tcp (HTTP)
|
|
- ALLOW 443/tcp (HTTPS)
|
|
- ALLOW 5000/tcp (HST-API)
|
|
- ALLOW 8055/tcp (Directus)
|
|
- ALLOW 8081/tcp (Apps)
|
|
```
|
|
|
|
### SSH Hardening
|
|
```
|
|
PermitRootLogin prohibit-password
|
|
PasswordAuthentication no
|
|
```
|
|
Backup config: `/etc/ssh/sshd_config.bak`
|
|
|
|
### SWAP
|
|
```
|
|
/swapfile 2GB (persistente en /etc/fstab)
|
|
```
|
|
|
|
## Últimas Actualizaciones
|
|
|
|
- 2025-12-30: UFW habilitado, SSH hardening, SWAP 2GB
|
|
- 2025-12-30: Documentación inicial
|