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

support default Dynamic IPv6 subnet allocation and ip6tables #3637

Open
finch71 opened this issue Nov 2, 2024 · 3 comments
Open

support default Dynamic IPv6 subnet allocation and ip6tables #3637

finch71 opened this issue Nov 2, 2024 · 3 comments
Labels

Comments

@finch71
Copy link

finch71 commented Nov 2, 2024

What is the problem you're trying to solve

nerdctl doesn't listen on ipv6 by default

Describe the solution you'd like

https://docs.docker.com/engine/daemon/ipv6/

Additional context

#127

@finch71
Copy link
Author

finch71 commented Nov 2, 2024

At the moment it requires user to configure every network one by one. and it doesn't support configuring ip6tables

cat >/etc/cni/net.d/10-mynet.conf
{
        "cniVersion": "0.2.0",
        "name": "mynet",
        "type": "bridge",
        "bridge": "cni0", 
        "ipam": {
                "type": "host-local",
                "subnet": "2001:db8::/96",
                "routes": [
                        { "dst": "::/0" },
                        { "dst": "2001:db8::/96" }
                ]
        }
}


./nerdctl --snapshotter native run --network mynet  -d -p 80:80  alpine  sleep 300

./nerdctl ps
CONTAINER ID    IMAGE                              COMMAND        CREATED               STATUS    PORTS                                NAMES
7e31884d8ba0    docker.io/library/alpine:latest    "sleep 300"    About a minute ago    Up        0.0.0.0:80->80/tcp, :::80->80/tcp    

@Zheaoli
Copy link
Member

Zheaoli commented Nov 7, 2024

For now, the nerdctl has already support IPV6, I'm not sure what behavior is you want. Would you mind provide more detail about this?

@Zheaoli Zheaoli added enhancement New feature or request area/network labels Nov 7, 2024
@finch71
Copy link
Author

finch71 commented Nov 8, 2024

In docker if I set
{ "ipv6": true, "ip6tables":true, "fixed-cidr-v6": "2001:db8:1::/64" }

ipv6 will enable IPv6 networking on all the default networks and it will automatically assign ip address without configure every .yml file

similarly, ip6tables adds additional IPv6 packet filter rules to iptables automatically (so that one can further configure rules for every pod)

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

No branches or pull requests

2 participants