Page 1 of 1

Remote port access doesn't work with host-only adapter.

Posted: 11. Aug 2015, 23:02
by theonlylawislove
I am using Vagrant on Windows 10 with VirtualBox 5. I have configured an application (Apache Cassandra) remotely access connections. The remove connections only work when using a public network (bridged/DHCP).

Here is my vagrant file (super slim).

Code: Select all

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|

  config.vm.box = 'ubuntu/trusty64'

  config.vm.define "dev" do |dev|

    dev.vm.hostname = "skimurdev"

    # doesn't work
    # dev.vm.network :private_network, ip: "192.168.10.200"

    # works
    dev.vm.network "public_network"

  end

  config.vm.provider "virtualbox" do |v|
    v.memory = 4096
    v.cpus = 2
  end

  config.ssh.forward_agent = true

end
Using either network adapter, on the machine I could connect to Cassandra via the public IP address (bridge or host-only). However, only when I am using host-only adapter, I cannot initiate a remote connection from my host machine.

Here is my post on SO which gives a little more insight.
h t t p : / / s t a c k o v e r f l o w . c o m / q u e s t i o n s / 3 1 9 4 4 4 0 3 / c a s s a n d r a - n o - r e m o t e - a c c e s s - w i t h - v i r t u a l b o x - u s i n g - v a g r a n t - u s i n g - h o s t - o n l y - a d a p t

Also, I am aware that host-only adapters do not work on Windows 10. I am using the hot fix here when making these virtuals.
h t t p s : / / w w w . v i r t u a l b o x . o r g / t i c k e t / 1 4 0 4 0

Re: Remote port access doesn't work with host-only adapter.

Posted: 11. Aug 2015, 23:33
by theonlylawislove
In windows, if I use telnet, it only works with the bridge/dhcp network. Telnet'ing to my port via host-only adapter does not work.