{"action":"created","issue":{"url":"https://api.github.com/repos/mitchellh/vagrant/issues/4845","labels_url":"https://api.github.com/repos/mitchellh/vagrant/issues/4845/labels{/name}","comments_url":"https://api.github.com/repos/mitchellh/vagrant/issues/4845/comments","events_url":"https://api.github.com/repos/mitchellh/vagrant/issues/4845/events","html_url":"https://github.com/mitchellh/vagrant/issues/4845","id":49352145,"number":4845,"title":"Remove NAT, and use public_network only.  Error: A NAT rule of this name already exists","user":{"login":"adali","id":953331,"avatar_url":"https://avatars.githubusercontent.com/u/953331?v=3","gravatar_id":"","url":"https://api.github.com/users/adali","html_url":"https://github.com/adali","followers_url":"https://api.github.com/users/adali/followers","following_url":"https://api.github.com/users/adali/following{/other_user}","gists_url":"https://api.github.com/users/adali/gists{/gist_id}","starred_url":"https://api.github.com/users/adali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adali/subscriptions","organizations_url":"https://api.github.com/users/adali/orgs","repos_url":"https://api.github.com/users/adali/repos","events_url":"https://api.github.com/users/adali/events{/privacy}","received_events_url":"https://api.github.com/users/adali/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-11-19T09:09:25Z","updated_at":"2015-01-06T22:04:40Z","closed_at":"2015-01-06T22:04:40Z","body":"I met a web server (guest) problem related with post hash,  and got the information it may be caused by NAT,  so I tried to remove guest NAT and use public_network only.\r\n\r\nEnvironment:\r\n\r\n```text\r\nHost: Mac 10.9.5\r\nVirtualBox version: 4.3.18\r\nVagrant version:  1.6.5\r\n```\r\n\r\nVagrantfile:\r\n\r\n```ruby\r\nconfig.vm.network \"public_network\"\r\n```\r\n\r\nAfter vagrant up,  Virtualbox shows 2 network adaptor\r\n\r\n```text\r\nAdapter 1: Intel PRO/1000 MT Desktop (NAT)\r\nAdapter 2: Intel PRO/1000 MT Desktop (Bridged Adapter, en0: Wi-Fi (AirPort))\r\n```\r\n\r\nI shut down guest, and remove the guest's Adapter 1 in VirtualBox manually, then vagrant reload, and get the following information:\r\n\r\n```\r\n==> default: Clearing any previously set network interfaces...\r\n==> default: Available bridged network interfaces:\r\n1) en0: Wi-Fi (AirPort)\r\n2) en1: Thunderbolt 1\r\n3) en2: Thunderbolt 2\r\n4) bridge0\r\n5) p2p0\r\n    default: What interface should the network bridge to? 1\r\n==> default: Preparing network interfaces based on configuration...\r\n    default: Adapter 1: nat\r\n    default: Adapter 2: bridged\r\n==> default: Forwarding ports...\r\n    default: 22 => 2222 (adapter 1)\r\nThere was an error while executing `VBoxManage`, a CLI used by Vagrant\r\nfor controlling VirtualBox. The command and stderr is shown below.\r\n\r\nCommand: [\"modifyvm\", \"f06d14aa-22d4-44ed-981e-c274acbda94d\", \"--natpf1\", \"ssh,tcp,127.0.0.1,2222,,22\"]\r\n\r\nStderr: VBoxManage: error: A NAT rule of this name already exists\r\nVBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component NATEngine, interface INATEngine, callee nsISupports\r\nVBoxManage: error: Context: \"AddRedirect(Bstr(strName).raw(), proto, Bstr(strHostIp).raw(), RTStrToUInt16(strHostPort), Bstr(strGuestIp).raw(), RTStrToUInt16(strGuestPort))\" at line 1708 of file VBoxManageModifyVM.cpp\r\n```\r\n\r\nHow can I remove NAT and use public_network only in vagrant?"},"comment":{"url":"https://api.github.com/repos/mitchellh/vagrant/issues/comments/68942602","html_url":"https://github.com/mitchellh/vagrant/issues/4845#issuecomment-68942602","issue_url":"https://api.github.com/repos/mitchellh/vagrant/issues/4845","id":68942602,"user":{"login":"mitchellh","id":1299,"avatar_url":"https://avatars.githubusercontent.com/u/1299?v=3","gravatar_id":"","url":"https://api.github.com/users/mitchellh","html_url":"https://github.com/mitchellh","followers_url":"https://api.github.com/users/mitchellh/followers","following_url":"https://api.github.com/users/mitchellh/following{/other_user}","gists_url":"https://api.github.com/users/mitchellh/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchellh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchellh/subscriptions","organizations_url":"https://api.github.com/users/mitchellh/orgs","repos_url":"https://api.github.com/users/mitchellh/repos","events_url":"https://api.github.com/users/mitchellh/events{/privacy}","received_events_url":"https://api.github.com/users/mitchellh/received_events","type":"User","site_admin":false},"created_at":"2015-01-06T22:04:40Z","updated_at":"2015-01-06T22:04:40Z","body":"Vagrant requires NAT, unfortunately. There is no way around this currently."}}