SSH Reverse Proxy Tunnel (Postman)
·Aug 17, 2022·
1 min read
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
- Postman settings > Proxy > Add custom proxy > 127.0.0.1:8080
- Uncheck use system proxy