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.
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:
```bash
ip route add <translatedremotenetwork> via <containerip>
```
Finally, run on the host
```bash
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.