kopia lustrzana https://github.com/linuxserver/docker-documentation
Bot Updating Documentation
rodzic
3a7850a816
commit
9b85d49418
|
@ -51,9 +51,10 @@ If you're on a debian/ubuntu based host with a custom or downstream distro provi
|
||||||
|
|
||||||
With regards to arm32/64 devices, Raspberry Pi 2-4 running the [official ubuntu images](https://ubuntu.com/download/raspberry-pi) or Raspbian Buster are supported out of the box. For all other devices and OSes, you can try installing the kernel headers on the host, and mapping `/usr/src:/usr/src` and it may just work (no guarantees).
|
With regards to arm32/64 devices, Raspberry Pi 2-4 running the [official ubuntu images](https://ubuntu.com/download/raspberry-pi) or Raspbian Buster are supported out of the box. For all other devices and OSes, you can try installing the kernel headers on the host, and mapping `/usr/src:/usr/src` and it may just work (no guarantees).
|
||||||
|
|
||||||
This can be run as a server or a client, based on the parameters used.
|
This can be run as a server or a client, based on the parameters used.
|
||||||
|
|
||||||
## Server Mode
|
## Server Mode
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
@ -65,11 +66,13 @@ To display the QR codes of active peers again, you can use the following command
|
||||||
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.
|
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.
|
||||||
|
|
||||||
## Client Mode
|
## Client Mode
|
||||||
Do not set the `PEERS` environment variable. Drop your client conf into the config folder as `/config/wg0.conf` and start the container.
|
|
||||||
|
Do not set the `PEERS` environment variable. Drop your client conf into the config folder as `/config/wg0.conf` and start the container.
|
||||||
|
|
||||||
If you get IPv6 related errors in the log and connection cannot be established, edit the `AllowedIPs` line in your peer/client wg0.conf to include only `0.0.0.0/0` and not `::/0`; and restart the container.
|
If you get IPv6 related errors in the log and connection cannot be established, edit the `AllowedIPs` line in your peer/client wg0.conf to include only `0.0.0.0/0` and not `::/0`; and restart the container.
|
||||||
|
|
||||||
## Road warriors, roaming and returning home
|
## Road warriors, roaming and returning home
|
||||||
|
|
||||||
If you plan to use Wireguard both remotely and locally, say on your mobile phone, you will need to consider routing. Most firewalls will not route ports forwarded on your WAN interface correctly to the LAN out of the box. This means that when you return home, even though you can see the Wireguard server, the return packets will probably get lost.
|
If you plan to use Wireguard both remotely and locally, say on your mobile phone, you will need to consider routing. Most firewalls will not route ports forwarded on your WAN interface correctly to the LAN out of the box. This means that when you return home, even though you can see the Wireguard server, the return packets will probably get lost.
|
||||||
|
|
||||||
This is not a Wireguard specific issue and the two generally accepted solutions are NAT reflection (setting your edge router/firewall up in such a way as it translates internal packets correctly) or split horizon DNS (setting your internal DNS to return the private rather than public IP when connecting locally).
|
This is not a Wireguard specific issue and the two generally accepted solutions are NAT reflection (setting your edge router/firewall up in such a way as it translates internal packets correctly) or split horizon DNS (setting your internal DNS to return the private rather than public IP when connecting locally).
|
||||||
|
@ -82,7 +85,7 @@ Both of these approaches have positives and negatives however their setup is out
|
||||||
|
|
||||||
When routing via Wireguard from another container using the `service` option in docker, you might lose access to the containers webUI locally. To avoid this, exclude the docker subnet from being routed via Wireguard by modifying your `wg0.conf` like so (modifying the subnets as you require):
|
When routing via Wireguard from another container using the `service` option in docker, you might lose access to the containers webUI locally. To avoid this, exclude the docker subnet from being routed via Wireguard by modifying your `wg0.conf` like so (modifying the subnets as you require):
|
||||||
|
|
||||||
```
|
```ini
|
||||||
[Interface]
|
[Interface]
|
||||||
PrivateKey = <private key>
|
PrivateKey = <private key>
|
||||||
Address = 9.8.7.6/32
|
Address = 9.8.7.6/32
|
||||||
|
@ -134,7 +137,7 @@ services:
|
||||||
- LOG_CONFS=true #optional
|
- LOG_CONFS=true #optional
|
||||||
volumes:
|
volumes:
|
||||||
- /path/to/appdata/config:/config
|
- /path/to/appdata/config:/config
|
||||||
- /lib/modules:/lib/modules
|
- /lib/modules:/lib/modules #optional
|
||||||
ports:
|
ports:
|
||||||
- 51820:51820/udp
|
- 51820:51820/udp
|
||||||
sysctls:
|
sysctls:
|
||||||
|
@ -161,7 +164,7 @@ docker run -d \
|
||||||
-e LOG_CONFS=true `#optional` \
|
-e LOG_CONFS=true `#optional` \
|
||||||
-p 51820:51820/udp \
|
-p 51820:51820/udp \
|
||||||
-v /path/to/appdata/config:/config \
|
-v /path/to/appdata/config:/config \
|
||||||
-v /lib/modules:/lib/modules \
|
-v /lib/modules:/lib/modules `#optional` \
|
||||||
--sysctl="net.ipv4.conf.all.src_valid_mark=1" \
|
--sysctl="net.ipv4.conf.all.src_valid_mark=1" \
|
||||||
--restart unless-stopped \
|
--restart unless-stopped \
|
||||||
lscr.io/linuxserver/wireguard:latest
|
lscr.io/linuxserver/wireguard:latest
|
||||||
|
@ -197,7 +200,7 @@ Docker images are configured using parameters passed at runtime (such as those a
|
||||||
| Volume | Function |
|
| Volume | Function |
|
||||||
| :----: | --- |
|
| :----: | --- |
|
||||||
| `/config` | Contains all relevant configuration files. |
|
| `/config` | Contains all relevant configuration files. |
|
||||||
| `/lib/modules` | Maps host's modules folder. |
|
| `/lib/modules` | Maps host's modules folder. Only required if compiling wireguard modules. |
|
||||||
|
|
||||||
#### Miscellaneous Options
|
#### Miscellaneous Options
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue