I need to load test an API that can be accessed only using a Jumpbox server. I am able to hit the API in my command prompt by ssh tunnelling and a curl command. I read so many articles, which says after I ssh tunnel, I should be able to hit the API using my Chrome browser. But unfortunately I can't. I get 403 error on Chrome, as well as on JMeter. Can anyone please help? I have added the SSH command and the curl command that I used.
ssh -L 8801:qa.aws.test.com:8080 [email protected]
curl -XPOST "http://test.aws.test.com:8080/customers" -H "Content-Type: application/json" -d '{ "customer": "123456"}'
You're using the wrong port.
ssh -L 8801:qa.aws.test.com:8080command instructs SSH client to listen on the port8801on your local machine and forward all traffic to port8080@qa.aws.test.comSo you should use
http://localhost:8801/customersURL in Chrome, JMeter, cURL or whatever.If you want to use cURL - there is
Import from cURLJMeter dialog where you can put your commandIf you want to use JMeter's HTTP(S) Test Script Recorder - make sure to configure your browser to use proxy for local traffic as well
You can also consider using JMeter Chrome Extension, in this case you won't have to worry about proxies, SSL certificates and so on.