-
-
Notifications
You must be signed in to change notification settings - Fork 628
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
IPv6 Configuration #45
Comments
Try to add the following to your compose file on the proxy container: environment:
ENABLE_IPV6: true And set up your ipv6 address in .env file as well. |
Looks like true needs to be in quotes
like so
|
Working great once I added the I was able to verify Nginx now successfully responds to IPv6 from one of the IPv6 test sites. Would be great if you can add this to the existing repo. |
I will add later on today. Thanks for sharing! |
If you could send a PR I will be glad to push it. But if not I will look into that in the next coming weeks. |
@evertramos PR created: #48 |
@evertramos The reason I didn't get an error when using following is because I had added the environment variable to
When I added to
|
@evertramos Adding
I believe a true IPv6 implementation is only possible using v2 Docker Compose and enabling IPv6 under My implementation doesn't enable IPv6 in Docker containers. It is only forwarding host IPv6 requests to nginx-web container. It works but has a flaw. IPv6 requests in nginx-web will be seen as coming from the Docker gateway, in my case its It may be better to have a separate |
@j7an Thank you very much for your help! I think you are right. As far as I could test on my side I could not get it to run with IPv6 as well, reason why I have not merged yet. But as soon as we get the new version we can arrange that. If you want to contribute to that please send pull request with full implementation when it´s ready and I will be glad to test it and merge. Best regards, |
@evertramos Pls close PR for now. Thanks. |
I was able to create IPv6 network by modifying network creation command from start.sh like:
I guess we can check if $IPv6 in .env and put it there like:
until docker-compose v 3 will support enable_ipv6 |
@evertramos There's might be a solution to IPv6 via example code here: traefik/traefik#977 (comment) I'll have to play around with the repo and see how well it performs. |
Hello @j7an! Traefik... I have started to study... but still could not get an automtion as we have today with @jwilder contianers... but it seems to be a good point. I will keep track of it and if you get some automation as we do have now let me know, I have very much interest on that. Also to comply with swarm as well. Thanks for you message I will give a try in a few weeks. |
Hi @evertramos, I'm referring to docker-ipv6nat mentioned in the linked comment. Since Traefik is very similar to your repo, I think your project might work with docker-ipv6nat as well. The example code the commenter posted is a good starting point to getting IPv6 working for your project. |
@j7an I see actually I cloned the repo and check a few things... and might work along, you are right. I am in another project for the moment, but as soon as I finish it I will come back to this subject. Thanks again! Did you get it working? If you do, you are welcome to do a PR we will get a new branch ipv6 for that! |
@evertramos I will look into it on my end and will get back to you with my findings. Swarm is nice. I've been reading Traefik documentation. Although they never specified how DNS A/AAAA records should be configured with their load balancer. Their doc did specify that their load balancer needs to be installed into the Swarm managers. So it might be possible to implement Swarm for High Availability with @jwilder Nginx container installed same way. I've asked my own question on Swarm DNS here. Apparently DNS records need to point to all Swarm managers for load balancing. Using Cloudflare API will allow a Swarm manager's IP be removed from DNS if it fails for DNS Round Robin Failover. Thanks. |
@evertramos @MardariG I have promising results. Modified start.sh with following
Having the ipv6nat container started in the docker-compose.yml doesn't enable IPv6 or provide IPv6 addresses to the other containers. I also modified the ports in docker-compose.yml as docker was complaining about the IPv6 address format to the following:
When ipv6nat is started before webproxy is created, running
I can do a PR for start.sh but @evertramos I'll need your help in looking into IPv6 configuration in .env and docker-compose.yml files. Although Traefik configuration from the commenter I referenced earlier only specified port numbers. |
I will check and reply! Thanks!!! Give me a couple weeks ok? =) |
Can someone please tell me why is NAT being used here for IPv6? @j7an There are cases when people have /56 blocks, and my default docker bridge has a /60 prefix allocated to it as I have set it so. |
@samip5 It's mainly for logging/diagnostic purposes when a visitor to your server uses IPv6. If the Docker containers only support IPv4 then |
@j7an You mean like so?
|
@samip5 Correct. |
It looks like the .env only support IPv4 addresses. By default does the .env file support IPv6 as well? If so, what is the configuration format or example to enable IPv6 for Nginx?
The text was updated successfully, but these errors were encountered: