feat: rebranded from vpn-router to linux-manager.

This commit is contained in:
slawek committed 2026-11-22 09:51:07 +01:00
1 parent 8efe21bfa6
commit 85a1ffa21f
238 files changed
+5010 -3761

No files matched your search

+7 -7
View File
@@ -1,6 +1,6 @@
# Azure example
Deploys `vpn-router` on an Azure VM: a two-NIC router (external/WAN and internal/protected),
Deploys `linux-manager` on an Azure VM: a two-NIC router (external/WAN and internal/protected),
a demo protected `workload` subnet routed through it, and cloud-init that installs and
configures the package on first boot. See the repository's top-level [README](../../README.md)
for what the package itself does.
@@ -10,10 +10,10 @@ for what the package itself does.
- An Azure subscription and `az login` (or another form of Azure credentials Terraform can pick
up).
- An SSH key pair for `admin_ssh_public_key`.
- A build of the `vpn-router` package published to the repository at `repo_url` (default: the
- A build of the `linux-manager` package published to the repository at `repo_url` (default: the
project's Gitea Debian registry). See [../../debian-package](../../debian-package) for
`build.sh`/`publish.sh`.
- That repository must allow anonymous reads, since the router pulls the package with no
- That repository must allow anonymous reads, since the server pulls the package with no
credentials configured. On Gitea this means the `debian` package registry under the
`slawek` account is set to public/anonymous-read; `publish.sh` still authenticates to
upload, only reads are anonymous. This is a one-time change made on the Gitea side, outside
@@ -28,7 +28,7 @@ export TF_VAR_psk='change-me' # keep secrets out of tracked files
```
`platform = azure` and `mode = auto` are hard-coded into the cloud-init template call in
`router.tf`: the router has exactly two NICs, the external one carries the default route (it is
`router.tf`: the server has exactly two NICs, the external one carries the default route (it is
marked `primary` and holds the public IP), which is exactly the case `mode = auto` is designed
to detect reliably - see the top-level README's "What mode decides" section.
@@ -36,10 +36,10 @@ to detect reliably - see the top-level README's "What mode decides" section.
```sh
ssh <admin_username>@$(terraform output -raw router_public_ip)
systemctl status vpn-router-setup
systemctl status linux-manager-setup
swanctl --list-sas
```
Set `deploy_workload_vm = true` and re-apply to add a VM on the `workload` subnet (no public
IP - reach it via the router or Azure Bastion) for confirming that its traffic to `remote_cidrs`
actually flows through the router.
IP - reach it via the server or Azure Bastion) for confirming that its traffic to `remote_cidrs`
actually flows through the server.
+2 -2
View File
@@ -1,9 +1,9 @@
output "router_public_ip" {
description = "Public IP address of the router VM."
description = "Public IP address of the server VM."
value = azurerm_public_ip.ext.ip_address
}
output "router_internal_ip" {
description = "Private IP address of the router's internal NIC - the next hop to use in routes configured outside this Terraform run (another route table, or an on-prem device) that need to reach remote_cidrs through this router."
description = "Private IP address of the server's internal NIC - the next hop to use in routes configured outside this Terraform run (another route table, or an on-prem device) that need to reach remote_cidrs through this router."
value = azurerm_network_interface.int.private_ip_address
}
+4 -2
View File
@@ -12,9 +12,11 @@ locals {
repo_gpg_key = data.http.repo_gpg_key.response_body
ubuntu_codename = var.ubuntu_codename
# Contents of /etc/vpn-router/vpn-router.json.
# Contents of /etc/linux-manager/linux-manager.json.
config = {
general = { platform = "azure", mode = "auto" }
router = { enabled = true }
vpn = { enabled = true }
wan = { local_fqdn = var.local_fqdn }
local = { cidrs = local.local_cidr_list }
site_to_site = {
@@ -94,7 +96,7 @@ resource "azurerm_linux_virtual_machine" "router" {
source_image_reference {
publisher = "Canonical"
offer = "ubuntu-24_04-lts"
offer = "ubuntu-26_04-lts"
sku = "server"
version = "latest"
}
+1 -1
View File
@@ -4,7 +4,7 @@
subscription_id = "00000000-0000-0000-0000-000000000000"
location = "polandcentral"
name = "vpn-router-example"
name = "linux-manager-example"
admin_ssh_public_key = "ssh-ed25519 AAAA... you@example.com"
local_fqdn = "router.example.com"
+12 -12
View File
@@ -17,7 +17,7 @@ variable "location" {
variable "name" {
description = "Base name used to derive resource names."
type = string
default = "vpn-router-example"
default = "linux-manager-example"
}
variable "admin_ssh_public_key" {
@@ -32,25 +32,25 @@ variable "admin_username" {
}
variable "admin_password" {
description = "Admin password for the router VM. SSH key auth is always configured; leaving this empty additionally disables password authentication, setting it enables password auth alongside the key."
description = "Admin password for the server VM. SSH key auth is always configured; leaving this empty additionally disables password authentication, setting it enables password auth alongside the key."
type = string
default = ""
sensitive = true
}
variable "vm_size" {
description = "VM size for the router."
description = "VM size for the server."
type = string
default = "Standard_B2ls_v2"
}
variable "local_fqdn" {
description = "FQDN of the router, used as the IKE identity and, when dns_zone_id is set, as the name of the A record created for it."
description = "FQDN of the server, used as the IKE identity and, when dns_zone_id is set, as the name of the A record created for it."
type = string
}
variable "dns_zone_id" {
description = "Resource ID of an existing Azure DNS zone to create local_fqdn's A record in, pointing at the router's public IP. local_fqdn must be a name within that zone. Leave null to skip - local_fqdn is then just a label with nothing making it resolve."
description = "Resource ID of an existing Azure DNS zone to create local_fqdn's A record in, pointing at the server's public IP. local_fqdn must be a name within that zone. Leave null to skip - local_fqdn is then just a label with nothing making it resolve."
type = string
nullable = true
default = null
@@ -132,21 +132,21 @@ variable "wireguard_listen_port" {
}
variable "deploy_workload_vm" {
description = "Deploy a bare VM on the workload subnet, for manually verifying routing through the router."
description = "Deploy a bare VM on the workload subnet, for manually verifying routing through the server."
type = bool
default = false
}
variable "repo_url" {
description = "Base URL of the Debian package repository the router pulls vpn-router from."
description = "Base URL of the Debian package repository the server pulls linux-manager from."
type = string
default = "https://gitea.koszewscy.waw.pl/api/packages/koszewscy/debian"
}
variable "ubuntu_codename" {
description = "Ubuntu release codename of the router VM's image, used to select the apt repo component."
description = "Ubuntu release codename of the server VM's image, used to select the apt repo component."
type = string
default = "noble"
default = "resolute"
}
variable "vnet_address_space" {
@@ -156,19 +156,19 @@ variable "vnet_address_space" {
}
variable "ext_subnet_cidr" {
description = "CIDR of the router's external (WAN-facing) subnet."
description = "CIDR of the server's external (WAN-facing) subnet."
type = string
default = "10.0.1.0/24"
}
variable "int_subnet_cidr" {
description = "CIDR of the router's internal (protected-network-facing) subnet."
description = "CIDR of the server's internal (protected-network-facing) subnet."
type = string
default = "10.0.2.0/24"
}
variable "workload_subnet_cidr" {
description = "CIDR of the demo protected workload subnet, routed through the router."
description = "CIDR of the demo protected workload subnet, routed through the server."
type = string
default = "10.0.3.0/24"
}
+3 -3
View File
@@ -1,6 +1,6 @@
# Bare VM on the workload subnet, for manually verifying that its traffic to
# remote_cidrs flows through the router. Off by default so a plain apply
# stays to just the router.
# remote_cidrs flows through the server. Off by default so a plain apply
# stays to just the server.
resource "azurerm_network_interface" "workload" {
count = var.deploy_workload_vm ? 1 : 0
@@ -37,7 +37,7 @@ resource "azurerm_linux_virtual_machine" "workload" {
source_image_reference {
publisher = "Canonical"
offer = "ubuntu-24_04-lts"
offer = "ubuntu-26_04-lts"
sku = "server"
version = "latest"
}