feat: Limited rustdesk to vpn IP only
This commit is contained in:
@@ -63,7 +63,7 @@ architecture-beta
|
||||
| `prod` | Public websites, Bitwarden, RustDesk, status page, prod Traefik | Private network + public firewall |
|
||||
| `vpn` | WireGuard (wg-easy) + its own Traefik | **Not** on the private network — isolated so a compromised VPN endpoint can't pivot to `dev`/`prod` |
|
||||
|
||||
`dev` and `prod` share a private Hetzner network (`10.0.1.0/24` by default) so CI/CD on `dev` can reach `prod` without exposing that traffic publicly. Each server has its own Hetzner Cloud Firewall (`infra/modules/<host>/main.tf`) opening only the ports its own compose stacks use, plus SSH restricted to `var.allowed_ssh_source_ips`.
|
||||
`dev` and `prod` share a private Hetzner network (`10.0.1.0/24` by default) so CI/CD on `dev` can reach `prod` without exposing that traffic publicly. Each server has its own Hetzner Cloud Firewall (`infra/modules/<host>/main.tf`) opening only the ports its own compose stacks use, plus SSH restricted to `var.allowed_source_ips`.
|
||||
|
||||
## Repository layout
|
||||
|
||||
@@ -167,7 +167,7 @@ cd ansible
|
||||
ansible-galaxy collection install -r requirements.yml
|
||||
export HCLOUD_TOKEN=your-hetzner-api-token # never commit this
|
||||
|
||||
# vpn first - its firewall accepts SSH from var.allowed_ssh_source_ips directly
|
||||
# vpn first - its firewall accepts SSH from var.allowed_source_ips directly
|
||||
ansible-playbook playbooks/site.yml -l role_vpn
|
||||
|
||||
# SSH to vpn as deploy and connect to the WireGuard tunnel it just started, then:
|
||||
@@ -272,7 +272,7 @@ Then reopen the repo in VS Code with the Dev Containers extension.
|
||||
## Security notes
|
||||
|
||||
- Real secrets (`HCLOUD_TOKEN`, `BACKUP_S3_*`, `*.tfvars`, your SSH private key) must never be committed — see `.gitignore`. S3 credentials land in each host's `services/<host>/.env` (mode `0600`, gitignored, rendered by Ansible).
|
||||
- SSH to `dev`/`prod` is restricted to `vpn`'s own public IP — you must be tunneled into the VPN to reach them. SSH to `vpn` itself is gated by `var.allowed_ssh_source_ips`; narrow this from the default `0.0.0.0/0` once you know your egress IP(s).
|
||||
- SSH to `dev`/`prod` is restricted to `vpn`'s own public IP — you must be tunneled into the VPN to reach them. SSH to `vpn` itself is gated by `var.allowed_source_ips`; narrow this from the default `0.0.0.0/0` once you know your egress IP(s).
|
||||
- Firewalls are per-host allowlists (`infra/modules/<host>/main.tf`) — only ports actually used by that host's compose stacks are open.
|
||||
- Ansible's bootstrap role disables SSH password auth, restricts root login to key-only, and creates a separate sudo user (`deploy_user`) for day-to-day access.
|
||||
- DNS zones carry both Hetzner's `delete_protection` and Terraform's `prevent_destroy` — losing a zone takes every record in it with it, across all three managed domains.
|
||||
|
||||
Reference in New Issue
Block a user