Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] IPv6 support #1753

Open
blixten85 opened this issue Apr 19, 2024 · 1 comment
Open

[Feature Request] IPv6 support #1753

blixten85 opened this issue Apr 19, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@blixten85
Copy link

Feature request

IPv6 support

Describe the solution you'd like
IPv6 support added in the network config for docker.
It shouldn't require much to implement. Perhaps a question popped during install if ipv6 support is desired, or within the ds application.

@blixten85 blixten85 added the enhancement New feature or request label Apr 19, 2024
@blixten85
Copy link
Author

blixten85 commented May 13, 2024

For those who want to add this meanwhile we wait

sudo nano /etc/docker/daemon.json

{
  "ipv6": true,
  "fixed-cidr-v6": "fd00::/64",
  "experimental": true,
  "ip6tables": true,
  "default-address-pools": [
    { "base": "172.17.0.0/16", "size": 16 },
    { "base": "172.18.0.0/16", "size": 16 },
    { "base": "172.19.0.0/16", "size": 16 },
    { "base": "172.20.0.0/14", "size": 16 },
    { "base": "172.24.0.0/14", "size": 16 },
    { "base": "172.28.0.0/14", "size": 16 },
    { "base": "192.168.0.0/16", "size": 20 },
    { "base": "fd00::/104", "size": 112 }
  ]
}

nano ~/.docker/compose/docker-compose.override.yml

networks:
  default:
    name: compose_default
    enable_ipv6: true
    ipam:
      driver: default
      config:
        - subnet: 172.18.0.0/16
          gateway: 172.18.0.1
        - subnet: fd01::/64
          gateway: fd01::1

ds -c down
sudo reboot
ds -c down
ds -c p
ds -c up

These commands, in this order should do the trick.
The reason why you want to reboot is because the network might still be in use and not fully shutdown, after the reboot is done make sure the compose_default network is down with ds -c down and then ds -c p to prune all the containers including the network.
Rebuild everything and bring it back up again with the ds -c up command.

Add the following to the container you want ipv6 to be working for.
This goes into ~/.docker/compose/docker-compose.override.yml file.

    sysctls:
      - net.ipv6.conf.all.disable_ipv6=0
      - net.ipv6.conf.eth0.proxy_ndp=1

i.e (full copy off my gluetun container with network added)

services:
  gluetun:
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    ports:
     - ${QBITTORRENT_PORT_51413}:51413
     - ${QBITTORRENT_PORT_51413}:51413/udp
     - ${QBITTORRENT_PORT_6881}:6881
     - ${QBITTORRENT_PORT_6881}:6881/udp
     - ${QBITTORRENT_PORT_8080}:8080
     - ${AUTOBRR_PORT_7474}:7474
    environment:
      - VPN_SERVICE_PROVIDER=custom
      - VPN_TYPE=wireguard
      - OPENVPN_USER=username
      - OPENVPN_PASSWORD=password
      - OPENVPN_CUSTOM_CONFIG=/config/wg0.conf
      - DOT=on
      - BLOCK_ADS=on
      - BLOCK_MALICIOUS=on
      - BLOCK_SURVEILLANCE=on
      - VPN_ENDPOINT_IP=94.254.51.197
      - VPN_ENDPOINT_PORT=48575
      - WIREGUARD_PUBLIC_KEY=public_hash_key
      - WIREGUARD_PRIVATE_KEY=private_hash_key
      - WIREGUARD_PRESHARED_KEY=
      - WIREGUARD_ADDRESSES=10.0.66.115/24,fdab:1337:1337:66::115/64
      - WIREGUARD_ALLOWED_IPS=0.0.0.0/0,::/0
    sysctls:
      - net.ipv6.conf.all.disable_ipv6=0
      - net.ipv6.conf.eth0.proxy_ndp=1

networks:
  default:
    name: compose_default
    enable_ipv6: true
    ipam:
      driver: default
      config:
        - subnet: 172.18.0.0/16
          gateway: 172.18.0.1
        - subnet: fd01::/64
          gateway: fd01::1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant