Skip to content

How to specify a port to localproxy to tunnel to greengrass SecureTunneling component

0

When I try to run any port except 'SSH', i get an error from greengrass like below.

How do I specify a specific port with localproxy so that I can remote tunnel this via aws.greengrass.SecureTunneling

This works ok: aws iotsecuretunneling open-tunnel --destination-config=thingName=MyThing,services=SSH

This fails: aws iotsecuretunneling open-tunnel --destination-config=thingName=MyThing,services=1234

ERRORS

2024-09-11T04:45:37.147Z [INFO] (Copier) aws.greengrass.SecureTunneling: stdout. [ERROR] 2024-09-11 14:45:37.146 [pool-3-thread-3] SubscribeResponseHandler - Secure Tunneling Process: 2024-09-11T04:45:37.135Z [ERROR] {SecureTunnelingFeature.cpp}: Requested unsupported service. service=SERIAL. {scriptName=services.aws.greengrass.SecureTunneling.lifecycle.run.script, serviceName=aws.greengrass.SecureTunneling, currentState=RUNNING}
2024-09-11T04:45:37.148Z [INFO] (Copier) aws.greengrass.SecureTunneling: stdout. [ERROR] 2024-09-11 14:45:37.146 [pool-3-thread-3] SubscribeResponseHandler - Secure Tunneling Process: 2024-09-11T04:45:37.135Z [ERROR] {Config.cpp}: *** AWS IOT DEVICE CLIENT FATAL ERROR: port is missing or invalid ***. {scriptName=services.aws.greengrass.SecureTunneling.lifecycle.run.script, serviceName=aws.greengrass.SecureTunneling, currentState=RUNNING}
2024-09-11T04:45:37.148Z [INFO] (Copier) aws.greengrass.SecureTunneling: stdout. [ERROR] 2024-09-11 14:45:37.146 [pool-3-thread-3] SubscribeResponseHandler - Secure Tunneling Process: 2024-09-11T04:45:37.135Z [ERROR] {Main.cpp}: *** AWS IOT DEVICE CLIENT FATAL ERROR: AWS IoT Device Client must abort execution, reason: Invalid configuration ***. {scriptName=services.aws.greengrass.SecureTunneling.lifecycle.run.script, serviceName=aws.greengrass.SecureTunneling, currentState=RUNNING}

or

2024-09-11T04:52:29.867Z [INFO] (Copier) aws.greengrass.SecureTunneling: stdout. [ERROR] 2024-09-11 14:52:29.867 [pool-3-thread-6] SubscribeResponseHandler - Secure Tunneling Process: 2024-09-11T04:52:29.851Z [ERROR] {SecureTunnelingFeature.cpp}: Requested unsupported service. service=1234. {scriptName=services.aws.greengrass.SecureTunneling.lifecycle.run.script, serviceName=aws.greengrass.SecureTunneling, currentState=RUNNING}
2024-09-11T04:52:29.868Z [INFO] (Copier) aws.greengrass.SecureTunneling: stdout. [ERROR] 2024-09-11 14:52:29.867 [pool-3-thread-6] SubscribeResponseHandler - Secure Tunneling Process: 2024-09-11T04:52:29.851Z [ERROR] {Config.cpp}: *** AWS IOT DEVICE CLIENT FATAL ERROR: port is missing or invalid ***. {scriptName=services.aws.greengrass.SecureTunneling.lifecycle.run.script, serviceName=aws.greengrass.SecureTunneling, currentState=RUNNING}
2024-09-11T04:52:29.869Z [INFO] (Copier) aws.greengrass.SecureTunneling: stdout. [ERROR] 2024-09-11 14:52:29.867 [pool-3-thread-6] SubscribeResponseHandler - Secure Tunneling Process: 2024-09-11T04:52:29.851Z [ERROR] {Main.cpp}: *** AWS IOT DEVICE CLIENT FATAL ERROR: AWS IoT Device Client must abort execution, reason: Invalid configuration ***. {scriptName=services.aws.greengrass.SecureTunneling.lifecycle.run.script, serviceName=aws.greengrass.SecureTunneling, currentState=RUNNING}

asked a year ago155 views
1 Answer
2
Accepted Answer

Hi majh. The secure tunneling component uses a build of AWS IoT Device Client that only includes the secure tunneling feature. Presently, AWS IoT Device Client only supports SSH and VNC as the services, and corresponding ports, for the local proxy connection: https://github.com/awslabs/aws-iot-device-client/blob/cf738c82927f5a0020a58fda88a5de65b11a4574/source/tunneling/SecureTunnelingFeature.cpp#L79-L80. Please raise an issue, or make a PR, to add more services.

AWS
EXPERT
answered a year ago
EXPERT
reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.