I will highly appreciate if somebody could help me sort out the following issue:
The following command works normally when I run it on host1:
curl -k -d param=value https://webhost/path
(-k is necessary because the webhost does not have correct certificate installed)
I receive whatever web page is returned.
If I do the following while working on host2:
ssh -f -L 14141:webhost:443 host1 -N
curl -k -d param=value https://host1:14141/path
the result is always 301 Moved Permanently
In all other respects, ssh between host1 and host2 works flawlessly.
The desired result is that webhost thinks that http request comes from host1 which IP is whitelisted as opposed to host2. Is there a simpler way to achieve it?
Thank you for your help.