config | ||
docker | ||
templates | ||
.dockerignore | ||
.gitignore | ||
dns.py | ||
docker-compose.yml | ||
LICENSE | ||
load.py | ||
poetry.lock | ||
pyproject.toml | ||
README.md |
PolyculeNetwork
PolyculeNetwork is a drop-in solution for infrastructure mutualisation, when subnets to mutualize use the same ip ranges. It is based on nftables, wireguard and python.
Installation
Dedicated VM/LXC/server (recommended)
Install dependencies:
# Debian
apt install python3-poetry wireguard nftables
Install python dependencies :
poetry install
Docker
On the host, you'll need docker
and docker-compose-plugin
.
Clone this repo, edit the docker-compose.yml
file to suit your needs, and set config/config.toml
to reflect you infrastructure.
You will need to create an empty config/dnnsmasq.conf
for the first launch (it will be generated by the main container, but the file needs to exist).
Launch docker compose
, get the ip address of the polyculenetwork container, and set manual routes via this ip:
ip route add <translated remote network> via <container ip>
Finally, run on the host
sysctl -w net.ipv4.ip_forward
iptables -A FORWARD -j ACCEPT
You will need to run these commands after each restart of the host machine.