{"action":"created","issue":{"url":"https://api.github.com/repos/moby/moby/issues/25526","repository_url":"https://api.github.com/repos/moby/moby","labels_url":"https://api.github.com/repos/moby/moby/issues/25526/labels{/name}","comments_url":"https://api.github.com/repos/moby/moby/issues/25526/comments","events_url":"https://api.github.com/repos/moby/moby/issues/25526/events","html_url":"https://github.com/moby/moby/issues/25526","id":170113056,"number":25526,"title":"Unable to retrieve user's IP address in docker swarm mode","user":{"login":"PanJ","id":1797879,"avatar_url":"https://avatars2.githubusercontent.com/u/1797879?v=4","gravatar_id":"","url":"https://api.github.com/users/PanJ","html_url":"https://github.com/PanJ","followers_url":"https://api.github.com/users/PanJ/followers","following_url":"https://api.github.com/users/PanJ/following{/other_user}","gists_url":"https://api.github.com/users/PanJ/gists{/gist_id}","starred_url":"https://api.github.com/users/PanJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PanJ/subscriptions","organizations_url":"https://api.github.com/users/PanJ/orgs","repos_url":"https://api.github.com/users/PanJ/repos","events_url":"https://api.github.com/users/PanJ/events{/privacy}","received_events_url":"https://api.github.com/users/PanJ/received_events","type":"User","site_admin":false},"labels":[{"id":237472034,"url":"https://api.github.com/repos/moby/moby/labels/area/networking","name":"area/networking","color":"fbca04","default":false},{"id":392678049,"url":"https://api.github.com/repos/moby/moby/labels/area/swarm","name":"area/swarm","color":"fbca04","default":false},{"id":179237356,"url":"https://api.github.com/repos/moby/moby/labels/kind/enhancement","name":"kind/enhancement","color":"E8CAAF","default":false},{"id":194268680,"url":"https://api.github.com/repos/moby/moby/labels/status/needs-attention","name":"status/needs-attention","color":"e11d21","default":false},{"id":375714123,"url":"https://api.github.com/repos/moby/moby/labels/version/1.12","name":"version/1.12","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":120,"created_at":"2016-08-09T08:48:36Z","updated_at":"2018-02-21T08:43:16Z","closed_at":null,"author_association":"NONE","body":"<!--\nIf you are reporting a new issue, make sure that we do not have any duplicates\nalready open. You can ensure this by searching the issue list for this\nrepository. If there is a duplicate, please close your issue and add a comment\nto the existing issue instead.\n\nIf you suspect your issue is a bug, please edit your issue description to\ninclude the BUG REPORT INFORMATION shown below. If you fail to provide this\ninformation within 7 days, we cannot debug your issue and will close it. We\nwill, however, reopen it if you later provide the information.\n\nFor more information about reporting issues, see\nhttps://github.com/docker/docker/blob/master/CONTRIBUTING.md#reporting-other-issues\n\n---------------------------------------------------\nBUG REPORT INFORMATION\n---------------------------------------------------\nUse the commands below to provide key information from your environment:\nYou do NOT have to include this information if this is a FEATURE REQUEST\n-->\n\n**Output of `docker version`:**\n\n```\nClient:\n Version:      1.12.0\n API version:  1.24\n Go version:   go1.6.3\n Git commit:   8eab29e\n Built:        Thu Jul 28 22:00:36 2016\n OS/Arch:      linux/amd64\n\nServer:\n Version:      1.12.0\n API version:  1.24\n Go version:   go1.6.3\n Git commit:   8eab29e\n Built:        Thu Jul 28 22:00:36 2016\n OS/Arch:      linux/amd64\n```\n\n**Output of `docker info`:**\n\n```\nContainers: 155\n Running: 65\n Paused: 0\n Stopped: 90\nImages: 57\nServer Version: 1.12.0\nStorage Driver: aufs\n Root Dir: /var/lib/docker/aufs\n Backing Filesystem: extfs\n Dirs: 868\n Dirperm1 Supported: false\nLogging Driver: json-file\nCgroup Driver: cgroupfs\nPlugins:\n Volume: local\n Network: host overlay null bridge\nSwarm: active\n NodeID: 0ddz27v59pwh2g5rr1k32d9bv\n Is Manager: true\n ClusterID: 32c5sn0lgxoq9gsl1er0aucsr\n Managers: 1\n Nodes: 1\n Orchestration:\n  Task History Retention Limit: 5\n Raft:\n  Snapshot interval: 10000\n  Heartbeat tick: 1\n  Election tick: 3\n Dispatcher:\n  Heartbeat period: 5 seconds\n CA configuration:\n  Expiry duration: 3 months\n Node Address: 172.31.24.209\nRuntimes: runc\nDefault Runtime: runc\nSecurity Options: apparmor\nKernel Version: 3.13.0-92-generic\nOperating System: Ubuntu 14.04.4 LTS\nOSType: linux\nArchitecture: x86_64\nCPUs: 8\nTotal Memory: 31.42 GiB\nName: ip-172-31-24-209\nID: 4LDN:RTAI:5KG5:KHR2:RD4D:MV5P:DEXQ:G5RE:AZBQ:OPQJ:N4DK:WCQQ\nDocker Root Dir: /var/lib/docker\nDebug Mode (client): false\nDebug Mode (server): false\nUsername: panj\nRegistry: https://index.docker.io/v1/\nWARNING: No swap limit support\nInsecure Registries:\n 127.0.0.0/8\n```\n\n**Additional environment details (AWS, VirtualBox, physical, etc.):**\n\n**Steps to reproduce the issue:**\n1. run following service which publishes port 80\n\n```\ndocker service create \\\n--name debugging-simple-server \\\n--publish 80:3000 \\\npanj/debugging-simple-server\n```\n1. Try connecting with `http://<public-ip>/`. \n\n**Describe the results you received:**\nNeither `ip` nor `header.x-forwarded-for` is the correct user's IP address.\n\n**Describe the results you expected:**\n`ip` or `header.x-forwarded-for` should be user's IP address. The expected result can be archieved using standalone docker container `docker run -d -p 80:3000 panj/debugging-simple-server`. You can see both of the results via following links,\nhttp://swarm.issue-25526.docker.takemetour.com:81/\nhttp://container.issue-25526.docker.takemetour.com:82/\n\n**Additional information you deem important (e.g. issue happens only occasionally):**\nThis happens on both `global` mode and `replicated` mode.\n\nI am not sure if I missed anything that should solve this issue easily.\n\nIn the meantime, I think I have to do a workaround which is running a proxy container outside of swarm mode and let it forward to published port in swarm mode (SSL termination should be done on this container too), which breaks the purpose of swarm mode for self-healing and orchestration.\n"},"comment":{"url":"https://api.github.com/repos/moby/moby/issues/comments/367252292","html_url":"https://github.com/moby/moby/issues/25526#issuecomment-367252292","issue_url":"https://api.github.com/repos/moby/moby/issues/25526","id":367252292,"user":{"login":"MichaelErmer","id":628787,"avatar_url":"https://avatars0.githubusercontent.com/u/628787?v=4","gravatar_id":"","url":"https://api.github.com/users/MichaelErmer","html_url":"https://github.com/MichaelErmer","followers_url":"https://api.github.com/users/MichaelErmer/followers","following_url":"https://api.github.com/users/MichaelErmer/following{/other_user}","gists_url":"https://api.github.com/users/MichaelErmer/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelErmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelErmer/subscriptions","organizations_url":"https://api.github.com/users/MichaelErmer/orgs","repos_url":"https://api.github.com/users/MichaelErmer/repos","events_url":"https://api.github.com/users/MichaelErmer/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelErmer/received_events","type":"User","site_admin":false},"created_at":"2018-02-21T08:43:16Z","updated_at":"2018-02-21T08:43:16Z","author_association":"NONE","body":"This is VERY bad, it mitigates any rate limiting, fraud prevention, loging, secure logins, session monitoring etc.!\r\nListening with mode:host works, but is no real solution as you lose mesh loadbalancing and only the software loadbalanacer on the host that has the public ip has to handle all the traffic alone."}}
{"actor":{"display_login":"MichaelErmer"}}