Giter Site home page Giter Site logo

carrier-project / v6-n2n-prototype Goto Github PK

View Code? Open in Web Editor NEW
0.0 5.0 0.0 132 KB

Experimental setup for peer-to-peer network for algorithm containers with port forwarding

License: Apache License 2.0

Dockerfile 6.31% Python 83.19% Shell 10.51%

v6-n2n-prototype's Introduction

algorithm-container-network

Experimental setup for peer-to-peer network for algorithm containers with port forwarding

port forwarding diagram

The mechanisms described below are partly automated in the script configure_network.py.

How to run

docker-compose up -d

Notes

Additional configuration

Blocking internet on vpn client container

Blocking internet for vpn clients (this will run automatically on vpn client):

iptables -F FORWARD
iptables -P FORWARD DROP
iptables -A FORWARD -i tun+ -o eth1 -j ACCEPT
iptables -A FORWARD -i eth1 -o tun+ -j ACCEPT

Default namespace configuration

The bridge networks of the docker containers are linked to network interfaces in the default network namespace of the host (but by a different name).

On docker host, configure exception to docker bridge network isolation:

iptables -I DOCKER-USER 1 -d $vpn_subnet -i $isolated_bridge -j ACCEPT
iptables -I DOCKER-USER 1 -s $vpn_subnet -o $isolated_bridge -j ACCEPT
docker run --network container:$ISOLATED_CONTAINER --cap-add=NET_ADMIN alpine ip route replace default via 172.16.238.2

Forward traffic from vpn client to algorithm container. Configure on vpn client per algorithm: TODO: make rule as specific as possible

iptables -t nat -A PREROUTING -i tun0 -p tcp \
  --dport $vpn_client_port -j DNAT --to $isolated_algorithm_ip:$algorithm_port

Openvpn server requirements

  • blockLan = false
  • clientToClient = true

References

v6-n2n-prototype's People

Contributors

dsmits avatar

Watchers

 avatar James Cloos avatar Robin Richardson avatar Sven van der Burg avatar Lourens Veen avatar

v6-n2n-prototype's Issues

Port mapper

  • Fixed port for algorithm
  • port mapper picks vpn client port
  • send algorithm to v6 server

Open questions

  • When should a VPN certificate be provided to a node. Does this happen outside or inside vantage6?

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.