I’m running boundary server on a single virtualbox vm in nat port forwarding mode.
The ubuntu vm has both controller and worker configured and running.
Also have these port forwarding rules set on host machine 9200->vm:9200, 9202->vm:9202
I can authenticate with the controller successfuly. However can’t connect to targets.
boundary targets read -id ttcp_yj50ER3Uq3 -token at_Zh5SfzpyYR_s1bWQSM96NgAY9UAy1W235eL3fiaui4QNBkhEkSnYy7ReY24ME2bYK3FtZGZWfX3C7NGPbPABNcgGusvRjQ1EFwc2AS7v1rq6Xxjv1fYnmwDbrLmV7UHdkP5y9ZUxFnN6BAtwRnTH82g2Q
Target information:
Created Time: Sun, 25 Oct 2020 18:18:47 IST
Description: Provides an initial target in Boundary
ID: ttcp_yj50ER3Uq3
Name: Generated target
Session Connection Limit: 1
Session Max Seconds: 28800
Type: tcp
Updated Time: Sun, 25 Oct 2020 20:01:40 IST
Version: 3
Scope:
ID: p_kdHp9amf5d
Name: Generated project scope
Parent Scope ID: o_xEbV3JxnWG
Type: project
Host Sets:
Host Catalog ID: hcst_YkiuiAkEq4
ID: hsst_yYUwzxseOB
Attributes:
Default Port: 22
My controller hcl:
disable_mlock = true
# Controller configuration block
controller {
# This name attr must be unique across all controller instances if running in HA mode
name = "demo-controller-1"
description = "A controller for a demo!"
# Database URL for postgres. This can be a direct "postgres://"
# URL, or it can be "file://" to read the contents of a file to
# supply the url, or "env://" to name an environment variable
# that contains the URL.
database {
url = "postgresql://postgres:password123@localhost:5432/boundary?sslmode=disable"
}
}
# API listener configuration block
listener "tcp" {
# Should be the address of the NIC that the controller server will be reached on
address = "10.0.2.5"
# The purpose of this listener block
purpose = "api"
tls_disable = true
# Uncomment to enable CORS for the Admin UI. Be sure to set the allowed origin(s)
# to appropriate values.
#cors_enabled = true
#cors_allowed_origins = ["yourcorp.yourdomain.com"]
}
# Data-plane listener configuration block (used for worker coordination)
listener "tcp" {
# Should be the IP of the NIC that the worker will connect on
address = "10.0.2.5"
# The purpose of this listener
purpose = "cluster"
tls_disable = true
}
# Root KMS configuration block: this is the root key for Boundary
# Use a production KMS such as AWS KMS in production installs
kms "aead" {
purpose = "root"
aead_type = "aes-gcm"
key = "sP1fnF5Xz85RrXyELHFeZg9Ad2qt4Z4bgNHVGtD6ung="
key_id = "global_root"
}
# Worker authorization KMS
# Use a production KMS such as AWS KMS for production installs
# This key is the same key used in the worker configuration
kms "aead" {
purpose = "worker-auth"
aead_type = "aes-gcm"
key = "8fZBjCUfN0TzjEGLQldGY4+iE9AkOvCfjh7+p0GtRBQ="
key_id = "global_worker-auth"
}
# Recovery KMS block: configures the recovery key for Boundary
# Use a production KMS such as AWS KMS for production installs
kms "aead" {
purpose = "recovery"
aead_type = "aes-gcm"
key = "8fZBjCUfN0TzjEGLQldGY4+iE9AkOvCfjh7+p0GtRBQ="
key_id = "global_recovery"
}
My worker hcl:
listener "tcp" {
purpose = "proxy"
tls_disable = true
}
worker {
# Name attr must be unique across workers
name = "demo-worker-1"
description = "A default worker created demonstration"
# Workers must be able to reach controllers on :9202
controllers = [
"10.0.2.5"
]
# public_addr = "127.0.0.1"
}
# must be same key as used on controller config
kms "aead" {
purpose = "worker-auth"
aead_type = "aes-gcm"
key = "8fZBjCUfN0TzjEGLQldGY4+iE9AkOvCfjh7+p0GtRBQ="
key_id = "global_worker-auth"
}
Systemd status:
kk@kk-ubvm:~/Desktop$ sudo systemctl status boundary-controller.service
● boundary-controller.service - boundary controller
Loaded: loaded (/etc/systemd/system/boundary-controller.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2020-10-25 19:49:15 IST; 29min ago
Main PID: 4094 (boundary)
Tasks: 10 (limit: 4652)
Memory: 17.6M
CGroup: /system.slice/boundary-controller.service
├─4094 /usr/local/bin/boundary server -config /etc/boundary-controller.hcl
└─4102 /usr/bin/dbus-daemon --syslog --fork --print-pid 4 --print-address 6 --session
Oct 25 19:49:15 kk-ubvm boundary[4094]: Listener 2: tcp (addr: "10.0.2.5:9201", max_request_duration: "1m30s", purpose: "cluster")
Oct 25 19:49:15 kk-ubvm boundary[4094]: Log Level: info
Oct 25 19:49:15 kk-ubvm boundary[4094]: Mlock: supported: true, enabled: false
Oct 25 19:49:15 kk-ubvm boundary[4094]: Version: Boundary v0.1.1
Oct 25 19:49:15 kk-ubvm boundary[4094]: Version Sha: eccd68d73c3edf14863ecfd31f9023063b809d5a
Oct 25 19:49:15 kk-ubvm boundary[4094]: ==> Boundary server started! Log data will stream in below:
Oct 25 19:49:15 kk-ubvm boundary[4094]: 2020-10-25T19:49:15.977+0530 [INFO] controller: cluster address: addr=10.0.2.5:9201
Oct 25 19:50:01 kk-ubvm boundary[4094]: 2020-10-25T19:50:01.731+0530 [INFO] controller: worker successfully authed: name=demo-worker-1
Oct 25 19:50:20 kk-ubvm boundary[4094]: 2020-10-25T19:50:20.691+0530 [INFO] controller: worker successfully authed: name=demo-worker-1
Oct 25 19:52:05 kk-ubvm boundary[4094]: 2020-10-25T19:52:05.750+0530 [INFO] controller: worker successfully authed: name=demo-worker-1
kk@kk-ubvm:~/Desktop$ sudo systemctl status boundary-worker.service
● boundary-worker.service - boundary worker
Loaded: loaded (/etc/systemd/system/boundary-worker.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2020-10-25 19:52:05 IST; 26min ago
Main PID: 4300 (boundary)
Tasks: 9 (limit: 4652)
Memory: 107.6M
CGroup: /system.slice/boundary-worker.service
├─4300 /usr/local/bin/boundary server -config /etc/boundary-worker.hcl
└─4329 /usr/bin/dbus-daemon --syslog --fork --print-pid 4 --print-address 6 --session
Oct 25 19:52:05 kk-ubvm boundary[4300]: [Worker-Auth] AEAD Type: aes-gcm
Oct 25 19:52:05 kk-ubvm boundary[4300]: Cgo: disabled
Oct 25 19:52:05 kk-ubvm boundary[4300]: Listener 1: tcp (addr: "127.0.0.1:9202", max_request_duration: "1m30s", purpose: "proxy")
Oct 25 19:52:05 kk-ubvm boundary[4300]: Log Level: info
Oct 25 19:52:05 kk-ubvm boundary[4300]: Mlock: supported: true, enabled: true
Oct 25 19:52:05 kk-ubvm boundary[4300]: Public Addr: 127.0.0.1:9202
Oct 25 19:52:05 kk-ubvm boundary[4300]: Version: Boundary v0.1.1
Oct 25 19:52:05 kk-ubvm boundary[4300]: Version Sha: eccd68d73c3edf14863ecfd31f9023063b809d5a
Oct 25 19:52:05 kk-ubvm boundary[4300]: ==> Boundary server started! Log data will stream in below:
Oct 25 19:52:05 kk-ubvm boundary[4300]: 2020-10-25T19:52:05.748+0530 [INFO] worker: connected to controller: address=10.0.2.5:9201
The error message while trying to connect to target
boundary connect ssh -target-id ttcp_yj50ER3Uq3 -token at_Zh5SfzpyYR_s1bWQSM96NgAY9UAy1W235eL3fiaui4QNBkhEkSnYy7ReY24ME2bYK3FtZGZWfX3C7NGPbPABNcgGusvRjQ1EFwc2AS7v1rq6Xxjv1fYnmwDbrLmV7UHdkP5y9ZUxFnN6BAtwRnTH82g2Q
Error dialing the worker: failed to WebSocket dial: failed to send handshake request: Get "https://127.0.0.1:9202/v1/proxy": read tcp 127.0.0.1:51644->127.0.0.1:9202: read: connection reset by peer
kex_exchange_identification: read: Connection reset by peer
Connection reset by 127.0.0.1 port 40185