amazon-ssm-agent icon indicating copy to clipboard operation
amazon-ssm-agent copied to clipboard

Specify local IP address when starting port forwarding session

Open txigreman opened this issue 1 year ago • 6 comments

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"]}'

txigreman avatar Jun 05 '23 20:06 txigreman

@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

yuting-fan avatar Aug 16 '23 18:08 yuting-fan

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.

SadmiB avatar Oct 10 '23 15:10 SadmiB

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

AkikoOrenji avatar Nov 13 '23 21:11 AkikoOrenji

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.

JacquesOfAllTrades avatar Dec 14 '23 23:12 JacquesOfAllTrades

Indeed, this is very much needed.

swilari avatar Dec 21 '23 07:12 swilari

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

eswidler avatar Jul 30 '24 16:07 eswidler

+1

mmmmmrob avatar Oct 01 '24 11:10 mmmmmrob