{"action":"created","issue":{"url":"https://api.github.com/repos/mitchellh/vagrant/issues/7263","repository_url":"https://api.github.com/repos/mitchellh/vagrant","labels_url":"https://api.github.com/repos/mitchellh/vagrant/issues/7263/labels{/name}","comments_url":"https://api.github.com/repos/mitchellh/vagrant/issues/7263/comments","events_url":"https://api.github.com/repos/mitchellh/vagrant/issues/7263/events","html_url":"https://github.com/mitchellh/vagrant/issues/7263","id":151093731,"number":7263,"title":"Vagrant manipulating localhost entry in /etc/hosts","user":{"login":"johnoooo","id":18639387,"avatar_url":"https://avatars.githubusercontent.com/u/18639387?v=3","gravatar_id":"","url":"https://api.github.com/users/johnoooo","html_url":"https://github.com/johnoooo","followers_url":"https://api.github.com/users/johnoooo/followers","following_url":"https://api.github.com/users/johnoooo/following{/other_user}","gists_url":"https://api.github.com/users/johnoooo/gists{/gist_id}","starred_url":"https://api.github.com/users/johnoooo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnoooo/subscriptions","organizations_url":"https://api.github.com/users/johnoooo/orgs","repos_url":"https://api.github.com/users/johnoooo/repos","events_url":"https://api.github.com/users/johnoooo/events{/privacy}","received_events_url":"https://api.github.com/users/johnoooo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-26T10:05:43Z","updated_at":"2016-04-29T11:17:12Z","closed_at":null,"body":"Hi all,\r\n\r\nI just came across this recently. For many Unix guest systems, there are plugins that manipulate /etc/hosts when setting the machine's hostname. This is true at least for RHEL/CentOS, Fedora, Debian, Ubuntu. \r\n\r\nThere are two flavours (as I read it from the code)\r\n\r\n1. add the hostname to 127.0.0.1 as first entry\r\n1. add the hostname to 127.0.1.1\r\n\r\nI doubt that this is a good idea at all and would like to suggest to review this mechanism and possibly to remove it or to revise it significantly.\r\n\r\nBinding a global DNS name to a localhost interface is somehow a contradiction itself. If somebody has a configuration with a single network interface behind a NAT box (the default setup), he/she should use localhost to refer to the machine and doesn't need to set the VM hostname at all. For all other cases, the FQDN must not be assigned to the localhost interface.\r\n\r\nWhy is this so bad? Consider a case with multiple machines in an isolated network or a case with a machine with a private(default) and a public network interface. Harm occurs when the hostname is used by an application to determine the IP address to which they bind to. In this case, such applications will not be visible on the public network interface."},"comment":{"url":"https://api.github.com/repos/mitchellh/vagrant/issues/comments/215686835","html_url":"https://github.com/mitchellh/vagrant/issues/7263#issuecomment-215686835","issue_url":"https://api.github.com/repos/mitchellh/vagrant/issues/7263","id":215686835,"user":{"login":"afelle1","id":2089743,"avatar_url":"https://avatars.githubusercontent.com/u/2089743?v=3","gravatar_id":"","url":"https://api.github.com/users/afelle1","html_url":"https://github.com/afelle1","followers_url":"https://api.github.com/users/afelle1/followers","following_url":"https://api.github.com/users/afelle1/following{/other_user}","gists_url":"https://api.github.com/users/afelle1/gists{/gist_id}","starred_url":"https://api.github.com/users/afelle1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afelle1/subscriptions","organizations_url":"https://api.github.com/users/afelle1/orgs","repos_url":"https://api.github.com/users/afelle1/repos","events_url":"https://api.github.com/users/afelle1/events{/privacy}","received_events_url":"https://api.github.com/users/afelle1/received_events","type":"User","site_admin":false},"created_at":"2016-04-29T11:17:12Z","updated_at":"2016-04-29T11:17:12Z","body":"Found [someone else that was having this issue and had a hack to deal with it](http://stackoverflow.com/questions/33117939/vagrant-do-not-map-hostname-to-loopback-address-in-etc-hosts) but should see about addressing this in vagrant itself"}}