Search code examples
curltunneling

Curl through an intermediate server


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.


Solution

  • Configure a proxy (like squid) to listen on some port on server1. When client will send request to server1, the request will get forwarded to server2.