I have server (Debian Squeeze) with 1 ethernet card and 2 public static IPs (220.127.116.11 and 18.104.22.168).
What I want: Setup virtual box (Ubuntu) with access via static IP (22.214.171.124).
What I was trying:
- config.vm.forward_port - good idea: setup interface "eth1:1" with 126.96.36.199 on host-machine, and add to Vagrant file "config.vm.forward_port = hmm..?"
- config.vm.network :hostonly, "188.8.131.52" - not working. Was created new interface on host-machine with ip "184.108.40.206". Of course 220.127.116.11 IP isn't mine and I can't access my server via this IP.
- config.vm.network :bridged - I'm confused how this works :)
What I have now: Not working configuration.
Debian-host-machine# cat Vagrantfile Vagrant::Config.run do |config| config.vm.define :gitlab do |box_config| box_config.vm.box = "ubuntu" box_config.vm.host_name = "ubuntu" box_config.vm.network :bridged box_config.vm.network :hostonly, "18.104.22.168", :auto_config => false end end Debian-host-machine# ifconfig eth1 Link encap:Ethernet HWaddr 00:15:17:69:71:bb inet addr:22.214.171.124 Bcast:126.96.36.199 Mask:255.255.248.0 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 vboxnet0 Link encap:Ethernet HWaddr 0a:00:27:00:00:00 inet addr:188.8.131.52 Bcast:184.108.40.206 Mask:255.255.255.0 Ubuntu-virtual-machine# ifconfig eth0 Link encap:Ethernet HWaddr 08:00:27:ee:8d:0c inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0 eth1 Link encap:Ethernet HWaddr 08:00:27:45:71:87 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0
How I can access virtual box via public static IP from network?
I'm using Oracle VM VirtualBox Manager 4.1.18 and Vagrant version 1.0.3.
Thanks in advance for your feedback.