Secure tunneling doesn't have to be hard or annoying: atun is a tiny cli tool which works based on remote configuration.
It uses tags to define hosts and ports forwarding endpoints. atun.io/ schema namespace is used to easily configure endpoints.
Note
While the tool works, it is still in development and versions before 1.0.0 might have breaking changes. Be ready that commits might be squashed/reset and tags might be rewritten until 1.0.0
brew tap DimmKirr/tap
brew install atunscoop bucket add DimmKirr https://github.com/DimmKirr/scoop-bucket.git
scoop install atunThis tool allows to connect to private resources (RDS, Redis, etc) via routers.
This is the only router type available at the moment. It uses EC2 instances with atun.io schema tags to forward ports to the local machine.
It doesn't require a public IP, since it uses SSM.
In order for the tool to work your EC2 host must emply correct tag schema. At the moment it has two types of tags: Atun Version and Atun Host.
- Version Tag Name =
atun.io/version - Version Tag Value =
<schema_version> - Env Tag Name =
atun.io/env - Env Tag Value =
<environment_name> - Host Tag Name =
atun.io/host/<hostname> - Host Tag Value =
{"local":"<local_port>","proto":"<protocol>","remote":<remote_port>}
- local: port that would be bound on a local machine (your computer)
- proto: protocol of forwarding (only
ssmfor now, but might bek8sorcloudflare) - remote: port that is available on the internal network to the router host.
| AWS Tag | Value | Description |
|---|---|---|
atun.io/version |
1 |
Schema Version. It might change if significant changes would be intoduced |
atun.io/env |
dev |
Specified environment of the router host |
atun.io/host/nutcorp-api.cluster-xxxxxxxxxxxxxxx.us-east-1.rds.amazonaws.com |
{"local":"23306","proto":"ssm","remote":3306} |
Describes endpoints config and how to forward ports for a MySQL RDS |
atun.io/host/nutcorp.xxxxxx.0001.use0.cache.amazonaws.com |
{"local":"26379","proto":"ssm","remote":6379} |
Describes endpoints config and how to forward ports for ElastiCache Redis |
There are two ways to use this tool: when an infra has a router with atun.io schema tags and when it doesn't have it yet.
Atun uses "routers" (such as EC2 routers) to establish secure connections to your infrastructure.
atun router createatun router lsFor troubleshooting or direct access:
atun router shellA relevant protocol will be used, such as SSM.
atun router deleteThis will bring up a tunnel via existing atun.io router
atun upatun downatun statusatun up --createatun down --deletebrew tap DimmKirr/tap
brew install atun --build-from-sourceIf the dev version has cached old metadata (b/c version is the same), use this command:
brew update && brew fetch --force atun && brew reinstall atun- Kubernetes (via annotations & ssh pod)
- AWS EC2 Instance connect
