At work, they changed a firewall and added a rule to block Youtube. I'm fine with that but some colleagues are quite annoyed by that change. They really want to watch tutorials or kitten on Youtube.
What I like about ssh is how it helps you to bypass a lot of things 😉
What a lot of people don't know about ssh is that it include a SOCKS proxy out of the box that you need to configure in your browser to bypass a restriction. You only need a ssh server somewhere to connect to.
$ ssh -D 3128 -f -C -q -N user@ssh_server -D 3128 tells ssh to launch a SOCKS server on port 3128 locally. -f forks the process into the background. -C turns on compression. -q enables "Quiet mode", since the purpose here is only to tunnel we don't really care about error output and such. -N tells ssh that no commands will be sent (-f complains if we don’t specify this).
Then you just need to configure your app that need to use that tunnel. In our case, we'll use firefox :
Go to the Preferences -> General -> Network Proxy. Check the “Manual proxy configuration” and add in the “SOCKS Host : 127.0.0.1 port : 3128”
Sometimes some DNS requests can be filtered too, for this you can also tunnel them through our little proxy. Here is the manual configuration in the about:config in firefox :
network.proxy.socks : 127.0.0.1 network.proxy.socks_port : 3128 network.proxy.socks.remote_dns : true network.proxy.socks_version : 5 network.proxy.type : 1
Tadaaaa … Enjoy your movies !
ssh firewall CLI tools tips