All Projects → AlmirKadric-Published → Docker Tuntap Osx

AlmirKadric-Published / Docker Tuntap Osx

Licence: mit
A tuntap shim installer for "Docker for Mac"

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Docker Tuntap Osx

Actix Net
A collection of lower-level libraries for composable network services.
Stars: ✭ 415 (+57.2%)
Mutual labels:  networking, routing
Gke Networking Demos
This project presents a number of best practices for establishing network links between Kubernetes Engine clusters, and exposing cluster services across Google Cloud projects. You will use a set of Deployment Manager templates to create networks, subnets, vpn connections, and Kubernetes Engine clusters.
Stars: ✭ 104 (-60.61%)
Mutual labels:  networking, routing
Cjdns
An encrypted IPv6 network using public-key cryptography for address allocation and a distributed hash table for routing.
Stars: ✭ 4,766 (+1705.3%)
Mutual labels:  networking, routing
Frr
The FRRouting Protocol Suite
Stars: ✭ 2,009 (+660.98%)
Mutual labels:  networking, routing
Corerad
CoreRAD is an extensible and observable IPv6 Neighbor Discovery Protocol router advertisement daemon. Apache 2.0 Licensed.
Stars: ✭ 82 (-68.94%)
Mutual labels:  networking, routing
Ccna60d
60天通过思科认证的网络工程师考试
Stars: ✭ 155 (-41.29%)
Mutual labels:  networking, routing
giuseppe
A controller routing system for expressJS with TypeScript decorators and annotations
Stars: ✭ 49 (-81.44%)
Mutual labels:  routing
vmecs
A simple VMess proxy implementation written in C.
Stars: ✭ 28 (-89.39%)
Mutual labels:  networking
koii
A simple middleware for displaying routes in an express application
Stars: ✭ 73 (-72.35%)
Mutual labels:  routing
everip
The Elastic Versatile Encrypted Relay for IP (EVER/IP) Networking Suite
Stars: ✭ 32 (-87.88%)
Mutual labels:  routing
Ffrouter
Powerful and easy-to-use URL routing library in iOS that supports URL Rewrite(强大、易用、支持 URL Rewrite的 iOS 路由库)
Stars: ✭ 263 (-0.38%)
Mutual labels:  routing
Snabb
Snabb: Simple and fast packet networking
Stars: ✭ 2,782 (+953.79%)
Mutual labels:  networking
Hack-Utils
Script to facilitate different functions and checks
Stars: ✭ 27 (-89.77%)
Mutual labels:  networking
angular-seo
Angular 13 Example SEO Search engine optimization + PWA + SSR + Lazyloading
Stars: ✭ 58 (-78.03%)
Mutual labels:  routing
90DaysOfDevOps
This repository is my documenting repository for learning the world of DevOps. I started this journey on the 1st January 2022 and I plan to run to March 31st for a complete 90-day romp on spending an hour a day including weekends to get a foundational knowledge across a lot of different areas that make up DevOps.
Stars: ✭ 1,575 (+496.59%)
Mutual labels:  networking
rowdy
A convenient DSL for describing web routes
Stars: ✭ 43 (-83.71%)
Mutual labels:  routing
Noobhub
🌐🔥 Network multiplayer and messaging for CoronaSDK, Moai, Gideros, LÖVE & Defold
Stars: ✭ 259 (-1.89%)
Mutual labels:  networking
k-domains
A simple module to manage multiple subdomains with just one project
Stars: ✭ 41 (-84.47%)
Mutual labels:  routing
computer networking a top down approach
Assignments and wireshark labs for Computer Networking: A Top Down Approach 7th Edition
Stars: ✭ 50 (-81.06%)
Mutual labels:  networking
Pypcap
pypcap - python libpcap module, forked from code.google.com/p/pypcap, now actively maintained
Stars: ✭ 255 (-3.41%)
Mutual labels:  networking

docker-tuntap-osx

docker-tuntap-osx is a tuntap support shim installer for Docker for Mac.

The Problem

Current on Docker for Mac has no support for network routing into the Host Virtual Machine that is created using hyperkit. The reason for this is due to the fact that the network interface options used to create the instance does not create a bridge interface between the Physical Machine and the Host Virtual Machine. To make matters worse, the arguments used to create the Host Virtual Machine is hardcoded into the Docker for Mac binary with no means to configure it.

How it works

This installer (docker_tap_install.sh) will move the original hyperkit binary (hyperkit.original) inside the Docker for Mac application and instead places our shim (./sbin/docker.hyperkit.tuntap.sh) in its stead. This shim will then inject the additional arguments required to attach a TunTap interface into the Host Virtual Machine, essentially creating a bridge interface between the guest and the host (this is essentially what hvint0 is on Docker for Windows).

From there the up script (docker_tap_up.sh) is used to bring the network interface up on both the Physical Machine and the Host Virtual Machine. Unlike the install script, which only needs to be run once, this up script must be run for every restart of the Host Virtual Machine.

Once done the IP address 10.0.75.2 can be used as a network routing gateway to reach any containers within the Host Virtual Machine:

route add -net <IP RANGE> -netmask <IP MASK> 10.0.75.2

Note: Although as of docker-for-mac version 17.12.0 you do not need the following, for prior versions you will need to setup IP Forwarding in the iptables defintion on the Host Virtual Machine:
(This is not done by the helpers as this is not a OSX or tuntap specific issue. You would need to do the same for Docker for Windows, as such it should be handled outside the scope of this project.)

docker run --rm --privileged --pid=host debian nsenter -t 1 -m -u -n -i iptables -A FORWARD -i eth1 -j ACCEPT

Note: Although not required for docker-for-mac versions greater than 17.12.0, the above command can be replaced with the following if ever needed and is tested to be working on docker-for-windwos as an alternative. This is in case docker-for-mac changes something in future and this command ends up being a necessity once again.

docker run --rm --privileged --pid=host docker4w/nsenter-dockerd /bin/sh -c 'iptables -A FORWARD -i eth1 -j ACCEPT'

Dependencies

Docker for Mac

TunTap

brew tap caskroom/cask
brew cask install tuntap

How to install it

To install it, run the shim installer script. This will automatically check if the currently installed shim is the correct version and make a backup if necessary:

./sbin/docker_tap_install.sh

After this you will need to bring up the network interfaces every time the docker Host Virtual Machine is restarted:

./sbin/docker_tap_up.sh

How to remove it

The uninstall script will simply revert the installer. Restoring the original and removing the shim:

./sbin/docker_tap_uninstall.sh

Projects using docker-tuntap-osx

License

MIT

References & Credits

  • A big thanks to michaelhenkel and strayerror on the Docker forums for the inspiration and help to make this package
  • The original thread on the Docker Forums
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].