**Motivations:** - Complete documentation for dashboard, domains, ports and environment configuration - Add new services (ClamAV API, Watermark API) to the infrastructure - Enhance dashboard with new pages and improved functionality - Improve deployment scripts and service configurations **Root causes:** - Missing comprehensive documentation for infrastructure setup - Need for antivirus scanning service integration - Need for watermark service integration - Dashboard required additional pages and features **Correctifs:** - Added comprehensive documentation in docs/ (DASHBOARD.md, DOMAINS_AND_PORTS.md, ENVIRONMENT.md) - Updated systemd service files with proper environment variables - Enhanced nginx proxy configuration script - Updated maintenance documentation **Evolutions:** - Added new ClamAV API service (api-clamav) for file scanning - Added new Watermark API service (api-filigrane) for document watermarking - Enhanced signet-dashboard with new learn.html page - Improved dashboard UI with better styles and navigation - Enhanced app.js with new functionality and better error handling - Updated API documentation page with complete endpoint descriptions - Added deployment scripts for watermark and nginx configuration - Updated hash and UTXO lists with latest data - Enhanced server.js with new routes and improved Bitcoin RPC integration **Pages affectées:** - docs/DASHBOARD.md: New comprehensive dashboard documentation - docs/DOMAINS_AND_PORTS.md: New infrastructure domains and ports documentation - docs/ENVIRONMENT.md: New environment variables documentation - docs/MAINTENANCE.md: Updated maintenance procedures - docs/README.md: Updated main documentation - signet-dashboard/public/app.js: Enhanced with new features - signet-dashboard/public/styles.css: Improved styling - signet-dashboard/public/index.html: Enhanced main page - signet-dashboard/public/learn.html: New educational page - signet-dashboard/public/api-docs.html: Enhanced API documentation - signet-dashboard/public/hash-list.html: Updated hash list page - signet-dashboard/public/utxo-list.html: Updated UTXO list page - signet-dashboard/public/join-signet.html: Updated join signet page - signet-dashboard/src/server.js: Enhanced server with new routes - signet-dashboard/start.sh: Updated startup script - signet-dashboard/signet-dashboard.service: Updated systemd service - api-anchorage/anchorage-api.service: Updated systemd service - api-faucet/faucet-api.service: Updated systemd service - configure-nginx-proxy.sh: Enhanced nginx configuration script - add-watermark-certificate.sh: New watermark certificate script - deploy-watermark-nginx.sh: New deployment script - api-clamav/: New ClamAV API service - api-filigrane/: New Watermark API service - hash_list.txt, utxo_list.txt: Updated with latest data - anchor_count.txt: Updated anchor count
196 lines
6.4 KiB
Markdown
196 lines
6.4 KiB
Markdown
# Domaines et Ports - Infrastructure Certificator
|
|
|
|
**Auteur** : Équipe 4NK
|
|
**Date** : 2026-01-24
|
|
**Version** : 1.0
|
|
|
|
## Vue d'Ensemble
|
|
|
|
Ce document liste tous les domaines, ports et services de l'infrastructure Certificator Bitcoin Signet.
|
|
|
|
## Domaines et Services
|
|
|
|
### Domaines Principaux
|
|
|
|
| Domaine | Service | Port Local | Description |
|
|
|---------|---------|------------|-------------|
|
|
| `certificator.4nkweb.com` | API d'Ancrage | 3010 | API REST pour ancrer des documents |
|
|
| `watermark.certificator.4nkweb.com` | API Filigrane | 3022 | API REST pour ajouter des filigranes et ancrer |
|
|
| `antivir.certificator.4nkweb.com` | API ClamAV | 3023 | API REST pour scanner les fichiers (antivirus) |
|
|
| `dashboard.certificator.4nkweb.com` | Dashboard | 3020 | Interface web de supervision |
|
|
| `faucet.certificator.4nkweb.com` | API Faucet | 3021 | API REST pour distribuer des sats |
|
|
| `mempool.4nkweb.com` | Mempool | 3015 | Explorateur de blockchain Bitcoin |
|
|
|
|
### Configuration Nginx
|
|
|
|
Tous les domaines sont routés via le proxy Nginx sur le serveur `192.168.1.100` (proxy).
|
|
|
|
**Configuration du proxy :**
|
|
- Point d'entrée unique : `4nk.myftp.biz` (DynDNS)
|
|
- Routage HTTPS vers les services backend appropriés
|
|
- Certificats SSL/TLS : Let's Encrypt (renouvellement automatique)
|
|
|
|
## Ports Fixes
|
|
|
|
### Ports des APIs (Fixés dans les services systemd)
|
|
|
|
| Port | Service | API | Fichier de Service |
|
|
|------|---------|-----|-------------------|
|
|
| 3010 | API d'Ancrage | `api-anchorage` | `api-anchorage/anchorage-api.service` |
|
|
| 3020 | Dashboard | `signet-dashboard` | `signet-dashboard/signet-dashboard.service` |
|
|
| 3021 | API Faucet | `api-faucet` | `api-faucet/faucet-api.service` |
|
|
| 3022 | API Filigrane | `api-filigrane` | `api-filigrane/filigrane-api.service` |
|
|
| 3023 | API ClamAV | `api-clamav` | `api-clamav/clamav-api.service` |
|
|
|
|
**Important :** Tous ces ports sont fixes et définis dans les fichiers de service systemd. Ils ne peuvent pas être modifiés sans modifier les services.
|
|
|
|
### Ports Bitcoin Core
|
|
|
|
| Port | Protocole | Service | Description |
|
|
|------|-----------|---------|-------------|
|
|
| 38332 | TCP | RPC | Interface JSON-RPC pour contrôler le nœud |
|
|
| 38333 | TCP/UDP | P2P | Réseau peer-to-peer Bitcoin Signet |
|
|
| 28332 | TCP | ZMQ | Publication des blocs bruts |
|
|
| 28333 | TCP | ZMQ | Publication des transactions brutes |
|
|
| 28334 | TCP | ZMQ | Publication des hash de blocs |
|
|
|
|
### Ports Mempool
|
|
|
|
| Port | Protocole | Service | Description |
|
|
|------|-----------|---------|-------------|
|
|
| 3015 | HTTP/HTTPS | Web | Interface web Mempool (exposé via nginx) |
|
|
| 8999 | HTTP | API | Mempool Backend API (interne) |
|
|
|
|
## Services Systemd
|
|
|
|
Tous les services sont configurés avec systemd pour un redémarrage automatique.
|
|
|
|
### Liste des Services
|
|
|
|
```bash
|
|
# Vérifier le statut de tous les services
|
|
sudo systemctl status anchorage-api
|
|
sudo systemctl status signet-dashboard
|
|
sudo systemctl status faucet-api
|
|
sudo systemctl status filigrane-api
|
|
sudo systemctl status clamav-api
|
|
```
|
|
|
|
### Commandes de Gestion
|
|
|
|
```bash
|
|
# Démarrer un service
|
|
sudo systemctl start <service-name>
|
|
|
|
# Arrêter un service
|
|
sudo systemctl stop <service-name>
|
|
|
|
# Redémarrer un service
|
|
sudo systemctl restart <service-name>
|
|
|
|
# Voir les logs
|
|
sudo journalctl -u <service-name> -f
|
|
|
|
# Activer au démarrage
|
|
sudo systemctl enable <service-name>
|
|
|
|
# Désactiver au démarrage
|
|
sudo systemctl disable <service-name>
|
|
```
|
|
|
|
## Architecture Réseau
|
|
|
|
```
|
|
Internet
|
|
│
|
|
├─→ 4nk.myftp.biz (DynDNS)
|
|
│ └─→ 192.168.1.100 (proxy) - Point d'entrée unique
|
|
│ │
|
|
│ ├─→ certificator.4nkweb.com → 192.168.1.103:3010 (API Anchorage)
|
|
│ ├─→ watermark.certificator.4nkweb.com → 192.168.1.103:3022 (API Filigrane)
|
|
│ ├─→ antivir.certificator.4nkweb.com → 192.168.1.103:3023 (API ClamAV)
|
|
│ ├─→ dashboard.certificator.4nkweb.com → 192.168.1.103:3020 (Dashboard)
|
|
│ ├─→ faucet.certificator.4nkweb.com → 192.168.1.103:3021 (API Faucet)
|
|
│ └─→ mempool.4nkweb.com → 192.168.1.104:3015 (Mempool)
|
|
```
|
|
|
|
## Vérification des Ports
|
|
|
|
### Vérifier qu'un port est en écoute
|
|
|
|
```bash
|
|
# Vérifier un port spécifique
|
|
sudo ss -tlnp | grep :3010
|
|
|
|
# Vérifier tous les ports des APIs
|
|
sudo ss -tlnp | grep -E ':(3010|3020|3021|3022|3023)'
|
|
```
|
|
|
|
### Tester la connectivité
|
|
|
|
```bash
|
|
# Tester depuis le serveur
|
|
curl http://localhost:3010/health
|
|
curl http://localhost:3020/health
|
|
curl http://localhost:3021/health
|
|
curl http://localhost:3022/health
|
|
curl http://localhost:3023/health
|
|
|
|
# Tester depuis l'extérieur (via domaine)
|
|
curl https://certificator.4nkweb.com/health
|
|
curl https://dashboard.certificator.4nkweb.com/health
|
|
```
|
|
|
|
## Certificats SSL/TLS
|
|
|
|
Tous les domaines utilisent des certificats Let's Encrypt gérés automatiquement par Certbot.
|
|
|
|
### Vérifier les certificats
|
|
|
|
```bash
|
|
# Sur le serveur proxy (192.168.1.100)
|
|
sudo certbot certificates
|
|
|
|
# Vérifier un certificat spécifique
|
|
openssl s_client -connect certificator.4nkweb.com:443 -servername certificator.4nkweb.com
|
|
```
|
|
|
|
### Renouvellement
|
|
|
|
Le renouvellement est automatique via Certbot. Pour forcer un renouvellement :
|
|
|
|
```bash
|
|
sudo certbot renew
|
|
```
|
|
|
|
## DNS
|
|
|
|
Tous les domaines utilisent des enregistrements CNAME pointant vers `4nk.myftp.biz` (DynDNS).
|
|
|
|
**Exemple de configuration DNS (Gandi) :**
|
|
```
|
|
certificator.4nkweb.com. 3600 IN CNAME 4nk.myftp.biz.
|
|
watermark.certificator.4nkweb.com. 3600 IN CNAME 4nk.myftp.biz.
|
|
antivir.certificator.4nkweb.com. 3600 IN CNAME 4nk.myftp.biz.
|
|
dashboard.certificator.4nkweb.com. 3600 IN CNAME 4nk.myftp.biz.
|
|
faucet.certificator.4nkweb.com. 3600 IN CNAME 4nk.myftp.biz.
|
|
```
|
|
|
|
## Notes Importantes
|
|
|
|
1. **Ports fixes** : Tous les ports des APIs sont fixes et définis dans les services systemd. Ne pas modifier sans mettre à jour les services.
|
|
|
|
2. **Redémarrage automatique** : Tous les services sont configurés avec `Restart=always` pour un redémarrage automatique en cas d'échec.
|
|
|
|
3. **Sécurité** : Les services utilisent `NoNewPrivileges=true` et `PrivateTmp=true` pour une meilleure sécurité.
|
|
|
|
4. **Logs** : Tous les logs sont envoyés vers `journald` et peuvent être consultés avec `journalctl`.
|
|
|
|
5. **Environnement** : Les variables d'environnement (ports, hosts) sont définies dans les fichiers de service systemd.
|
|
|
|
## Références
|
|
|
|
- [Documentation Infrastructure Cloud 4NK](../Infrastructure_Cloud_4NK.md) (si disponible)
|
|
- [Documentation Maintenance](./MAINTENANCE.md)
|
|
- [Documentation Environnement](./ENVIRONMENT.md)
|