{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/2174","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/2174/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/2174/comments","events_url":"https://api.github.com/repos/docker/docker/issues/2174/events","html_url":"https://github.com/docker/docker/issues/2174","id":20869041,"number":2174,"title":"Port redirecting binding to IPv6 but not IPv4 interfaces.","user":{"login":"marklit","id":359316,"avatar_url":"https://avatars.githubusercontent.com/u/359316?v=3","gravatar_id":"","url":"https://api.github.com/users/marklit","html_url":"https://github.com/marklit","followers_url":"https://api.github.com/users/marklit/followers","following_url":"https://api.github.com/users/marklit/following{/other_user}","gists_url":"https://api.github.com/users/marklit/gists{/gist_id}","starred_url":"https://api.github.com/users/marklit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marklit/subscriptions","organizations_url":"https://api.github.com/users/marklit/orgs","repos_url":"https://api.github.com/users/marklit/repos","events_url":"https://api.github.com/users/marklit/events{/privacy}","received_events_url":"https://api.github.com/users/marklit/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/area/networking","name":"area/networking","color":"fbca04"},{"url":"https://api.github.com/repos/docker/docker/labels/exp/expert","name":"exp/expert","color":"3B8686"},{"url":"https://api.github.com/repos/docker/docker/labels/kind/bug","name":"kind/bug","color":"FF8C94"}],"state":"open","locked":false,"assignee":{"login":"mrjana","id":1693482,"avatar_url":"https://avatars.githubusercontent.com/u/1693482?v=3","gravatar_id":"","url":"https://api.github.com/users/mrjana","html_url":"https://github.com/mrjana","followers_url":"https://api.github.com/users/mrjana/followers","following_url":"https://api.github.com/users/mrjana/following{/other_user}","gists_url":"https://api.github.com/users/mrjana/gists{/gist_id}","starred_url":"https://api.github.com/users/mrjana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrjana/subscriptions","organizations_url":"https://api.github.com/users/mrjana/orgs","repos_url":"https://api.github.com/users/mrjana/repos","events_url":"https://api.github.com/users/mrjana/events{/privacy}","received_events_url":"https://api.github.com/users/mrjana/received_events","type":"User","site_admin":false},"assignees":[{"login":"mrjana","id":1693482,"avatar_url":"https://avatars.githubusercontent.com/u/1693482?v=3","gravatar_id":"","url":"https://api.github.com/users/mrjana","html_url":"https://github.com/mrjana","followers_url":"https://api.github.com/users/mrjana/followers","following_url":"https://api.github.com/users/mrjana/following{/other_user}","gists_url":"https://api.github.com/users/mrjana/gists{/gist_id}","starred_url":"https://api.github.com/users/mrjana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrjana/subscriptions","organizations_url":"https://api.github.com/users/mrjana/orgs","repos_url":"https://api.github.com/users/mrjana/repos","events_url":"https://api.github.com/users/mrjana/events{/privacy}","received_events_url":"https://api.github.com/users/mrjana/received_events","type":"User","site_admin":false}],"milestone":null,"comments":142,"created_at":"2013-10-11T13:40:07Z","updated_at":"2016-10-13T19:16:58Z","closed_at":null,"body":"Is there a way I can tell docker to only bind redirected ports to IPv4 interfaces?\r\n\r\nI have a machine running with IPv6 disabled:\r\n\r\n    # echo '1' > /proc/sys/net/ipv6/conf/lo/disable_ipv6  \r\n    # echo '1' > /proc/sys/net/ipv6/conf/lo/disable_ipv6  \r\n    # echo '1' > /proc/sys/net/ipv6/conf/all/disable_ipv6  \r\n    # echo '1' > /proc/sys/net/ipv6/conf/default/disable_ipv6\r\n    # /etc/init.d/networking restart\r\n\r\n`ifconfig` reports there are no IPv6-enabled interfaces:\r\n\r\n    # ifconfig\r\n    docker0   Link encap:Ethernet  HWaddr 00:00:00:00:00:00  \r\n              inet addr:172.17.42.1  Bcast:0.0.0.0  Mask:255.255.0.0\r\n              UP BROADCAST MULTICAST  MTU:1500  Metric:1\r\n              RX packets:1372 errors:0 dropped:0 overruns:0 frame:0\r\n              TX packets:7221 errors:0 dropped:0 overruns:0 carrier:0\r\n              collisions:0 txqueuelen:0 \r\n              RX bytes:88091 (88.0 KB)  TX bytes:10655750 (10.6 MB)\r\n    \r\n    eth0      Link encap:Ethernet  HWaddr 04:01:08:c1:b1:01  \r\n              inet addr:198.XXX.XXX.XXX  Bcast:198.199.90.255  Mask:255.255.255.0\r\n              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1\r\n              RX packets:97602 errors:0 dropped:4 overruns:0 frame:0\r\n              TX packets:15362 errors:0 dropped:0 overruns:0 carrier:0\r\n              collisions:0 txqueuelen:1000 \r\n              RX bytes:141867997 (141.8 MB)  TX bytes:1376970 (1.3 MB)\r\n    \r\n    lo        Link encap:Local Loopback  \r\n              inet addr:127.0.0.1  Mask:255.0.0.0\r\n              UP LOOPBACK RUNNING  MTU:65536  Metric:1\r\n              RX packets:0 errors:0 dropped:0 overruns:0 frame:0\r\n              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0\r\n              collisions:0 txqueuelen:0 \r\n              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)\r\n    \r\n    lxcbr0    Link encap:Ethernet  HWaddr 9e:51:04:ed:13:d4  \r\n              inet addr:10.0.3.1  Bcast:10.0.3.255  Mask:255.255.255.0\r\n              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1\r\n              RX packets:0 errors:0 dropped:0 overruns:0 frame:0\r\n              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0\r\n              collisions:0 txqueuelen:0 \r\n              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)\r\n\r\nWhen I launch a new docker container and ask it to port forward 8000 to 8000 in the container it does so only on IPv6 interfaces. Is there a way to make it only bind to IPv4 interfaces?\r\n\r\n    # docker run -p 8000:8000 -i -t colinsurprenant/ubuntu-raring-amd64 /bin/bash\r\n\r\nWhen I check with `lsof` it says that only IPv6-related bindings have been made:\r\n\r\n    # lsof -OnP | grep LISTEN\r\n    sshd      1275             root    3u     IPv4 ... TCP *:22 (LISTEN)\r\n    sshd      1275             root    4u     IPv6 ... TCP *:22 (LISTEN)\r\n    dnsmasq   2975      lxc-dnsmasq    7u     IPv4 ... TCP 10.0.3.1:53 (LISTEN)\r\n    docker    9629             root    7u     IPv6 ... TCP *:8000 (LISTEN)\r\n    docker    9629 9630        root    7u     IPv6 ... TCP *:8000 (LISTEN)\r\n    docker    9629 9631        root    7u     IPv6 ... TCP *:8000 (LISTEN)\r\n    docker    9629 9632        root    7u     IPv6 ... TCP *:8000 (LISTEN)\r\n    docker    9629 9633        root    7u     IPv6 ... TCP *:8000 (LISTEN)\r\n    docker    9629 9634        root    7u     IPv6 ... TCP *:8000 (LISTEN)\r\n    docker    9629 9698        root    7u     IPv6 ... TCP *:8000 (LISTEN)\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/253611039","html_url":"https://github.com/docker/docker/issues/2174#issuecomment-253611039","issue_url":"https://api.github.com/repos/docker/docker/issues/2174","id":253611039,"user":{"login":"xcellardoor","id":3308601,"avatar_url":"https://avatars.githubusercontent.com/u/3308601?v=3","gravatar_id":"","url":"https://api.github.com/users/xcellardoor","html_url":"https://github.com/xcellardoor","followers_url":"https://api.github.com/users/xcellardoor/followers","following_url":"https://api.github.com/users/xcellardoor/following{/other_user}","gists_url":"https://api.github.com/users/xcellardoor/gists{/gist_id}","starred_url":"https://api.github.com/users/xcellardoor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xcellardoor/subscriptions","organizations_url":"https://api.github.com/users/xcellardoor/orgs","repos_url":"https://api.github.com/users/xcellardoor/repos","events_url":"https://api.github.com/users/xcellardoor/events{/privacy}","received_events_url":"https://api.github.com/users/xcellardoor/received_events","type":"User","site_admin":false},"created_at":"2016-10-13T19:16:58Z","updated_at":"2016-10-13T19:16:58Z","body":"Just chiming in that I'm suffering from this as well when I try to run a Gogs container on Fedora. The container was running fine, I upgraded the system including docker, restarted the container and now when I check the system the following is what's happening:\r\n\r\n- Port 80 is open and listening from Fedora's perspective, bound to 0.0.0.0 (so any interface).\r\n- When I run 'netstat -tulpn' inside the gogs container itself, it shows that only the IPv6 address is listening. There is no IPv4.\r\n\r\nHappy to run tests as people instruct, it's not production or anything it's just a silly git repo I play with."}}
{"actor":{"display_login":"xcellardoor"}}