If you're interested in functional programming, you might also want to checkout my second blog which i'm actively working on!!

Thursday, April 9, 2015

Using ssh tunnel with port forwarding

Connectivity has been setup from our staging environment to the third party server (endpoint of our soap clients). However, I wanted to connect locally with SOAP UI to this server, so I needed to setup an ssh tunnel with portforwarding on my macbook. I used to do this with putty on windows in the past so it took me a bit longer to figure this out.

Let's say the endpoint used from our staging environment would be "http://3rdpartyhostname/coolservice". In this case I want to listen on port 8877, and forward traffic from this port using the ssh tunnel to 3rdpartyhostname on port 80

ssh -f username@staginghostname -L 8877:3rdpartyhostname:80 -N

Now I can connect in SOAPUI to the following endpoint "http://localhost:8877/coolservice"

No comments:

Post a Comment