Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to make a NAT connection (for yum downloads) and a Host-Only connection (for talking with host) at the same time on my CentOS box when using Vagrant.

I CAN do it by SSHing and checking /etc/udev/rules.d/70-persistent-net.rules and creating corresponding /etc/sysconfig/network-scripts/ifcfg-eth1. However I can't find anything describing how to have both a NAT and a HOST only connection in Vagrant using Vagrantfile configurations. Things to consider:

  1. Bridged connection is NOT what I want. I'm behind a DHCP client that requires authentication.
  2. :hostonly, "" overwrites the default NAT connection, so that does not work either.

Thanks in advance for sharing your know how.

share|improve this question
up vote 3 down vote accepted

You should use the :adapter parameter to achieve what you want. Keep in mind that the adapter no. 1 is always a NAT. :hostonly, "", :adapter => 2
share|improve this answer
this is not for latest vagrant is it? – holms May 13 '15 at 0:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.