I configured a stroller with a virtual box with the given Vagrantfile parameters below. I can connect to a web server running on a virtual machine from the host machine (HM).
I can also ping the server from the network computer, but when I try to access the web server from the network, the virtual machine (VM) receives a request and says that it responds (apache), but the network computer (NM) does not receive a response.
How do I configure a firewall or virtual box to access from NM? I tried changing eth1 to eth0 in the VM interfaces file, but it did not work. The tramp leans toward the car.
Thanks in advance
Vagrantfile:
config.vm.define "web" do |web| web.vm.box = "raring" web.vm.network "public_network", ip: "192.168.0.53", bridge: 'eth0' web.vm.provider "virtualbox" do |v| v.customize ["modifyvm", :id, "--memory", 1024] end end
Host interface
eth0 Link encap:Ethernet HWaddr 54:04:a6:68:7d:85 inet addr:192.168.0.102 Bcast:255.255.255.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:576 Metric:1 RX packets:142100 errors:0 dropped:0 overruns:0 frame:0 TX packets:110704 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:61653460 (61.6 MB) TX bytes:14976111 (14.9 MB) Interrupt:55 Base address:0xa000
Virtual machine interface
eth0 Link encap:Ethernet HWaddr 08:00:27:49:4c:f1 inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fe49:4cf1/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:386 errors:0 dropped:0 overruns:0 frame:0 TX packets:276 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:41117 (41.1 KB) TX bytes:36296 (36.2 KB) eth1 Link encap:Ethernet HWaddr 08:00:27:c3:16:90 inet addr:192.168.0.53 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fec3:1690/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:946 errors:0 dropped:0 overruns:0 frame:0 TX packets:1017 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:116117 (116.1 KB) TX bytes:90515 (90.5 KB)
virtual machine file / etc / network / interfaces:
# The primary network interface auto eth0 iface eth0 inet dhcp #VAGRANT-BEGIN # The contents below are automatically generated by Vagrant. Do not modify. auto eth1 iface eth1 inet static address 192.168.0.53 netmask 255.255.255.0 #VAGRANT-END
apache answer in virtual machine:
192.168.0.100 - - [16/Nov/2013:10:39:10 +0000] "GET / HTTP/1.1" "curl/7.32.0" 200 7466 6005
vagrant virtualbox
bugdayci
source share