Doesn't work with IPV6 #8
Comments
|
Sorry, I haven't tried IPv6 in Docker. This weekend I tried to set up a local IPv6 network by using VirtualBox, but not successful. I checked our servers and found the IPv6 address of From the document IPv6 with Docker | Docker Documentation we can see that the IPv6 address of So sorry, I cannot help you now. But I would like to try IPv6 when I have time. If you have any updates please let me know, thanks! |
|
@chaifeng thank you for your timely response. I took a look at the documentation you mentioned and made the changes that they describe. It now looks like the docker0 interface has two versions of an IPv6 address. I will admit i'm pretty new to firewalls and very new to ufw so i'm not even sure what the best way to debug this would be. I don't really need IPV6 container support and I think it would be better to have the IPV6 requests to my server to be forwarded as IPV4, but i'm not sure how to do that. The reason I found this issue was because I was unable to access my website from my phone when not connected to WIFI. My LTE connection has an IPV6 address which makes my site unreachable. ifconfig: I have updated my after6.rules to reflect the new address: I enabled ufw logging and I can still see the request being blocked. The DST is my servers public IPV6 address. |
|
Does block unwanted traffic if the client is ipv6? |
|
@Fazel94 No, currently it doesn't support IPv6. But the method is similar. For the following code, you need to replace I don't have an IPv6 network environment for now, and I also not very familiar with IPv6, just used somewhere. BTW, if you don't care about the IPv6, disable it for your servers. If you care about it, disable IPv6 for docker, setting up a web reverse proxy and forward the IPv6 traffic to the Docker containers, it's an easier way. |
That helped me. But i also had to change ufw-user-forward to ufw6-user-forward: |
|
@chaifeng , my interest in the issue is about security, I propose you add it to README.md that the solution wouldn't block unwanted traffic in IPv6. I and several people I know faced security problems due to bad workings of UFW and docker on IPv4. |
/etc/ufw/after.rules/etc/ufw/after6.rules |


So I took a shot at trying to get this to work with IP V6 addresses with no luck. If I disable the ufw service i'm able to access my site using the V6 address, but when I enable ufw the connection times out. I found /etc/ufw/after6.rules and tried to modify it to work, but I must be doing something wrong. My guess is it's something with the V6 subnet.
Here is my ifconfig:
ufw status
The text was updated successfully, but these errors were encountered: