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.
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.
Assuming you have ssh access on server1, this can be easily done using :
ssh user@server1 curl server2/some/path
You can modify the curl command for PUT, POST accordingly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With