location: Diff for "ProxyBySsh"

Institute of Mathematics - PublicMathWiki:

Differences between revisions 11 and 13 (spanning 2 versions)
Revision 11 as of 2020-04-11 06:43:02
Size: 1719
Editor: crose
Comment:
Revision 13 as of 2020-04-11 07:06:08
Size: 2657
Editor: crose
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
To get Web access to I-MATH intranet webserver it's possible to setup a SOCKS SSH proxy channel. This makes To get Web access to I-MATH intranet webserver it's possible to setup a SOCKS SSH proxy channel. This is setting is not persistent, start it when you need it.

The proxy configuration can be done:

 * on the OS - ''not described here''.
 * via commandline - described here for ''Google Chrome'' and ''Opera''.
 * inside the browser via GUI - described here for ''Firefox''.
Line 20: Line 26:
The proxy configuration can be done:

 * on the OS - not described here.
 * via commandline - described here for Google Chrome and Opera.
 * inside the browser via GUI - described here for firefox.

To use the I-MATH internal DNS Server (necessary to get access to hostnames that are only known inside of I-MATH), use the SOCKS5 protocol, '''incl. DNS forward'''.
To use the I-MATH internal DNS Server (necessary to get access to hostnames that are only known inside of I-MATH), use the SOCKS5 protocol '''incl. DNS forward'''.
Line 28: Line 28:
For Google Chrome or Opera, open a second terminal and type the following command For Google Chrome or Opera, open a second terminal and type the following command.
Line 33: Line 33:
|| Firefox || * There is no officially option '-proxy-server' for the commandline<<BR>>* Start firefox, open 'settings', navigate to 'network' > screenshot ||
 *
Firefox

* There is no officially option '-proxy-server' for the commandline
  
* Start firefox, open 'settings', navigate to 'network' > screenshot
Line 36: Line 40:

== FAQ ==

 * Q: Can I configure Google Chrome / Opera via GUI like Firefox

   * A: yes - just check the 'network' seetings.

 * Q: Why should I start Google Chrome / Opera via commandline?

   * A: This is a very quick way to use the proxy. If you do not need it, start the browser via mouse.

 * Q: Can I automate the steps?

   * A: yes. A small bash script should do the trick: {{{
#!
#!/bin/bash

nohup google-chrome --proxy-server="socks5://localhost:1080" &
ssh -C -D 1080 <I-MATH account>@ssh.math.uzh.ch
}}}

   * Check [[ssh#Working_with_SSH_Keys|SSH Keys]] to setup password less SSH login.

 * Q: in Firefox I don't like to toggle the proxy on/off all the time - is there a better way?

   * A: Create an additional profile 'proxy'. Start Firefox via Terminal `firefox -P`, create the profile, use it and do the proxy config there.

(Web) Proxy by SSH

To get Web access to I-MATH intranet webserver it's possible to setup a SOCKS SSH proxy channel. This is setting is not persistent, start it when you need it.

The proxy configuration can be done:

  • on the OS - not described here.

  • via commandline - described here for Google Chrome and Opera.

  • inside the browser via GUI - described here for Firefox.

Start SSH Proxy

Start the Browser

To use the I-MATH internal DNS Server (necessary to get access to hostnames that are only known inside of I-MATH), use the SOCKS5 protocol incl. DNS forward.

For Google Chrome or Opera, open a second terminal and type the following command.

Browser

Command

Google Chrome

Linux: google-chrome --proxy-server="socks5://localhost:1080"
Mac OS X: /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --proxy-server="socks5://localhost:1080"

Opera

Linux: opera --proxy-server="socks5://localhost:1080"
Mac OS X: /Applications/Opera.app/Contents/MacOS/Opera --proxy-server="socks5://localhost:1080"

  • Firefox
    • There is no officially option '-proxy-server' for the commandline
    • Start firefox, open 'settings', navigate to 'network' > screenshot

ff-proxy.png

FAQ

  • Q: Can I configure Google Chrome / Opera via GUI like Firefox
    • A: yes - just check the 'network' seetings.
  • Q: Why should I start Google Chrome / Opera via commandline?
    • A: This is a very quick way to use the proxy. If you do not need it, start the browser via mouse.
  • Q: Can I automate the steps?
    • A: yes. A small bash script should do the trick:

      #!/bin/bash
      
      nohup google-chrome --proxy-server="socks5://localhost:1080" &
      ssh -C -D 1080 <I-MATH account>@ssh.math.uzh.ch
    • Check SSH Keys to setup password less SSH login.

  • Q: in Firefox I don't like to toggle the proxy on/off all the time - is there a better way?
    • A: Create an additional profile 'proxy'. Start Firefox via Terminal firefox -P, create the profile, use it and do the proxy config there.

PublicMathWiki: ProxyBySsh (last edited 2021-02-04 16:23:12 by eseide)