I need to send PUT/GET/POST request with curl through a custom port from client1 to server2. However, server2 only accepts these requests from server1, and denies client1 if connected directly. What would be the best way to tunnel curl requests from client1 to server2 through server1.
In case of SSH, for example, I do this by creating a tunnel. So I am wondering whether a similar functionality exists for curl.