Troubleshoot host Mac OS cannot connect to virtual machine CentOS

Source: Internet
Author: User
Tags config connect centos iptables firewall linux

Host:

Mac OS 10.9.2

Virtual machine:

[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 00:31:26 UTC 2013 x86_64 x86_64 x86_64 gnu/linux

The virtual machine is started by vagrant up

Port mapping is already configured in Vagrantfile

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

and open the LAN to access

Config.vm.network:p Ublic_network

Problem:

The host cannot connect to the virtual machine.

Workaround:

Turn off the virtual machine's firewall

[root@localhost ~]# service iptables stop

iptables:flushing firewall rules: [OK]

Iptables:setting chains to Policy Accept:filter [OK]

iptables:unloading modules: [OK]

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/Servers/virtualization/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.