You are in front of PC A, for e.g. your company firewall

PC A is under a network with a firewall that blocks outbound traffic to some websites.

You also have a public server (PC B) that is not under any firewall (or the firewall rule is setup by yourself.

There is a way that allow you to view the blocked website. With the following ssh tunnel you can use your browser under PC B's name from PC A

In PC A's command, execute

ssh -D 1234 -CqNf sammy@example.com

Command explanation

  • -D sock channel port specifier
  • -C: compress data
  • -q: quite mode, no warning
  • -N: open SSH connection with no command to be executed
  • -f: run background

Now your localhost serves as Sock proxy server at port 1234

Open firefox -> preference -> network setting -> Proxy -> muanlly Sock host. And set

Host: localhost

port: 1234

And enjoy