- Newest
- Most votes
- Most comments
Client VPN TGW attachments don't solve your IP-per-group problem. They solve a routing problem (centralised access to multiple VPCs), not an identity-to-IP mapping problem.
What TGW attachments give you:
Instead of associating your Client VPN endpoint with a subnet in a single VPC (and routing through TGW to reach other VPCs), you attach the endpoint directly to a Transit Gateway. Clients can reach any VPC attached to that TGW without needing a "landing" VPC. For your architecture (5 accounts, 3 regions, 3 TGWs), this means 3 endpoints instead of potentially 15 - one per region attached to the regional TGW.
What TGW attachments do NOT do:
- They don't assign IPs based on authenticated group
- The IP pool behavior is identical to VPC-attached endpoints - random allocation from your CIDR
How to get group-based access control with Client VPN:
-
Authorization rules (simplest, no IP correlation needed): Define which AD groups can reach which destination CIDRs. For example: AdminGroup → 10.0.0.0/8, DevGroup → 10.1.0.0/16 only. This is native Client VPN functionality and handles most access control needs without caring about the client's assigned IP.
-
Separate endpoints per group (if you truly need IP-based segmentation): Create one endpoint per group with a dedicated CIDR (e.g., Admins: 172.16.0.0/22, Devs: 172.16.4.0/22). Write security group rules at destination resources matching these source ranges. Each endpoint can be TGW-attached for centralized routing. Downsides: more endpoints to manage, separate .ovpn configs per group, higher cost.
-
Client Connect Handler (Lambda-based, advanced): Use a Client Connect Handler Lambda to evaluate group membership at connection time. You can deny connections or log the group-to-IP mapping for auditing. This doesn't fix the IP assignment itself, but lets you enforce policy dynamically.
Recommendation for 50 users across 5 accounts:
- Deploy 3 Client VPN endpoints (one per region), each TGW-attached
- Use authorization rules for access control (not IP ranges)
- Enable connection logging to CloudWatch for audit trail (logs show username + assigned IP + timestamps)
- Skip the separate-endpoint-per-group approach unless you have a hard requirement for IP-based firewalling at the destination (e.g., third-party systems that can only filter by source IP)
The TGW attachment is worth adopting for the routing simplification, just don't expect it to solve the identity-to-IP problem.
References:
Relevant content
asked 2 years ago
asked 6 months ago
asked 2 years ago
- AWS OFFICIALUpdated 3 years ago
