-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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 support #844
base: master
Are you sure you want to change the base?
IPv6 support #844
Conversation
b7cf268
to
d62111d
Compare
You are running NAT6 in one direction, but I can't see |
Yes, it uses the userland proxy for incoming traffic, and it uses NAT6 for outgoing traffic. As of a few minutes ago I am running this setup on glitch.im, so you see it working when you see @peetz0r:glitch.im talking anywhere. |
Last time I tried this, the nginx/coturn logs from IPv6 users and federated servers contained nothing but the userland proxy address, which is the same as the gateway. Is it still like that? |
Correct, they all get reported as |
Also I did some more testing, and it's still not fully working. When I go inside a container I can reach only v4 servers on the internet somehow. This worked earlier and I have no clue what I am doing... |
That's kind of a bummer |
Type=oneshot | ||
Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||
|
||
ExecStart=ip6tables -t nat -A POSTROUTING -s fd00::/80 ! -o docker0 -j MASQUERADE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ExecStart=ip6tables -t nat -A POSTROUTING -s fd00::/80 ! -o docker0 -j MASQUERADE | |
ExecStart={{ matrix_host_command_sh }} -c "ip6tables -t nat -A POSTROUTING -s fd00::/80 ! -o docker0 -j MASQUERADE" |
Changing this made it work for me. I don't know if this is the right solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That'd be unnecessary shell invocation. It works, but it's not the best. Something involving an absolute path to env
is probably the right solution. And I also forgot the second import ip6tables
rule in there.
Like I said, this needs more testing before it's ready :p
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is recommended to put absolute paths into ExecStart=, in this case that would be /usr/sbin/ip6tables
@aaronraimist your ip6tables rules should now work.
This should also be fixed now |
I might spend some time next week on trying out https://github.com/robbertkl/docker-ipv6nat to fix this. No guarantees, obviously. |
Is there anything else that needs to happen here to merge this? It's been working for me. Seems like using https://github.com/robbertkl/docker-ipv6nat could happen in the future. |
I was wondering if we need to install |
Could we move this forward? |
I guess I'm not gonna do the proper fix for the "everything is Having IPv6 disabled by default doesn't sit well with me, but having this PR sitting dormant for months is definitely worse. Lemme mark as non-a-draft-anymore and get it into a state without conflicts. |
Works for all containers Major downside is that all ipv6 adresses are logged as fd00::1
Required in ipv6-only setups. The default docker network is ipv4-only, so validation would fail. Our own network has ipv6 (if enabled) so that works fine.
bed6253
to
2d04d1e
Compare
daemon_reload: yes | ||
when: "matrix_ip6tables_systemd_service_result.changed" | ||
|
||
- name: Ensure matrix-ip6tables.service is started and autoruns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably inject this into matrix_systemd_services_list
and start it as part of --tags=start
.
On the other hand, maybe that makes it start too late? We probably wish to have working IPv6 connectivity for the purposes of obtaining SSL certificates, for example..? Is that why this is here?
Any news about this topic? I added this part into my vars.yaml to most likely only have to set enable ipv6 for the network creation part. But i'm not sure which dockernetworks need it and if it will work.
|
I used ipv6nat to make the server work on my IPv6 VPS. According to my practice, the federation function works well. For more details, please refer to my repo ipv6 support. |
matrix_docker_ipv6_enabled
is true by default. I think IPv6 should be everywhere by now.Nginx now always listens on ipv6.
When the setting is true, the
matrix_docker_network
gets created with ipv6 enabled. Because we are basically doing NATv6 between the host and the containers there is a service that sets up the ip6tables rule.I also moved the
matrix-certbot
into thematrix_docker_network
because in my ipv6-only tests it couldn't validate in the defaultbridge
network.