# Nat adapter as second interface

**URL:** <https://discuss.hashicorp.com/t/nat-adapter-as-second-interface/22985>\
**Category:** Vagrant\
**Created:** [April 9, 2021, 1:43pm UTC](https://discuss.hashicorp.com/t/nat-adapter-as-second-interface/22985 "2021-04-09T13:43:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gennady-voronkov](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/gennady-voronkov/32/18511_2.png) [@gennady-voronkov](https://discuss.hashicorp.com/u/gennady-voronkov)\
**Post date:** [April 9, 2021, 1:43pm UTC](https://discuss.hashicorp.com/t/nat-adapter-as-second-interface/22985/1 "2021-04-09T13:43:57Z")

</div>

I need to configure nat adapter as second interface  
but it does not work  
node.vm.provider “virtualbox” do |vb|  
vb.name = “kubemaster0#{i}”  
vb.memory = 2048  
vb.cpus = 2  
vb.customize [‘modifyvm’, :id, ‘–nic1’, ‘intnet’, ‘–nic2’, ‘nat’]  
end  
node.vm.network :private\_network, adapter: 1, ip: IP\_NW + “#{MASTER\_IP\_START + i}”  
node.vm.network :forwarded\_port, adapter: 2, auto\_correct: false, guest: 22, host: “#{2710 + i}”

Could You please tell me, where is wrong  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![gremlin-master](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/gremlin-master/32/18628_2.png) [@gremlin-master](https://discuss.hashicorp.com/u/gremlin-master)\
**Post date:** [April 14, 2021, 2:26pm UTC](https://discuss.hashicorp.com/t/nat-adapter-as-second-interface/22985/2 "2021-04-14T14:26:37Z")

</div>

Vagrant requires the first network device attached to the virtual machine to be a NAT device. As far as I know it is currently not possible to override this requirement.

It looks like you want to setup kubernetes via vagrant so I suggest that you use the second network adapter for the kubenetes network.
