Skip to main content

Command Palette

Search for a command to run...

SSH Reverse Proxy Tunnel (Postman)

Updated
1 min read
SSH Reverse Proxy Tunnel (Postman)

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 127.0.0.1:5001 -p 8080

Setup postman proxy

  1. Postman settings > Proxy > Add custom proxy > 127.0.0.1:8080

  2. Uncheck use system proxy

More from this blog

Sohag's Notes

79 posts

Tech Lead at MobyPay | Certified Laravel Developer | PHP JS GO | DevOps Enthusiast | Open to projects