Deployment Overview of Haltdos Community WAF on Server¶
Prerequisites and Basic Requirements¶
The deployment of Haltdos Community WAF requires the following system specifications and configurations:
-
Operating System: Ubuntu (compatible with
aptpackage manager). -
Privileges: Root access or
sudoprivileges are required to install packages, configure services, and manage Docker containers. -
Domain Configuration: The server must resolve the FQDN in the
hostkey.inzone. -
Ports: Ports
80and443must be accessible for Let's Encrypt certificate validation and HTTPS traffic. Port3000is used internally for the application.
FQDN of the Final Panel¶
The fully qualified domain name (FQDN) for accessing the Haltdos Community WAF panel follows the pattern:
haltdos<Server ID>.hostkey.in
The application is accessible over HTTPS (port 443).
File and Directory Structure¶
The installation places configuration files, certificates, and data in the following locations:
-
System Configuration:
/etc/nginx/sites-available/haltdos.conf -
Nginx Reverse Proxy Configuration:
/etc/nginx/sites-enabled/haltdos.conf(symlink) -
Let's Encrypt Certificates:
/etc/letsencrypt/live/<FQDN>/ -
User Nginx Configurations:
/data/nginx/user_conf.d/ -
Docker Compose Configuration:
/root/nginx/compose.yml -
Docker Environment Variables:
/data/nginx/nginx-certbot.env
Application Installation Process¶
The Haltdos Community WAF is installed using the official setup script provided by the vendor. The installation process includes the following steps:
-
The
curl,nginx, andcertbotpackages are installed viaapt. -
Existing web servers (
nginx,apache2) and Docker containers occupying ports80and443are stopped to ensure free access. -
The official installer is downloaded and executed:
-
The system hostname is updated to match the FQDN, and an entry is added to
/etc/hoststo ensure local resolution.
Access Rights and Security¶
Security measures implemented during deployment include:
-
Firewall and Service Management: Existing services occupying ports
80and443are terminated prior to certificate issuance and reverse proxy configuration. -
Docker Swarm: If an active Docker Swarm is present, the node is forced to leave the swarm to ensure compatibility.
-
Nginx Restrictions: The default Nginx site is disabled to prevent conflicts with the custom Haltdos configuration.
-
SSL/TLS: Secure communication is enforced via Let's Encrypt certificates with
TLSv1.2andTLSv1.3protocols enabled.
Proxy Servers¶
Nginx is configured as a reverse proxy to handle incoming traffic and SSL termination.
-
HTTP Redirect: All HTTP requests on port
80are redirected to HTTPS. -
HTTPS Configuration: Nginx listens on port
443with SSL enabled using certificates from Let's Encrypt. -
Internal Proxy: Traffic is proxied to the Haltdos application running locally on port
9000(as configured in the Nginx site file) or port3000(as configured in the user-defined proxy pass). -
Headers: The proxy forwards standard headers including
Host,X-Real-IP,X-Forwarded-For, andX-Forwarded-Proto. -
SSL Verification: Client SSL verification is disabled (
proxy_ssl_verify off) for the upstream connection.
Permission Settings¶
The following permissions are applied to key directories and files:
-
Nginx Directory: The
/root/nginxdirectory is created withroot:rootownership and mode0755. -
Compose File: The
/root/nginx/compose.ymlfile is set with mode0644. -
Nginx Site Config: The configuration file
/etc/nginx/sites-available/haltdos.confis created with mode0644. -
Let's Encrypt: Certificates are stored in
/etc/letsencrypt/with permissions managed by thecertbotservice.
Location of Configuration Files and Data¶
Key configuration files and data directories are located at:
-
Nginx Site Configuration:
/etc/nginx/sites-available/haltdos.conf -
Docker Compose:
/root/nginx/compose.yml -
User Proxy Config:
/data/nginx/user_conf.d/haltdos<Server ID>.hostkey.in.conf -
Environment Variables:
/data/nginx/nginx-certbot.env -
Certificates:
/etc/letsencrypt/live/<haltdos<Server ID>.hostkey.in>/
Available Ports for Connection¶
The following ports are utilized by the deployment:
| Port | Protocol | Description |
|---|---|---|
| 80 | TCP | HTTP (redirects to HTTPS) |
| 443 | TCP | HTTPS (public access to Haltdos panel) |
| 3000 | TCP | Internal communication (configured in user proxy) |
| 9000 | TCP | Internal communication (configured in Nginx reverse proxy) |
Starting, Stopping, and Updating¶
Services are managed via the systemctl command for Nginx and docker compose for containerized components.
-
Start Nginx:
-
Enable Nginx on Boot:
-
Restart Docker Containers:
-
Test Nginx Configuration:
-
Reload Nginx:
Docker Containers and Their Deployment¶
The deployment utilizes a Docker container for managing SSL certificates via Nginx and Certbot.
-
Image:
jonasal/nginx-certbot:latest -
Restart Policy:
unless-stopped -
Network Mode:
host -
Volumes:
-
nginx_secretsmapped to/etc/letsencrypt(external volume). -
/data/nginx/user_conf.dmapped to/etc/nginx/user_conf.d. -
Environment:
-
Email for Let's Encrypt:
[email protected] -
Additional variables loaded from
/data/nginx/nginx-certbot.env.
The container is started using the compose file located at /root/nginx/compose.yml.