Quantcast
Channel: Ubuntu Forums - Virtualisation
Viewing all articles
Browse latest Browse all 4211

[SOLVED] Can't access Apache on VM from Host!

$
0
0
Hello. I will try to explain the scenario as much as I can.

My Host is Xubuntu 18.04.4 . I have two VM of Ubuntu Server 18.04.4 on VirtualBox.

Both VM were installed with two Network cards. One card configured with NAT with DHCP. The second card with Host-Only and Fix IP, DHCP on Host Network manager disable.

In one server I have installed apache2, I already opened UFW ports for apache.

The problem is, I can ping from my host (xubuntu) to the server where I have installed apache, but I can't open apache default page from a web Browser in my host.

What am I missing?

Here are some information:

Code:

galactus@NorrinRadd:/var/www/html$ tracepath 192.168.56.60  (IP from Server with Apache in VirtualBox)
1:  NorrinRadd                                            0.093ms reached
    Resume: pmtu 65535 hops 1 back 1


Code:

galactus@NorrinRadd:/var/www/html$ ifconfig
enp7s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether a4:1f:72:ff:9f:f0  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 5982  bytes 830433 (830.4 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5982  bytes 830433 (830.4 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vboxnet0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.56.50  netmask 255.255.255.0  broadcast 192.168.56.255
        inet6 fe80::800:27ff:fe00:0  prefixlen 64  scopeid 0x20<link>
        ether 0a:00:27:00:00:00  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1055  bytes 217873 (217.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vboxnet1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.56.60  netmask 255.255.255.0  broadcast 192.168.56.255
        inet6 fe80::800:27ff:fe00:1  prefixlen 64  scopeid 0x20<link>
        ether 0a:00:27:00:00:01  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 869  bytes 165061 (165.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp6s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.43.194  netmask 255.255.255.0  broadcast 192.168.43.255
        inet6 fe80::5dd4:6783:f7b9:a55c  prefixlen 64  scopeid 0x20<link>
        ether 54:35:30:fe:d9:01  txqueuelen 1000  (Ethernet)
        RX packets 828237  bytes 1089377733 (1.0 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 363005  bytes 46042746 (46.0 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

galactus@NorrinRadd:/var/www/html$

Code:

galactus@NorrinRadd:/var/www/html$ ping -c 4 192.168.56.50
PING 192.168.56.50 (192.168.56.50) 56(84) bytes of data.
64 bytes from 192.168.56.50: icmp_seq=1 ttl=64 time=0.068 ms
64 bytes from 192.168.56.50: icmp_seq=2 ttl=64 time=0.063 ms
64 bytes from 192.168.56.50: icmp_seq=3 ttl=64 time=0.058 ms
64 bytes from 192.168.56.50: icmp_seq=4 ttl=64 time=0.065 ms

--- 192.168.56.50 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3031ms
rtt min/avg/max/mdev = 0.058/0.063/0.068/0.008 ms

And yes, I can't use NAT for port forwarding and I can't use Bridge mode on network card!!! Host-Only!


Why? Because this is an assignment from College!

The worst thing is that this work when Windows is the Host system!

Viewing all articles
Browse latest Browse all 4211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>