Giter VIP home page Giter VIP logo

implexus's Introduction

implexus

Purpose

This is a Python script to automate the generation of interface configs for multi-peer WireGuard mesh networks. The peers are all listed in an 'outline' (config file in YAML format) passed to the script. See the sample_config.yaml for format layout. The NetworkName will end up being the network interface name. The Address IPs are according to your chosen virtual 'LAN'. You can have multiple mesh networks spanning the same or different devices, as long as the names and IP ranges don't conflict.

Only specify Endpoint and ListenPort for peers that have a fixed public IP (even via dynamic DNS) and port (via NAT port forwarding). You need at least one such peer to act as a hub (= relay/bouncer), in which case also indicate AllowedIPs for that peer with the /24 suffix, which will make it accept packets destined to the whole subnet. Only have one such peer per network (= interface), though you don't need one at all. You can have only point-to-point connections: as long as a peer has a public IP and port, all the others should be able to connect to it, but won't be able to connect to other 'dynamic' peers without a hub/router/relay/bouncer.

The script requires the WireGuard wg binary to generate the private/public key-pairs for each device regenerated on each execution - so do it right before deploying to all your device ;-). The script has only been tested under Linux. It will output the interface.conf file for each device/peer, as well as a couple of bash scripts: one for automating the install/deploy of the device; the other for removing it. All that needs to be done is to copy the files to the corresponding peer/device and to execute (as root) the deploy_device.sh script - again, only under Linux, and requires systemd. If your device is running a different OS, import the corresponding interface.conf file into your WireGuard client.

As the deploy script indicates, you may also have to tweak your firewall to allow the UDP connections to get through to your device.


Command-line usage

python3 implexus.py [-h] [-v] [-o directory] Outline

positional arguments:
  Outline        Network outline (YAML format)

options:
  -h, --help     show this help message and exit
  -v, --version  show program's version number and exit
  -o directory   Output directory (working dir if not provided)

Feedback

Feel free to get in touch and post any issues and suggestions.

RSS of releases

My other mesh-networking project: nebulder

implexus's People

Contributors

erykjj avatar

Stargazers

 avatar

Watchers

 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.