Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuring local IP for ec2-instance-connect open-tunnel. #8488

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from

Conversation

paulgb
Copy link

@paulgb paulgb commented Jan 21, 2024

The IP used for ec2-instance-connect open-tunnel was hard-coded to localhost. This means that it does not work for users of the AWS CLI Docker image, because Docker can only expose services that listen on 0.0.0.0.

This PR adds an option --local-ip, consistent with --local-port, which allows the user to override the IP that the tunnel is bound to.

Issue #, if available: N/A

Description of changes:

  • Adds --local-ip CLI flag to open-tunnel command
  • Passes this value through to WebsocketManager
  • Uses it to bind to

I could not find instructions for running tests, so I did not add a test. I did do a manual sanity check to ensure that it worked as I thought it would.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

The IP used for ec2-instance-connect open-tunnel was hard-coded to
localhost. This means that it does not work for users of the AWS CLI
Docker image, because Docker can only expose services that listen on
0.0.0.0.

This PR adds an option --local-ip, consistent with --local-port, which
allows the user to override the IP that the tunnel is bound to.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant