terraform.tfvars file before running terraform apply.
Required variables
These three variables must be set in every deployment. There are no defaults.Your local public IP address in CIDR notation. Used to restrict SSH and management access at the security group level. Terraform validates this value — it will reject non-CIDR strings.Find your public IP with
curl ifconfig.me, then append /32.Name of an existing AWS EC2 key pair. Terraform does not create this — it must already exist in your account before you run
terraform apply.The key pair is used for SSH access to Linux instances and to decrypt the Windows Administrator password.Path to the
.pem private key file on the machine running Terraform. Used by Terraform to call rsadecrypt() and automatically decrypt the Windows Administrator password so it appears in terraform output.The path is relative to the directory where you run
terraform apply. An absolute path also works.AWS configuration
AWS region where all resources are created. All instances, VPCs, security groups, and Elastic IPs are deployed in this region.
Prefix applied to every resource name and
Project tag. Use distinct values when running multiple simultaneous deployments so you can isolate them in the AWS Console and billing reports.Instance types
Each lab component runs on its own EC2 instance. Adjust these to balance cost and performance.Estimated monthly cost at defaults with all instances running 24/7: ~$135/month plus data transfer. Stop instances when not in use to reduce costs.
EC2 instance type for the Mythic C2 team server. The default
t3.medium (2 vCPU, 4 GB RAM) is the recommended minimum — Mythic’s Docker stack is memory-intensive.EC2 instance type for the Apache Guacamole server. Guacamole is the browser-based access portal for all internal lab instances.
EC2 instance type for the Windows operator workstation. Accessed via RDP through Guacamole.
EC2 instance type for the Apache redirector. The redirector handles only HTTP/HTTPS proxying and header validation — a
t3.micro is sufficient for most lab workloads.If you enable external VPN (
enable_external_vpn = true), consider upgrading to t3.small. The redirector will also route VPN traffic and run WireGuard.EC2 instance type for the Sliver C2 server.
EC2 instance type for the Havoc C2 server. Havoc runs a Qt-based teamserver and a graphical desktop — the
t3.medium default is recommended.Network configuration
When
false (recommended), Terraform creates a dedicated VPC for the team server infrastructure using the CIDR specified in vpc_cidr. When true, all team server instances are placed in your account’s AWS default VPC.CIDR block for the dedicated team server VPC. Only used when
use_default_vpc = false.CIDR block for the redirector VPC. The redirector always runs in its own VPC, peered to the team server VPC.When running two deployments simultaneously, change one of them to avoid CIDR conflicts — for example, use
10.61.0.0/16 for the second deployment.Redirector and domain
Custom domain for the Apache redirector. When set, the redirector uses this domain for TLS certificate provisioning.When left empty, the redirector operates in closed environment mode — it uses the public IP with a self-signed certificate. This is the correct setting for HTB, VL, and PG labs where no public domain is needed.
After deployment, point your domain’s A record to the Redirector Elastic IP shown in
terraform output deployment_info.When
true, the redirector loads redirect.rules with Apache mod_rewrite rules that block known scanner user-agents and AV/sandbox IP ranges, redirecting them to a decoy page.Set to false for HTB, VL, and PG environments where scanner blocking is unnecessary and may interfere with lab traffic.C2 URI prefixes
These URI prefixes are baked into agent payloads at deploy time. The redirector uses them to route incoming C2 callbacks to the correct team server. Set these before runningterraform apply — changing them after deployment requires redeploying payloads.
URI prefix routed to the Mythic C2 team server. Designed to blend with CDN traffic patterns.
URI prefix routed to the Sliver C2 server. Designed to blend with cloud storage traffic patterns.
URI prefix routed to the Havoc C2 server. Designed to blend with edge/CDN cache traffic patterns.
C2 header validation
The redirector requires a specific HTTP header to be present on all C2 callbacks. Requests without the correct header are served a decoy CloudEdge CDN maintenance page.The HTTP header name the redirector checks on every incoming request.
The token value the redirector expects in the header. Leave empty to have Terraform auto-generate a random token at deploy time (recommended). The generated value is shown in
terraform output deployment_info and terraform output network_architecture.Autostart
When
true, Mythic starts automatically on instance boot via a systemd service. When false, you must SSH in and start Mythic manually after each boot.External VPN (HTB / VL / PG)
These variables enable routing lab traffic through an external OpenVPN connection — required for HTB, VulnLab, and Proving Grounds targets.When
true, Terraform configures an OpenVPN client on the redirector and a WireGuard tunnel between the redirector and Guacamole. Internal lab machines can then reach CTF targets through the VPN.Enabling this also disables the default gateway redirect on the OpenVPN client to preserve VPC peering and C2 connectivity.
List of CIDR blocks that should be routed through the redirector’s VPN tunnel. These are added as static routes on the WireGuard interface on the Guacamole server.The default covers most HTB and VulnLab target ranges. Add additional ranges as needed for your platform.
Tagging
A map of additional key-value tags applied to every AWS resource in the deployment. Useful for cost tracking, filtering resources in the AWS Console, and billing reports.Every resource also receives an automatic
Project tag set to the value of project_name.Full example: terraform.tfvars
The following example shows all key variables with comments. Copy this toterraform.tfvars and fill in your values.
terraform.tfvars
