- это не соответствует моему IP-адресу виртуальной машины, но все, кажется, в порядке.
ользовал Puphpet.com для развертывания локальной машины разработки Ubuntu 16.04 LAMP с VirtualBox 5.1.24. Я обновил / etc / hosts с помощью IP-адреса виртуальной машины (192.168.56.101).
$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 flippy
192.168.56.101 dev.mysite.com
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Я могу подключиться к виртуальной машине по SSH, но не могу получить к ней доступ через IP-адрес (192.168.56.101) или имя домена.
Пинг не проходит:
$ ping 192.168.56.101
PING 192.168.56.101 (192.168.56.101) 56(84) bytes of data.
^C
--- 192.168.56.101 ping statistics ---
164 packets transmitted, 0 received, 100% packet loss, time 166895ms
И завиток не получается
$ curl -v 192.168.56.101
* Rebuilt URL to: 192.168.56.101/
* Trying 192.168.56.101...
* connect to 192.168.56.101 port 80 failed: Connection timed out
* Failed to connect to 192.168.56.101 port 80: Connection timed out
* Closing connection 0
curl: (7) Failed to connect to 192.168.56.101 port 80: Connection timed out
Дополнительноnetstat -rn
на хост-машине не отображается маршрут для IP-адреса виртуальной машины:
$ netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 wlp1s0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 wlp1s0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wlp1s0
Что еще я могу проверить?