Skip to content

IPv6 not supported #149

Closed
Closed
@epelaez1

Description

@epelaez1

Describe the bug

  • Seems like IPv6 is not supported.
  • Versions used: Latests

To Reproduce
Steps to reproduce the behavior:

  1. Enable IPv6 for docker:
  • Create a network at docker with the following command:
    $ docker network create --subnet 2a02::/80 --ipv6 network_name
    Replace 2a02:: with the IPv6 block given by your ISP, or, in case you don't have IPv6 support use a block reserved for NAT, (for example: fe80:10::/80). I will use 2a02:10::/80 in this example.
  1. Create the dockers:
  • Create the docker of mariadb inside that network:
    $ docker pull mariadb
    $ docker create --name=mariadb -e MYSQL_ROOT_PASSWORD=your_password -v ~/docker_data/mariadb:/var/lib/mysql --network network_name --ip6 2a02:10::10 mariadb
    $ docker start mariadb
  • Create a database called nginx:
    $ docker run -it --network network_name --rm mariadb mysql -hmariadb -uroot -p
    Enter your password
    MariaDB [(none)]> CREATE DATABASE nginx;
  • Edit the config.json file.
  • Create the nginx proxy manager docker:
    $ docker pull jc21/nginx-proxy-manager:latest
    $ docker create --name=reverse_proxy --restart unless-stopped -v ~/docker_data/proxy/config.json:/app/config/production.json -v ~/docker_data/proxy/data:/data -v ~/docker_data/proxy/letsencrypt:/etc/letsencrypt --network network_name --ip6 2a02:10::11 jc21/nginx-proxy-manager
    $ docker start reverse_proxy
  1. Everything should work until this point.

  2. Access the web ui with Google Chrome using the IPv6 address of the docker.
    http://[2a02:10::11]:81

  3. Try to login with [email protected] and changeme as credentials.
    The web responds with an Internal Error. And if you check the logs of the docker you should see the following message:
    [Express ] › ⚠ warning data should match pattern "^[a-z\-]+:\/\/(?:[\w\-\.]+(:[0-9]+)?/?)?$"

  4. Now restart the docker:
    $ docker stop reverse_proxy
    $ docker start reverse_proxy
    And now the following error apears:
    [emerg] 320#320: invalid port in resolver "fe80::something%2" in /etc/nginx/conf.d/include/resolvers.conf:1 nginx: [emerg] invalid port in resolver "fe80::something%2" in /etc/nginx/conf.d/include/resolvers.conf:1
    Beeing fe80::something the local IPv6 of the docker created before.

Operating System

  • Ubuntu Server

Important comments about IPv6
In order to get access from outside the host you probably need to run the following commands:

(Replace eth0 with your network adapter name (see ifconfig))
(Replace 2a02:10::11 with the address used for the container)
$ sysctl net.ipv6.conf.eth0.accept_ra=2
$ sysctl net.ipv6.conf.eth0.proxy_ndp=1
$ ip -6 neigh add proxy 2a02:10::11 dev eth0

If you are using a local IPv6 block (fe80::/80) you don't need this commands.

I know that IPv6 is not an easy thing to work with but I hope you can fix this bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions