mthoutai

宿主机:

Mac OS 10.9.2

虚拟机:

[root@localhost ~]# cat /etc/redhat-release 

CentOS release 6.4 (Final)

[root@localhost ~]# uname -a

Linux localhost.localdomain 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

虚拟机是通过vagrant up启动的

port映射已经在Vagrantfile里配置

   config.vm.network :forwarded_port, guest: 80, host: 9098


而且打开局域网内能够訪问

   config.vm.network :public_network

问题:

宿主机无法连接到虚拟机。


解决方法:
关闭虚拟机的防火墙

[root@localhost ~]# service iptables stop

iptables: Flushing firewall rules:                         [  OK  ]

iptables: Setting chains to policy ACCEPT: filter          [  OK  ]

iptables: Unloading modules:                               [  OK  ]


分类:

技术点:

相关文章:

  • 2021-08-13
  • 2022-01-03
  • 2021-12-16
  • 2021-06-18
  • 2022-12-23
  • 2021-09-10
  • 2021-10-07
  • 2021-05-04
猜你喜欢
  • 2021-12-22
  • 2022-01-01
  • 2021-10-13
  • 2021-05-21
  • 2022-12-23
  • 2022-01-19
  • 2021-10-18
相关资源
相似解决方案