VBox6: ubuntu server with NAT cannot access on internet

VBox6.0.14 on Win10 (with already existing VMVare workstation installation active), Ubuntu machine cannot access internet via NAT, only via bridged conn. butt if I change setting vagrant cannot connect.

Hi @Mauro_77308,

Can you please share a screenshot of your terminal where you are getting this error so that we can understand the issue in a better way and help you out with same.

Thanks,
Muskan
Curriculum Support Engineer

Thank you for your support. I try to define the question in a better way:

I have win10 (with internet direct access via wifi or cable) with latest VMVARE Workstation installed. To attend the course I installed also Virtualbox (following your instructions) but i realize that now in my machine “NAT on Virtualbox” do not works (for any vm i create via VB) in the sense that the vm do not access to internet. It works only if I create a new NAT network and i connect the adapter to the new nat.

But this is non possible in your vagrant configuration…

I suppose this issue is due to two NAT services ( the VMWARE one and the Vbox one) that are in conflict.

Actually i disabled all VMWARE virtual adapters but this do not fix the problem, I think it is necessary to stop the VMWARE’s NAT service but i’m not expert in new win10 services.

I suppose this is a general question that occurs when you have VMWARE WS already installed.

Thank you for your attention.

Regards,

Mauro.

Hi @Mauro_77308,

Can you please confirm if you followed all the instructions mentioned in our lecture notes to instal/setup vagrant.

Were you able to run the command vagrant up ? If not, can you please share what error did you get on running this?

Thanks,
Muskan
Curriculum Support Engineer

f course:

XXXXXXXX > vagrant up
Bringing machine ‘mongod-m103’ up with ‘virtualbox’ provider…
==> mongod-m103: Importing base box ‘ubuntu/trusty64’…
==> mongod-m103: Matching MAC address for NAT networking…
==> mongod-m103: Setting the name of the VM: mongod-m103
==> mongod-m103: Clearing any previously set forwarded ports…
==> mongod-m103: Clearing any previously set network interfaces…
==> mongod-m103: Preparing network interfaces based on configuration…
mongod-m103: Adapter 1: nat
mongod-m103: Adapter 2: hostonly
==> mongod-m103: Forwarding ports…
mongod-m103: 22 (guest) => 2222 (host) (adapter 1)
==> mongod-m103: Running ‘pre-boot’ VM customizations…
==> mongod-m103: Booting VM…
==> mongod-m103: Waiting for machine to boot. This may take a few minutes…
mongod-m103: SSH address: 127.0.0.1:2222
mongod-m103: SSH username: vagrant
mongod-m103: SSH auth method: private key
mongod-m103: Warning: Connection reset. Retrying…
mongod-m103: Warning: Connection aborted. Retrying…
mongod-m103: Warning: Remote connection disconnect. Retrying…
mongod-m103: Warning: Connection reset. Retrying…
mongod-m103: Warning: Connection aborted. Retrying…
mongod-m103:
mongod-m103: Vagrant insecure key detected. Vagrant will automatically replace
mongod-m103: this with a newly generated keypair for better security.
mongod-m103:
mongod-m103: Inserting generated public key within guest…
mongod-m103: Removing insecure key from the guest if it’s present…
mongod-m103: Key inserted! Disconnecting and reconnecting using new SSH key…
==> mongod-m103: Machine booted and ready!
==> mongod-m103: Checking for guest additions in VM…
mongod-m103: The guest additions on this VM do not match the installed version of
mongod-m103: VirtualBox! In most cases this is fine, but in rare cases it can
mongod-m103: prevent things such as shared folders from working properly. If you see
mongod-m103: shared folder errors, please make sure the guest additions within the
mongod-m103: virtual machine match the version of VirtualBox you have installed on
mongod-m103: your host and reload your VM.
mongod-m103:
mongod-m103: Guest Additions Version: 4.3.40
mongod-m103: VirtualBox Version: 6.0
==> mongod-m103: Setting hostname…
==> mongod-m103: Configuring and enabling network interfaces…
==> mongod-m103: Mounting shared folders…
mongod-m103: /shared => XXXXXX/m103/m103-vagrant-env/shared
mongod-m103: /vagrant => XXXXXX/m103/m103-vagrant-env
mongod-m103: /dataset => XXXXXX/m103/m103-vagrant-env/dataset
==> mongod-m103: Running provisioner: shell…
mongod-m103: Running: C:/Users/maurizim/AppData/Local/Temp/vagrant-shell20191023-10612-1imnaoq
mongod-m103: + config
mongod-m103: + sudo su
mongod-m103: + echo -e never
mongod-m103: + echo -e never
mongod-m103: + sudo tee /etc/init/mongod.override
mongod-m103: + echo manual
mongod-m103: manual
mongod-m103: + ip_config
mongod-m103: ++ ifconfig
mongod-m103: ++ tail -1
mongod-m103: ++ grep ‘inet addr:’
mongod-m103: ++ awk ‘{ print $1}’
mongod-m103: ++ cut -d: -f2
mongod-m103: ++ grep -v 127.0.0.1
mongod-m103: + export CLIENT_IP_ADDR=192.168.103.100
mongod-m103: + CLIENT_IP_ADDR=192.168.103.100
mongod-m103: ++ hostname
mongod-m103: + export CLIENT_FQDN=m103
mongod-m103: + CLIENT_FQDN=m103
mongod-m103: ++ hostname
mongod-m103: ++ tr ‘[:upper:]’ ‘[:lower:]’
mongod-m103: ++ cut -d. -f 1
mongod-m103: + export CLIENT_NAME=m103
mongod-m103: + CLIENT_NAME=m103
mongod-m103: + echo ‘Configuring /etc/hosts …’
mongod-m103: Configuring /etc/hosts …
mongod-m103: + echo '127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ’
mongod-m103: + echo ‘::1 localhost localhost.localdomain localhost6 localhost6.localdomain6’
mongod-m103: + echo ‘fe00::0 ip6-localnet’
mongod-m103: + echo ‘ff00::0 ip6-mcastprefix’
mongod-m103: + echo ‘ff02::1 ip6-allnodes’
mongod-m103: + echo ‘ff02::2 ip6-allrouters’
mongod-m103: + echo ‘ff02::3 ip6-allhosts’
mongod-m103: + echo ‘192.168.103.100 m103 m103’
mongod-m103: + update_repo
mongod-m103: + echo ‘Install MongoDB Enterprise Repository’
mongod-m103: Install MongoDB Enterprise Repository
mongod-m103: + echo ‘deb [ arch=amd64 ] http://repo.mongodb.com/apt/ubuntu trusty/mongodb-enterprise/3.6 multiverse’ mongod-m103: + sudo tee /etc/apt/sources.list.d/mongodb-enterprise.list
mongod-m103: deb [ arch=amd64 ] http://repo.mongodb.com/apt/ubuntu trusty/mongodb-enterprise/3.6 multiverse
mongod-m103: + sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6

mongod-m103: Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.K1EOUj8RFK --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
mongod-m103: gpg:
mongod-m103: requesting key A15703C6 from hkp server keyserver.ubuntu.com
mongod-m103: ?: keyserver.ubuntu.com: Host not found
mongod-m103: gpgkeys: HTTP fetch error 7: couldn’t connect: Connection timed out
mongod-m103: gpg: no valid OpenPGP data found.
mongod-m103: gpg: Total number processed: 0
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

Hi @Mauro_77308,

The issue seems to be with the firewall/proxy enabled which are causing your VM to not be able to connect to the network.
You need to disable any firewall/proxy/anti-virus.

Also, please take a look at the following threads for reference and see if they can be of any help to you.

Thanks,
Muskan
Curriculum Support Engineer

I found the reason,

om my pc win10. direct NAT on Virtualbox redirects always to the cable adapter . If it is active and directly connected to internet everything is ok.

I do not know if it is a VB issue o my pc one.

I know then I have lost time and this edition of the m103 course.

Hope helpful to someone else.

Regards,

Mauro.

Hi @Mauro_77308,

Sorry to hear that you weren’t able to complete the course due to this issue.

But since you have figured out a way through it now, you may go ahead and register for our next offering for M103 which is starting on 12th Nov, 2019.

Please feel free to reach out to us if you have any questions.

Happy Learning! :slight_smile:

Thanks,
Muskan