Giter VIP home page Giter VIP logo

ssh-socks-tunnel-docker's Introduction

SSH SOCKS Tunnel Docker Image

This image contains a simple openssh configuration over alpine. The goal is have a straightforward way to setup a simple ssh server in order to create a SOCKS proxy. The purpose is, once again, to defeat those damn enterprise proxies that basically disallow you anything aside connecting to the crappy enterprise website.

While at home

Launch the docker container on your server:

docker run -d -p 443:22 -e "USER_SSH_ALLOWED=*paste your ssh key here*" nicolasvan/ssh-socks-tunnel

In the above example we redirect the 22 port to 443 (HTTPS port) on our host. The reason is that the hellish enterprise proxies we try to work around will always disallow connections to all ports except that HTTPS port. We also add some ssh key(s) to allow a safe connexion to our SSH server.

Then create a SOCKS proxy to test:

ssh -D 1234 -p 443 -N user@*your server url*

Configure your browser to connect to the localhost:1234 SOCKS proxy and test that everything works fine. You can check on What is my ip that it's your server IP which is displayed.

The last thing to do before going to work tomorrow is to install corkscrew on your local machine. You can't configure it right now but you may not be able to download it at work, so do it in advance.

While at work

Time to setup and test corkscrew. Here is an example configuration to add to your ~/.ssh/config file (assuming you don't have credentials to add, which you will):

ProxyCommand /usr/local/bin/corkscrew proxy.work.com 80 %h %p

You can quickly test the connection to your remote server using a simple ssh command:

ssh -p 443 user@*your server url*

If it works it's a win. Just setup the SOCKS proxy and your browser the exact same way you did yesterday. You can now, finally, do you work.

ssh-socks-tunnel-docker's People

Contributors

nicolas-van avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.