You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -129,9 +131,10 @@ Container images are configured using parameters passed at runtime (such as thos
129
131
|`-e TZ=Europe/London`| Specify a timezone to use EG Europe/London |
130
132
|`-e SERVERURL=wireguard.domain.com`| External IP or domain name for docker host. Used in server mode. If set to `auto`, the container will try to determine and set the external IP automatically |
131
133
|`-e SERVERPORT=51820`| External port for docker host. Used in server mode. |
132
-
|`-e PEERS=1`| Number of peers to create confs for. Required for server mode. |
134
+
|`-e PEERS=1`| Number of peers to create confs for. Required for server mode. Can be a list of names too: myPC,myPhone,myTablet... |
133
135
|`-e PEERDNS=auto`| DNS server set in peer/client configs (can be set as `8.8.8.8`). Used in server mode. Defaults to `auto`, which uses wireguard docker host's DNS via included CoreDNS forward. |
134
136
|`-e INTERNAL_SUBNET=10.13.13.0`| Internal subnet for the wireguard and server and peers (only change if it clashes). Used in server mode. |
137
+
|`-e ALLOWEDIPS=192.168.1.0/24,192.168.2.0/24`| The IPs/Ranges that the peers will be able to reach using the VPN connection. If not specified the default value is: '0.0.0.0/0, ::0/0' |
135
138
|`-v /config`| Contains all relevant configuration files. |
136
139
|`-v /lib/modules`| Maps host's modules folder. |
137
140
|`--sysctl=`| Required for client mode. |
@@ -179,13 +182,13 @@ With regards to arm32/64 devices, Raspberry Pi 2-4 running the [official ubuntu
179
182
This can be run as a server or a client, based on the parameters used.
180
183
181
184
## Server Mode
182
-
If the environment variable `PEERS` is set to a number, the container will run in server mode and the necessary server and peer/client confs will be generated. The peer/client config qr codes will be output in the docker log. They will also be saved in text and png format under `/config/peerX`.
185
+
If the environment variable `PEERS` is set to a number or a list of strings separated by comma, the container will run in server mode and the necessary server and peer/client confs will be generated. The peer/client config qr codes will be output in the docker log. They will also be saved in text and png format under `/config/peerX` in case `PEERS` is a variable and an integer or `/config/peer_X` in case a list of names was provided instead of an integer.
183
186
184
187
Variables `SERVERURL`, `SERVERPORT`, `INTERNAL_SUBNET` and `PEERDNS` are optional variables used for server mode. Any changes to these environment variables will trigger regeneration of server and peer confs. Peer/client confs will be recreated with existing private/public keys. Delete the peer folders for the keys to be recreated along with the confs.
185
188
186
-
To add more peers/clients later on, you increment the `PEERS` environment variable and recreate the container.
189
+
To add more peers/clients later on, you increment the `PEERS` environment variable or add more elements to the list and recreate the container.
187
190
188
-
To display the QR codes of active peers again, you can use the following command and list the peer numbers as arguments: `docker exec -it wireguard /app/show-peer 1 4 5` (Keep in mind that the QR codes are also stored as PNGs in the config folder).
191
+
To display the QR codes of active peers again, you can use the following command and list the peer numbers as arguments: `docker exec -it wireguard /app/show-peer 1 4 5`or `docker exec -it wireguard /app/show-peer myPC myPhone myTablet`(Keep in mind that the QR codes are also stored as PNGs in the config folder).
189
192
190
193
The templates used for server and peer confs are saved under `/config/templates`. Advanced users can modify these templates and force conf generation by deleting `/config/wg0.conf` and restarting the container.
191
194
@@ -288,6 +291,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
288
291
289
292
## Versions
290
293
294
+
***04.10.20:** - Allow to specify a list of names as PEERS and add ALLOWEDIPS environment variable. Also, add peer name/id to each one of the peer sections in wg0.conf. Important: Existing users need to delete `/config/templates/peer.conf` and restart
291
295
***27.09.20:** - Cleaning service binding example to have accurate PreDown script.
292
296
***06.08.20:** - Replace resolvconf with openresolv due to dns issues when a client based on this image is connected to a server also based on this image. Add IPv6 info to readme. Display kernel version in logs.
293
297
***29.07.20:** - Update Coredns config to detect dns loops (existing users need to delete `/config/coredns/Corefile` and restart).
0 commit comments