What I'm trying to do is for learning purpose only and I'd need some help understanding as where and what is going wrong with the SSH tunnel that I created for accessing a remote website. Here is the setup:
- SSH server is running on Raspberry Pi, which is on my local network and behind the router.
IP: 192.168.1.3 - Laptop, which is going to make connection to SSH server and a tunnel to access a remote website.
IP: 192.168.1.6
Process:
- Connect to SSH server with following command:
ssh -L 2000:www.ibm.com:80 -i ~/.ssh/RaspberryPi [email protected] - Key in
localhost:2000in browser to get the webpage
Per my understanding, when localhost:2000 in entered in a browser, www.ibm.com webpage should show up. However, I get a page with message The requested URL "[no URL]", is invalid. shows up.
Not sure, what is wrong here.
Your assumptions are correct.
Just take into account that are more things involved in connect to an url like redirections, http vs https and son on.
Try with another server. For example:
ssh -L 2000:ip-api.com:80 -i ~/.ssh/RaspberryPi [email protected]and browse to
localhost:2000orlocalhost:2000/json/24.48.0.1