How to launch your local browser through a gateway machine
From Planets
What this is about
There are cases where you need to launch your browser from your local machine to reach a dedicated webpage, but for security reasons the target webpage requires that it be accessed from a browser on the declared gateway machine. This is however not always the case (some gateway machines are stripped of many softwares, including browsers) and then one needs an alternative...
For the sake of the example: let's assume your account login is "mylogin", your gateway machine is called "gateway" and that you need to connect to "https://www.somewhere.fr"
One way of doing it
- On your local machine, edit the network preferences to select "manual host SOCKS" and specify IP "127.0.0.1" and Port "8888"
- Launch a terminal from your local machine and connect via ssh to the gateway machine : "ssh -D 8888 mylogin@gateway" and keep it in the background.
- In your browser on the local machine you can now access "https://www.somewhere.fr"
The (minor) drawback of this technique is that afterwards you'll probably want to reset your browser network preference back to "automatic" so as to no longer go through the gateway machine.
An alternative way of doing it
- launch a terminal on your local machine an run "ssh -L 8888:www.somewhere.fr:443 mylogin@gateway"
- In your browser on the local machine head for "https://localhost:8888" and you'll find yourself on "www.somewhere.fr" where you can navigate.