mailcow-dockerized-docs/docs/firststeps-disable_ipv6.md

68 Zeilen
1,9 KiB
Markdown

2019-12-02 12:26:10 +01:00
This is **ONLY** recommended if you do not have an IPv6 enabled network on your host!
2018-07-25 09:29:13 +02:00
2020-03-06 12:41:13 +01:00
If you really need to, you can disable the usage of IPv6 in the compose file.
2020-03-05 20:39:34 +01:00
Additionally, you can also disable the startup of container "ipv6nat-mailcow", as it's not needed if you won't use IPv6.
2018-07-25 09:29:13 +02:00
2020-04-21 23:34:34 +02:00
Instead of editing docker-compose.yml directly, it is preferable to create an override file for it
2020-03-06 12:41:13 +01:00
and implement your changes to the service there. Unfortunately, this right now only seems to work for services, not for network settings.
2018-07-25 09:29:13 +02:00
2020-03-06 12:41:13 +01:00
To disable IPv6 on the mailcow network, open docker-compose.yml with your favourite text editor and search for the network section (it's near the bottom of the file).
2020-03-06 17:56:25 +01:00
2020-04-10 21:45:13 +02:00
**1.** Modify docker-compose.yml
2020-03-06 17:56:25 +01:00
Change `enable_ipv6: true` to `enable_ipv6: false`:
2020-03-06 12:41:13 +01:00
```
networks:
mailcow-network:
2020-03-14 10:53:40 +01:00
[...]
enable_ipv6: true # <<< set to false
[...]
2020-03-06 12:41:13 +01:00
```
2020-04-10 21:45:13 +02:00
**2.** Disable ipv6nat-mailcow
2020-03-06 12:41:13 +01:00
To disable the ipv6nat-mailcow container as well, go to your mailcow directory and create a new file called "docker-compose.override.yml":
2020-03-06 12:51:22 +01:00
**NOTE:** If you already have an override file, of course don't recreate it, but merge the lines below into your existing one accordingly!
2020-03-06 17:56:25 +01:00
2018-07-25 09:29:13 +02:00
```
2020-03-05 20:39:34 +01:00
# cd /opt/mailcow-dockerized
# touch docker-compose.override.yml
2018-07-25 09:29:13 +02:00
```
2020-03-06 17:56:25 +01:00
2020-03-05 20:39:34 +01:00
Open the file in your favourite text editor and fill in the following:
```
version: '2.1'
services:
2018-07-25 09:29:13 +02:00
2020-03-05 20:39:34 +01:00
ipv6nat-mailcow:
restart: "no"
2020-03-06 12:51:22 +01:00
entrypoint: ["echo", "ipv6nat disabled in compose.override.yml"]
2020-03-05 20:39:34 +01:00
```
2020-03-06 17:56:25 +01:00
2020-03-05 20:39:34 +01:00
For these changes to be effective, you need to fully stop and then restart the stack, so containers and networks are recreated:
2020-03-06 17:56:25 +01:00
2018-07-25 09:29:13 +02:00
```
docker-compose down
docker-compose up -d
```
2020-04-10 21:45:13 +02:00
**3.** Disable IPv6 in unbound-mailcow
Edit `data/conf/unbound/unbound.conf` and set `do-ip6` to "no":
```
server:
2020-04-10 21:45:57 +02:00
[...]
2020-04-10 21:45:13 +02:00
do-ip6: no
2020-04-10 21:45:57 +02:00
[...]
2020-04-10 21:45:13 +02:00
```
Restart Unbound:
```
docker-compose restart unbound-mailcow
```