aws / amazon-ssm-agent

An agent to enable remote management of your EC2 instances, on-premises servers, or virtual machines (VMs).
https://aws.amazon.com/systems-manager/
Apache License 2.0
1.05k stars 323 forks source link

Specify local IP address when starting port forwarding session #524

Open txigreman opened 1 year ago

txigreman commented 1 year ago

Port forwarding sessions always opens local port on IP 127.0.0.1. It would be great if any other IP of the loopback could be specified as parameter.

Examples: aws ssm start-session --target $INSTANCE_ID --document-name AWS-StartPortForwardingSession --parameters '{"portNumber":["8080"], "localPortNumber":["80"], "localIpAddress":["127.1.2.3"]}'

aws ssm start-session --target $INSTANCE_ID --document-name AWS-StartPortForwardingSessionToRemoteHost --parameters '{"host":["my.rds.amazonaws.com"],"portNumber":["3306"], "localPortNumber":["3306"], "localIpAddress":["127.4.5.6"]}'

yuting-fan commented 1 year ago

@txigreman Thank you for raising this feature request. We have captured it down and will evaluate when this request will be picked up from our priority queue.

Cheers, Yuting

SadmiB commented 11 months ago

I came across this issue as I needed to port forward to the ip of host.docker.internal (which is mostly 172.17.0.1) and this will allow me to access the forwarded port from the docker container.

AkikoOrenji commented 10 months ago

yes please. No sure why such a basic feature isn't implemented.

JacquesOfAllTrades commented 9 months ago

I could use this right now. I've been running SSM on my main dev machine to let a container hit a DB in RDS. I need to temporarily run the container on a secondary, headless dev machine, and was hoping it could use the existing tunnel on my main box.

swilari commented 9 months ago

Indeed, this is very much needed.

eswidler commented 2 months ago

I could use this right now. I've been running SSM on my main dev machine to let a container hit a DB in RDS. I need to temporarily run the container on a secondary, headless dev machine, and was hoping it could use the existing tunnel on my main box.

Same exact issue. Adding my +1

mmmmmrob commented 1 day ago

+1