diff --git a/README.md b/README.md index 1ad4e2c..8522c6a 100644 --- a/README.md +++ b/README.md @@ -17,4 +17,25 @@ Install python dependencies : poetry install ``` -### Docker \ No newline at end of file +### 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: + +```bash +ip route add via +``` + +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. diff --git a/docker-compose.yml b/docker-compose.yml index 7c8cf71..7e3d92a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,6 +23,8 @@ services: - LISTEN_PORT=51820 cap_add: - NET_ADMIN + sysctls: + net.ipv4.ip_forward: 1 networks: net1: ipv4_address: 172.20.1.11 @@ -59,4 +61,4 @@ networks: internet: ipam: config: - - subnet: 172.20.0.0/24 \ No newline at end of file + - subnet: 172.20.0.0/24