# 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:

```bash
npm install -g http-proxy-to-socks
```

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

```bash
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)

```bash
hpts -s 127.0.0.1:5001 -p 8080
```

Setup postman proxy

1. Postman settings &gt; Proxy &gt; Add custom proxy &gt; 127.0.0.1:8080
    
2. Uncheck use system proxy
