Skip to content

craph/docker-mole-hole

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Docker Image CI to Docker Hub

Docker SSH Tunnel

Docker Mole Hole

This Docker creates a simple local forward SSH tunnel over a server. It is very useful when your container needs to access to an external protected resource. In this case this container might behave like a proxy to outer space inside your Docker network.

Usage

  1. Don't forget to put your private key (id_rsa) to ~/.ssh folder.

  2. To run the docker image you can use docker-compose or a simple docker run command :

version: '3'
services:
  dmh:
    image: craf/docker-mole-hole:latest
    volumes:
      - $HOME/.ssh/id_rsa:/home/mole/.ssh/id_rsa:ro
    command: "<LOCAL_IP>:<LOCAL_PORT>:<REMOTE_IP>:<REMOTE_PORT> <TUNNEL_HOST> -p <CUSTOM_TUNNEL_PORT>"
docker run --rm --name mytunnel -v $HOME/.ssh/id_rsa:/home/mole/id_rsa:ro craf/docker-mole-hole:latest *:<LOCAL_PORT>:<REMOTE_IP>:<REMOTE_PORT> <TUNNEL_HOST> -p <CUSTOM_TUNNEL_PORT>
  1. In case you are using docker-compose then run docker-compose up -d and it should work

After you start up docker containers, any container in the same network will be able to access to tunneled instance.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published