All Projects → qoomon → Docker Host

qoomon / Docker Host

Licence: mit
A docker sidecar container to forward all traffic to local docker host or any other host

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Docker Host

Polycube
eBPF/XDP-based software framework for fast network services running in the Linux kernel.
Stars: ✭ 217 (-71.78%)
Mutual labels:  nat, iptables, firewall
Nps
一款轻量级、高性能、功能强大的内网穿透代理服务器。支持tcp、udp、socks5、http等几乎所有流量转发,可用来访问内网网站、本地支付接口调试、ssh访问、远程桌面,内网dns解析、内网socks5代理等等……,并带有功能强大的web管理端。a lightweight, high-performance, powerful intranet penetration proxy server, with a powerful web management terminal.
Stars: ✭ 19,537 (+2440.57%)
Mutual labels:  tunnel, nat, firewall
Docker Fail2ban
Fail2ban Docker image based on Alpine Linux
Stars: ✭ 263 (-65.8%)
Mutual labels:  iptables, firewall, docker-compose
Mr2
Mr.2 can help you expose local server to external network. Support both TCP/UDP, of course support HTTP. Zero-Configuration.
Stars: ✭ 1,102 (+43.3%)
Mutual labels:  tunnel, nat, firewall
Frp
A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.
Stars: ✭ 51,746 (+6629%)
Mutual labels:  tunnel, nat, firewall
tunman
Comprehensive solution for SSH tunnels - respawning, healthchecking/monitoring
Stars: ✭ 43 (-94.41%)
Mutual labels:  tunnel, firewall, nat
Frpc Android
Android,安卓版frpc,一个快速反向代理,可帮助您将NAT或防火墙后面的本地服务器暴露给Internet。
Stars: ✭ 205 (-73.34%)
Mutual labels:  tunnel, nat, firewall
Lanproxy
lanproxy是一个将局域网个人电脑、服务器代理到公网的内网穿透工具,支持tcp流量转发,可支持任何tcp上层协议(访问内网网站、本地支付接口调试、ssh访问、远程桌面、http代理、https代理、socks5代理...)。技术交流QQ群 678776401
Stars: ✭ 4,784 (+522.11%)
Mutual labels:  tunnel, nat, firewall
uppersafe-osfw
UPPERSAFE Open Source Firewall
Stars: ✭ 21 (-97.27%)
Mutual labels:  firewall, iptables
FastTunnel
expose a local server to the internet. 高性能跨平台的内网穿透解决方案 远程内网计算机 域名访问内网站点 反向代理内网服务 端口转发 http代理
Stars: ✭ 815 (+5.98%)
Mutual labels:  tunnel, nat
net-network
Public collection of firewall dumps.
Stars: ✭ 40 (-94.8%)
Mutual labels:  firewall, iptables
Python Proxy
HTTP/HTTP2/HTTP3/Socks4/Socks5/Shadowsocks/ShadowsocksR/SSH/Redirect/Pf TCP/UDP asynchronous tunnel proxy implemented in Python 3 asyncio.
Stars: ✭ 692 (-10.01%)
Mutual labels:  tunnel, nat
tlstun
A socks tunnel client and server using websockets over http and tls
Stars: ✭ 36 (-95.32%)
Mutual labels:  tunnel, firewall
opensnitch
OpenSnitch is a GNU/Linux application firewall
Stars: ✭ 398 (-48.24%)
Mutual labels:  firewall, iptables
fuso
一款体积小, 快速, 稳定, 高效, 轻量的内网穿透, 端口转发工具 支持多连接,级联代理,传输加密 (A small volume, fast, stable, efficient, and lightweight intranet penetration, port forwarding tool supports multiple connections, cascading proxy, and transmission encryption)
Stars: ✭ 1,132 (+47.2%)
Mutual labels:  tunnel, nat
ddos-mitigation
Tips to mitigate and secure your large-scale server against DDoS attacks.
Stars: ✭ 58 (-92.46%)
Mutual labels:  firewall, iptables
anytunnel
内网穿透,内网穿透代理服务器,商用内网穿透代理系统,内网穿透平台,内网穿透多用户会员系统。
Stars: ✭ 115 (-85.05%)
Mutual labels:  tunnel, nat
Wireguard Docs
📖 Unofficial WireGuard Documentation: Setup, Usage, Configuration, and full example setups for VPNs supporting both servers & roaming clients.
Stars: ✭ 3,201 (+316.25%)
Mutual labels:  tunnel, nat
Ansible Role Firewall
Ansible Role - iptables Firewall configuration.
Stars: ✭ 343 (-55.4%)
Mutual labels:  iptables, firewall
Esp wifi repeater
A full functional WiFi Repeater (correctly: a WiFi NAT Router)
Stars: ✭ 3,818 (+396.49%)
Mutual labels:  nat, firewall

docker-host Sparkline

GitHub release Docker Stars Build Workflow

Docker Image Tags:

  • latest
  • 2
  • 2.x.x

Docker image to forward TCP and UDP traffic to the docker host.

This container will determine docker host address in the following order

  • Use ip from environment variable DOCKER_HOST if set
    • This allows you to use this image to forward traffic to arbitrary destinations, not only the docker host.
  • Try to resolve host.docker.internal (getent ahostsv4 host.docker.internal)
  • Defaults to default gateway (ip -4 route show default)

By default all ports (0:65535) are forwarded to docker host you can override ports by setting environment variable PORTS to a comma separated list of ports and/or port ranges e.g 443,80,8000:9000

⚠️ On Linux systems

  • You have to bind your host applications to 0.0.0.0 or bridge network gateway in addition to 127.0.0.1.

    Use following docker command to get the bridge network gateway IP address

    docker network inspect bridge --format='{{( index .IPAM.Config 0).Gateway}}'

  • You might need to configure your firewall of the host system to allow the docker-host container to communicate with the host on your relevant port, see #21.


Examples

These examples will send messages from docker container to docker host with netcat

Preparation

Start netcat server TCP on port 2323 to receive and display messages

nc -p 2323 -lk

Start netcat server UDP on port 5353 to receive and display messages

nc -p 5353 -lk -u

Docker Link

Run the dockerhost container.

docker run --rm \
  --name 'docker-host' \
  --cap-add=NET_ADMIN --cap-add=NET_RAW \
  --restart on-failure \
  -d qoomon/docker-host

Run your application container and link the dockerhost container. The dockerhost will be reachable through the domain/link dockerhost of the dockerhost container

This example will let you send messages to TCP netcat server on docker host.

docker run --rm \
  --link 'docker-host' \
  -it alpine nc 'docker-host' 2323 -v

This example will let you send messages to UDP netcat server on docker host.

docker run --rm \
  --link 'docker-host' \
  -it alpine nc 'docker-host' 5353 -u -v

Docker Network

Create the dockerhost network.

network_name="Network-$RANDOM"
docker network create "$network_name"

Run the dockerhost container within the dockerhost network.

docker run --name "${network_name}-docker-host" \
  --cap-add=NET_ADMIN --cap-add=NET_RAW \
  --restart on-failure \
  --net=${network_name} --network-alias 'docker-host' \
  qoomon/docker-host

Run your application container within the dockerhost network. The dockerhost will be reachable through the domain/link docker-host of the dockerhost container

This example will let you send messages to TCP netcat server on docker host.

docker run --rm \
  --link 'docker-host' \
  -it alpine nc 'docker-host' 2323 -v

This example will let you send messages to UDP netcat server on docker host.

docker run --rm \
  --link 'docker-host' \
  -it alpine nc 'docker-host' 5353 -u -v

Docker Compose

version: '2'

services:
    docker-host:
        image: qoomon/docker-host
        cap_add: [ 'NET_ADMIN', 'NET_RAW' ]
        mem_limit: 8M
        restart: on-failure
    tcp_message_emitter:
        depends_on: [ docker-host ]
        image: alpine
        command: [ "sh", "-c", "while :; do date; sleep 1; done | nc 'docker-host' 2323 -v"]
    udp_message_emitter:
        depends_on: [ docker-host ]
        image: alpine
        command: [ "sh", "-c", "while :; do date; sleep 1; done | nc 'docker-host' 5353 -u -v"]

External References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].