# Mapa de Ataques honeypot.es Visualización pública en tiempo real de ataques detectados por T-Pot, con interfaz completamente en español. Servicio ofrecido por [Cloud Host](https://cloudhost.es). ## Características - Mapa mundial de ataques en tiempo real (D3.js + Leaflet) - Interfaz completamente en **español** - Modo **oscuro y claro** con un clic - Tablas en vivo: IPs más activas, países atacantes, feed de ataques - Panel de control con gráficos (distribución, timeline, protocolos, honeypot, mapa de calor) - **Sin registro de datos personales** — servicio público europeo - Pie de página con enlace a [cloudhost.es](https://cloudhost.es) - Contenedor Docker autónomo (Redis interno + DataServer + AttackMapServer) ## Requisitos - Docker + Docker Compose - Acceso a la instancia Elasticsearch del T-Pot remoto (puerto `64298` por defecto) ## Instalación rápida ```bash # 1. Copiar y editar la configuración cp .env.example .env nano .env # Ajustar ELASTICSEARCH_URL # 2. Construir y levantar docker compose up -d --build # 3. Abrir en el navegador # http://tu-servidor:8080 ``` ## Conexión al T-Pot remoto ### Opción A — Conexión directa (si el ES del T-Pot es accesible en red) ```env ELASTICSEARCH_URL=http://tu-tpot-host:64298 ``` ### Opción B — Túnel SSH (recomendado) En tu servidor host, crea el túnel antes de levantar Docker: ```bash ssh -N -L 64298:localhost:9200 usuario@tu-tpot-host -i ~/.ssh/id_ed25519 ``` Luego en `.env`: ```env ELASTICSEARCH_URL=http://host.docker.internal:64298 ``` El `docker-compose.yml` ya incluye `extra_hosts: host.docker.internal:host-gateway` para que el contenedor alcance tu host. ### Opción C — Túnel SSH persistente con systemd Crea `/etc/systemd/system/tpot-tunnel.service`: ```ini [Unit] Description=Túnel SSH hacia T-Pot Elasticsearch After=network.target [Service] ExecStart=/usr/bin/ssh -N -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes \ -L 64298:localhost:9200 usuario@tu-tpot-host -i /root/.ssh/id_ed25519 Restart=always RestartSec=10 [Install] WantedBy=multi-user.target ``` ```bash systemctl enable --now tpot-tunnel ``` ## Variables de entorno | Variable | Default | Descripción | |---|---|---| | `ELASTICSEARCH_URL` | `http://localhost:9200` | URL del Elasticsearch del T-Pot | | `WEB_PORT` | `8080` | Puerto donde se expone la web | | `TPOT_ATTACKMAP_TEXT` | `ENABLED` | Mostrar log de ataques en consola | ## Arquitectura ``` Elasticsearch (T-Pot remoto) → DataServer.py (sondeo cada 0.5s) → Redis (interno al contenedor) → AttackMapServer.py (WebSocket, puerto 8080) → Navegador (Leaflet + D3 + Chart.js) ``` ## Créditos Basado en [t-pot-attack-map](https://github.com/telekom-security/t-pot-attack-map) de Telekom Security (Deutsche Telekom Security GmbH), licencia Apache 2.0.