{"action":"created","comment":{"url":"https://api.github.com/repos/projectcalico/calico-containers/pulls/comments/55089267","id":55089267,"diff_hunk":"@@ -6,43 +6,54 @@\n > You are viewing the calico-containers documentation for release **release**.\n <!--- end of master only -->\n \n-# Expose Container Port to Host-Interface / Internet\n+# Expose Container Port to Host Interface / Internet\n \n In the [Calico without Docker networking tutorial](calico-with-docker/without-docker-networking/README.md) \n or the [Calico as a Docker network plugin tutorial](calico-with-docker/docker-network-plugin/README.md)\n we created containers and assigned endpoints (a container interface) to them. This is used for Container-\n To-Container communication.\n \n-The example below shows how to expose a port of a container to the Host-Interface so this container is \n+The example below shows how to expose a port of a container to the host interface so this container is \n reachable from outside / the internet.\n \n ## Why isn't the `-p` flag on `docker run` working as expected?\n-If you connect containers to the docker0 interface, then calico would not be able to enforce security rules\n-between workloads; all containers on the bridge would be able to communicate with each other.\n+If you connect containers to the `docker0` bridge interface, Calico would not \n+be able to enforce security rules between workloads; all containers on the\n+bridge would be able to communicate with one other.\n \n-## How can i make a container reachable from the Internet (Host-Interface)?\n-Let's say you want to expose port 80 of your container IP 192.168.0.1 to be reachable from the internet. \n-You can do that these two steps:\n+>When using Docker networking with Docker default IPAM, the Calico libnetwork\n+>plugin connects the container to the Docker bridge. This *does* allow the `-p`\n+>option to work (since this port-forwarding is handled in the bridge), but at\n+>the expense of full Calico policy isolation between containers connected to the\n+>same bridge.\n \n-### Update Profile to allow traffic to container\n-First find your profile (see [how to find profile id with docker networking](calico-with-docker/docker-network-plugin/AdvancedPolicy.md))\n-and add an ibound rule to allow port 80\n+## Exposing Container Port to the Internet (via host interface)\n+The following steps explain how to expose port 80 of a container with IP\n+192.168.0.1 to be reachable from the internet via the host.\n+\n+### Update Profile\n+\n+First, add a rule to your container's profile to allow inbound TCP traffic to port 80:\n+\n+>Note: If you are using Calico with Docker networking, you can find ","path":"docs/ExposePortsToInternet.md","position":43,"original_position":43,"commit_id":"4ace93ee7db5be2a29c3f77316146f26fa782e84","original_commit_id":"4ace93ee7db5be2a29c3f77316146f26fa782e84","user":{"login":"robbrockbank","id":3227729,"avatar_url":"https://avatars.githubusercontent.com/u/3227729?v=3","gravatar_id":"","url":"https://api.github.com/users/robbrockbank","html_url":"https://github.com/robbrockbank","followers_url":"https://api.github.com/users/robbrockbank/followers","following_url":"https://api.github.com/users/robbrockbank/following{/other_user}","gists_url":"https://api.github.com/users/robbrockbank/gists{/gist_id}","starred_url":"https://api.github.com/users/robbrockbank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robbrockbank/subscriptions","organizations_url":"https://api.github.com/users/robbrockbank/orgs","repos_url":"https://api.github.com/users/robbrockbank/repos","events_url":"https://api.github.com/users/robbrockbank/events{/privacy}","received_events_url":"https://api.github.com/users/robbrockbank/received_events","type":"User","site_admin":false},"body":"See the latest Advanced Policy guide.  Calicoctl handles the mapping, so probably worth tweaking this text a little.","created_at":"2016-03-04T21:11:53Z","updated_at":"2016-03-04T21:11:53Z","html_url":"https://github.com/projectcalico/calico-containers/pull/832#discussion_r55089267","pull_request_url":"https://api.github.com/repos/projectcalico/calico-containers/pulls/832","_links":{"self":{"href":"https://api.github.com/repos/projectcalico/calico-containers/pulls/comments/55089267"},"html":{"href":"https://github.com/projectcalico/calico-containers/pull/832#discussion_r55089267"},"pull_request":{"href":"https://api.github.com/repos/projectcalico/calico-containers/pulls/832"}}},"pull_request":{"url":"https://api.github.com/repos/projectcalico/calico-containers/pulls/832","id":60887391,"html_url":"https://github.com/projectcalico/calico-containers/pull/832","diff_url":"https://github.com/projectcalico/calico-containers/pull/832.diff","patch_url":"https://github.com/projectcalico/calico-containers/pull/832.patch","issue_url":"https://api.github.com/repos/projectcalico/calico-containers/issues/832","number":832,"state":"open","locked":false,"title":"Update typos/wording in ExposePortsToInternet doc","user":{"login":"TrimBiggs","id":1302077,"avatar_url":"https://avatars.githubusercontent.com/u/1302077?v=3","gravatar_id":"","url":"https://api.github.com/users/TrimBiggs","html_url":"https://github.com/TrimBiggs","followers_url":"https://api.github.com/users/TrimBiggs/followers","following_url":"https://api.github.com/users/TrimBiggs/following{/other_user}","gists_url":"https://api.github.com/users/TrimBiggs/gists{/gist_id}","starred_url":"https://api.github.com/users/TrimBiggs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrimBiggs/subscriptions","organizations_url":"https://api.github.com/users/TrimBiggs/orgs","repos_url":"https://api.github.com/users/TrimBiggs/repos","events_url":"https://api.github.com/users/TrimBiggs/events{/privacy}","received_events_url":"https://api.github.com/users/TrimBiggs/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-26T19:01:56Z","updated_at":"2016-03-04T21:11:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5992f8fbdc857b93e90adbccd2b016297bdba5f0","assignee":{"login":"robbrockbank","id":3227729,"avatar_url":"https://avatars.githubusercontent.com/u/3227729?v=3","gravatar_id":"","url":"https://api.github.com/users/robbrockbank","html_url":"https://github.com/robbrockbank","followers_url":"https://api.github.com/users/robbrockbank/followers","following_url":"https://api.github.com/users/robbrockbank/following{/other_user}","gists_url":"https://api.github.com/users/robbrockbank/gists{/gist_id}","starred_url":"https://api.github.com/users/robbrockbank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robbrockbank/subscriptions","organizations_url":"https://api.github.com/users/robbrockbank/orgs","repos_url":"https://api.github.com/users/robbrockbank/repos","events_url":"https://api.github.com/users/robbrockbank/events{/privacy}","received_events_url":"https://api.github.com/users/robbrockbank/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/projectcalico/calico-containers/pulls/832/commits","review_comments_url":"https://api.github.com/repos/projectcalico/calico-containers/pulls/832/comments","review_comment_url":"https://api.github.com/repos/projectcalico/calico-containers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projectcalico/calico-containers/issues/832/comments","statuses_url":"https://api.github.com/repos/projectcalico/calico-containers/statuses/4ace93ee7db5be2a29c3f77316146f26fa782e84","head":{"label":"TrimBiggs:expose-ports-typos","ref":"expose-ports-typos","sha":"4ace93ee7db5be2a29c3f77316146f26fa782e84","user":{"login":"TrimBiggs","id":1302077,"avatar_url":"https://avatars.githubusercontent.com/u/1302077?v=3","gravatar_id":"","url":"https://api.github.com/users/TrimBiggs","html_url":"https://github.com/TrimBiggs","followers_url":"https://api.github.com/users/TrimBiggs/followers","following_url":"https://api.github.com/users/TrimBiggs/following{/other_user}","gists_url":"https://api.github.com/users/TrimBiggs/gists{/gist_id}","starred_url":"https://api.github.com/users/TrimBiggs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrimBiggs/subscriptions","organizations_url":"https://api.github.com/users/TrimBiggs/orgs","repos_url":"https://api.github.com/users/TrimBiggs/repos","events_url":"https://api.github.com/users/TrimBiggs/events{/privacy}","received_events_url":"https://api.github.com/users/TrimBiggs/received_events","type":"User","site_admin":false},"repo":{"id":38397840,"name":"calico-containers","full_name":"TrimBiggs/calico-containers","owner":{"login":"TrimBiggs","id":1302077,"avatar_url":"https://avatars.githubusercontent.com/u/1302077?v=3","gravatar_id":"","url":"https://api.github.com/users/TrimBiggs","html_url":"https://github.com/TrimBiggs","followers_url":"https://api.github.com/users/TrimBiggs/followers","following_url":"https://api.github.com/users/TrimBiggs/following{/other_user}","gists_url":"https://api.github.com/users/TrimBiggs/gists{/gist_id}","starred_url":"https://api.github.com/users/TrimBiggs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrimBiggs/subscriptions","organizations_url":"https://api.github.com/users/TrimBiggs/orgs","repos_url":"https://api.github.com/users/TrimBiggs/repos","events_url":"https://api.github.com/users/TrimBiggs/events{/privacy}","received_events_url":"https://api.github.com/users/TrimBiggs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TrimBiggs/calico-containers","description":"Docker version of Project Calico","fork":true,"url":"https://api.github.com/repos/TrimBiggs/calico-containers","forks_url":"https://api.github.com/repos/TrimBiggs/calico-containers/forks","keys_url":"https://api.github.com/repos/TrimBiggs/calico-containers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TrimBiggs/calico-containers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TrimBiggs/calico-containers/teams","hooks_url":"https://api.github.com/repos/TrimBiggs/calico-containers/hooks","issue_events_url":"https://api.github.com/repos/TrimBiggs/calico-containers/issues/events{/number}","events_url":"https://api.github.com/repos/TrimBiggs/calico-containers/events","assignees_url":"https://api.github.com/repos/TrimBiggs/calico-containers/assignees{/user}","branches_url":"https://api.github.com/repos/TrimBiggs/calico-containers/branches{/branch}","tags_url":"https://api.github.com/repos/TrimBiggs/calico-containers/tags","blobs_url":"https://api.github.com/repos/TrimBiggs/calico-containers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TrimBiggs/calico-containers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TrimBiggs/calico-containers/git/refs{/sha}","trees_url":"https://api.github.com/repos/TrimBiggs/calico-containers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TrimBiggs/calico-containers/statuses/{sha}","languages_url":"https://api.github.com/repos/TrimBiggs/calico-containers/languages","stargazers_url":"https://api.github.com/repos/TrimBiggs/calico-containers/stargazers","contributors_url":"https://api.github.com/repos/TrimBiggs/calico-containers/contributors","subscribers_url":"https://api.github.com/repos/TrimBiggs/calico-containers/subscribers","subscription_url":"https://api.github.com/repos/TrimBiggs/calico-containers/subscription","commits_url":"https://api.github.com/repos/TrimBiggs/calico-containers/commits{/sha}","git_commits_url":"https://api.github.com/repos/TrimBiggs/calico-containers/git/commits{/sha}","comments_url":"https://api.github.com/repos/TrimBiggs/calico-containers/comments{/number}","issue_comment_url":"https://api.github.com/repos/TrimBiggs/calico-containers/issues/comments{/number}","contents_url":"https://api.github.com/repos/TrimBiggs/calico-containers/contents/{+path}","compare_url":"https://api.github.com/repos/TrimBiggs/calico-containers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TrimBiggs/calico-containers/merges","archive_url":"https://api.github.com/repos/TrimBiggs/calico-containers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TrimBiggs/calico-containers/downloads","issues_url":"https://api.github.com/repos/TrimBiggs/calico-containers/issues{/number}","pulls_url":"https://api.github.com/repos/TrimBiggs/calico-containers/pulls{/number}","milestones_url":"https://api.github.com/repos/TrimBiggs/calico-containers/milestones{/number}","notifications_url":"https://api.github.com/repos/TrimBiggs/calico-containers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TrimBiggs/calico-containers/labels{/name}","releases_url":"https://api.github.com/repos/TrimBiggs/calico-containers/releases{/id}","deployments_url":"https://api.github.com/repos/TrimBiggs/calico-containers/deployments","created_at":"2015-07-01T22:16:32Z","updated_at":"2016-01-22T18:37:43Z","pushed_at":"2016-03-04T19:10:37Z","git_url":"git://github.com/TrimBiggs/calico-containers.git","ssh_url":"git@github.com:TrimBiggs/calico-containers.git","clone_url":"https://github.com/TrimBiggs/calico-containers.git","svn_url":"https://github.com/TrimBiggs/calico-containers","homepage":"http://www.projectcalico.org","size":19722,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"projectcalico:master","ref":"master","sha":"c3e684615eda7eb2136ed60625eb93f2e93b5e5a","user":{"login":"projectcalico","id":12304728,"avatar_url":"https://avatars.githubusercontent.com/u/12304728?v=3","gravatar_id":"","url":"https://api.github.com/users/projectcalico","html_url":"https://github.com/projectcalico","followers_url":"https://api.github.com/users/projectcalico/followers","following_url":"https://api.github.com/users/projectcalico/following{/other_user}","gists_url":"https://api.github.com/users/projectcalico/gists{/gist_id}","starred_url":"https://api.github.com/users/projectcalico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectcalico/subscriptions","organizations_url":"https://api.github.com/users/projectcalico/orgs","repos_url":"https://api.github.com/users/projectcalico/repos","events_url":"https://api.github.com/users/projectcalico/events{/privacy}","received_events_url":"https://api.github.com/users/projectcalico/received_events","type":"Organization","site_admin":false},"repo":{"id":29629333,"name":"calico-containers","full_name":"projectcalico/calico-containers","owner":{"login":"projectcalico","id":12304728,"avatar_url":"https://avatars.githubusercontent.com/u/12304728?v=3","gravatar_id":"","url":"https://api.github.com/users/projectcalico","html_url":"https://github.com/projectcalico","followers_url":"https://api.github.com/users/projectcalico/followers","following_url":"https://api.github.com/users/projectcalico/following{/other_user}","gists_url":"https://api.github.com/users/projectcalico/gists{/gist_id}","starred_url":"https://api.github.com/users/projectcalico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectcalico/subscriptions","organizations_url":"https://api.github.com/users/projectcalico/orgs","repos_url":"https://api.github.com/users/projectcalico/repos","events_url":"https://api.github.com/users/projectcalico/events{/privacy}","received_events_url":"https://api.github.com/users/projectcalico/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projectcalico/calico-containers","description":"Project Calico deployed in a containerized environment","fork":false,"url":"https://api.github.com/repos/projectcalico/calico-containers","forks_url":"https://api.github.com/repos/projectcalico/calico-containers/forks","keys_url":"https://api.github.com/repos/projectcalico/calico-containers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projectcalico/calico-containers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projectcalico/calico-containers/teams","hooks_url":"https://api.github.com/repos/projectcalico/calico-containers/hooks","issue_events_url":"https://api.github.com/repos/projectcalico/calico-containers/issues/events{/number}","events_url":"https://api.github.com/repos/projectcalico/calico-containers/events","assignees_url":"https://api.github.com/repos/projectcalico/calico-containers/assignees{/user}","branches_url":"https://api.github.com/repos/projectcalico/calico-containers/branches{/branch}","tags_url":"https://api.github.com/repos/projectcalico/calico-containers/tags","blobs_url":"https://api.github.com/repos/projectcalico/calico-containers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projectcalico/calico-containers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projectcalico/calico-containers/git/refs{/sha}","trees_url":"https://api.github.com/repos/projectcalico/calico-containers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projectcalico/calico-containers/statuses/{sha}","languages_url":"https://api.github.com/repos/projectcalico/calico-containers/languages","stargazers_url":"https://api.github.com/repos/projectcalico/calico-containers/stargazers","contributors_url":"https://api.github.com/repos/projectcalico/calico-containers/contributors","subscribers_url":"https://api.github.com/repos/projectcalico/calico-containers/subscribers","subscription_url":"https://api.github.com/repos/projectcalico/calico-containers/subscription","commits_url":"https://api.github.com/repos/projectcalico/calico-containers/commits{/sha}","git_commits_url":"https://api.github.com/repos/projectcalico/calico-containers/git/commits{/sha}","comments_url":"https://api.github.com/repos/projectcalico/calico-containers/comments{/number}","issue_comment_url":"https://api.github.com/repos/projectcalico/calico-containers/issues/comments{/number}","contents_url":"https://api.github.com/repos/projectcalico/calico-containers/contents/{+path}","compare_url":"https://api.github.com/repos/projectcalico/calico-containers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projectcalico/calico-containers/merges","archive_url":"https://api.github.com/repos/projectcalico/calico-containers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projectcalico/calico-containers/downloads","issues_url":"https://api.github.com/repos/projectcalico/calico-containers/issues{/number}","pulls_url":"https://api.github.com/repos/projectcalico/calico-containers/pulls{/number}","milestones_url":"https://api.github.com/repos/projectcalico/calico-containers/milestones{/number}","notifications_url":"https://api.github.com/repos/projectcalico/calico-containers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projectcalico/calico-containers/labels{/name}","releases_url":"https://api.github.com/repos/projectcalico/calico-containers/releases{/id}","deployments_url":"https://api.github.com/repos/projectcalico/calico-containers/deployments","created_at":"2015-01-21T23:46:47Z","updated_at":"2016-03-03T14:47:39Z","pushed_at":"2016-03-04T20:09:42Z","git_url":"git://github.com/projectcalico/calico-containers.git","ssh_url":"git@github.com:projectcalico/calico-containers.git","clone_url":"https://github.com/projectcalico/calico-containers.git","svn_url":"https://github.com/projectcalico/calico-containers","homepage":"http://www.projectcalico.org","size":20213,"stargazers_count":315,"watchers_count":315,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":67,"mirror_url":null,"open_issues_count":58,"forks":67,"open_issues":58,"watchers":315,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/projectcalico/calico-containers/pulls/832"},"html":{"href":"https://github.com/projectcalico/calico-containers/pull/832"},"issue":{"href":"https://api.github.com/repos/projectcalico/calico-containers/issues/832"},"comments":{"href":"https://api.github.com/repos/projectcalico/calico-containers/issues/832/comments"},"review_comments":{"href":"https://api.github.com/repos/projectcalico/calico-containers/pulls/832/comments"},"review_comment":{"href":"https://api.github.com/repos/projectcalico/calico-containers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projectcalico/calico-containers/pulls/832/commits"},"statuses":{"href":"https://api.github.com/repos/projectcalico/calico-containers/statuses/4ace93ee7db5be2a29c3f77316146f26fa782e84"}}}}