SSH Reverse Proxy Tunnel (Postman)

SSH Reverse Proxy Tunnel (Postman)

Table of contents

No heading

No headings in the article.

Suppose you have to test some API. But the APIs can be accessed from your staging server only. How can you test those APIs from your local PC?

Hmm, A big problem. But it has a small solution. You can follow the steps below.

Install proxy package if not installed:

npm install -g http-proxy-to-socks

Add port listener for your remote server (here we are opening 5001 port)

ssh -D 5001 -i private_key.pem server_user_name@server_ip

Forward socket requests to 5001 port (It’ll capture requests from port 8080)

hpts -s -p 8080

Setup postman proxy

  1. Postman settings > Proxy > Add custom proxy >
  2. Uncheck use system proxy