Monday, April 29, 2024
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 5131  / 1 Year ago, sat, april 1, 2023, 3:12:30

So, I want to visit a website that only permits access to computers from certain ip domains. My ip is not from one of the allowed domains, but I've ssh'd into a (linux) machine at another location that is at one of the allowed domains.




How do I launch a web browser on my local machine that visits websites through the ip of the remote machine?



More From » command-line

 Answers
5

The SSH tunneling in Clemens' answer will work for one specific website, with caveats... if the site does virtual hosting, where the content depends on your HTTP request pointing at a specific hostname, simple port tunneling won't work. And it will only get you to the one site.



A more robust solution is to use OpenSSH dynamic port forwarding. The command would be:



ssh -D 1080 ssh-server.example.com


Next, set the browser on your client to use a SOCKS proxy at 127.0.0.1, port 1080.



Now, regardless of which site you're visiting, all of your browsing activity (including DNS lookups) will use the remote server.



More detail is here: SSH/OpenSSH/PortForwarding: Dynamic Port Forwarding



If you need to switch frequently between browsing normally and browsing through the remote SSH server, look into installing a plugin for your browser to do fast proxy switching. There are a lot of them.


[#30727] Saturday, April 1, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
amencisiv

Total Points: 9
Total Questions: 102
Total Answers: 118

Location: Tajikistan
Member since Tue, Mar 21, 2023
1 Year ago
;