HSCN VPN Operations
Sources: Making a New HSCN VPN (COE 20102774821) · Update HSCN VPN (TRIB 19243270180) · VPN Routes HSCN (TRIB 19397181499)
Consult Lee before any HSCN VPN changes
All HSCN VPN work requires senior engineer oversight. HSCN carries live patient data.
Runbook: Create a New HSCN VPN
When to use: Onboarding a new UK HSCN customer.
Prerequisites:
- Access to
hscn-connection-stackGitLab repo - Access to
raas-managementAWS account (S3 + SSM) - Customer has supplied their VPN endpoint IP and PSK
- Authorisation from Franck Dakpogan or Brendon McAlevey
Phase 1 — Config (Terraform)
-
Clone the
hscn-connection-stackrepo and create a branch namedOPS-XXX/description(whereOPS-XXXis the Jira ticket). -
Add VPN endpoint route in AWS Console:
- Go to
raas-managementAWS Console → VPC → Subnets - Find
hscn-subnet-1andhscn-subnet-2 -
For each: Route table → Routes → Add route → destination = customer VPN endpoint IP → target =
eni-x(the termination node ENI) -
Add new stanza to
config/raas-management.tfvars:{ name = "customer-name" vpn_endpoint = "x.x.x.x" # Customer firewall IP rightid = "@customer-identifier" # Link-local IPs for the tunnel ll_interface = "169.254.1.6/30" # Node 1 (termination01) lr_interface = "169.254.1.5/30" # Node 2 (termination02) ike = "aes256-sha256-modp2048" esp = "aes256-sha256-modp2048,aes128-sha256-modp2048" keyexchange = "ikev1" reauth = "no" ikelifetime = "86400s" keylife = "3600s" mark = 100 # Must be UNIQUE across all VPNs leftsubnet = "10.104.29.0/24" rightsubnet = ["x.x.x.x/32"] # Customer's subnet(s) to advertise routes = ["x.x.x.x/32"] }
!!! important "mark must be unique"
The mark value is a unique identifier for this VPN (used for routing). A lower mark value is preferred when the same route exists in multiple tunnels. Check all existing entries before assigning a new mark.
- Commit and push. Create a Merge Request in GitLab with Lee as reviewer.
Phase 2 — PSKs / Pipelines / Ansible
-
Go to AWS
raas-managementS3 bucket:hscn-vpn-bootstrap-bucket-20200308213701382700000002 -
Navigate to:
strongswan/hscn-vpn-termination01/and downloadipsec.secrets -
Add the new PSK entry in this format:
Where10.104.29.4is the termination node IP andx.x.x.xis the customer VPN endpoint IP. -
Upload the updated
ipsec.secretsback to S3 forhscn-vpn-termination01. -
Repeat steps 2–4 for
hscn-vpn-termination02(using10.104.29.20as the left IP).
!!! warning "Do not mix up the two files"
Each node has its own ipsec.secrets. Termination01 uses 10.104.29.4, termination02 uses 10.104.29.20. Do not upload the wrong file to the wrong node.
- After the MR is merged, trigger the
HSCN VPN Deployworkflow in GitHub Actions (with ACTION =apply) to apply the new config.
Phase 3 — Test
-
Go to EC2 in
raas-managementand connect tohscn-vpn-termination01via Session Manager. -
Escalate to root:
-
Check the new VPN tunnel status:
-
Review the logs for any errors:
-
Repeat on
hscn-vpn-termination02.
Phase 4 — Grafana / DataDog
After the VPN is confirmed up, ensure monitoring is configured:
- Add the new tunnel to the Grafana/DataDog HSCN VPN monitoring dashboard
- Verify BGP routes are appearing correctly in the TGW route table
Runbook: Update VPN Routes
When to use: A customer needs an additional subnet routed through their HSCN VPN, or existing routes need to change.
Sources: VPN Routes HSCN (TRIB 19397181499)
Primary Method (Pipeline)
-
Clone
hscn-connection-stackand create a branch for the change. -
Update the
routesand/orrightsubnetarrays in the relevant VPN stanza inconfig/raas-management.tfvars. -
Commit, push, create MR → pipeline deploys the updated config to S3.
-
Trigger the
HSCN VPN Deployworkflow (with ACTION =apply) to apply the new routes to the termination nodes. -
Verify in TGW:
- AWS Console → Transit Gateways →
tgw-039e174fce8f69655 - Route Tables →
tgw-rtb-09351fe404a1a0891 - Check that the new routes appear in the route table with the correct attachment
Manual Update (if pipeline not available)
-
SSH to the termination nodes (see Troubleshooting):
-
Sync the bootstrap bucket:
-
Run the Ansible playbook with the full
remote_vpnslist: -
Restart strongswan:
Runbook: Update Existing VPN Config
When to use: Cipher suite upgrade, PSK rotation, or modifying VPN parameters.
Sources: Update HSCN VPN (TRIB 19243270180) Cipher suite reference: strongSwan IKEv2 Cipher Suites
Key tfvars fields for a new tunnel:
| Field | Example | Notes |
|---|---|---|
ikelifetime |
86400s |
IKE SA lifetime |
keylife |
3600s |
IPsec SA lifetime |
keyexchange |
ikev1 |
Usually IKEv1 for older customer hardware |
rightsubnet |
["0.0.0.0/0"] |
Use 0.0.0.0/0 to accept all destinations |
mark |
100 |
Lower = preferred route if destination has multiple tunnels |
After updating tfvars:
- Via SSH to
10.104.29.4and10.104.29.20 - Sync from S3
- Run the ansible-playbook with the updated
remote_vpnslist strongswan restart