CentOS virtual machines can ping each other, but cannot access virtual machine services

Source: Internet
Author: User

CentOS virtual machines can ping each other, but cannot access virtual machine services

Virtual Machine ip:192.168.0.57
Host ip:192.168.0.80

Build PHP environment on virtual machine, virtual machine CentOS, host Win7
Virtual machines-Hosts can ping each other, but the host cannot access the virtual machine:
Visit your own build website return: Unreachable (checked Apache running status: running); then I direct browser input IP address, also return: Unable to access, OK server problem, not site building problem

Reason:
To see if virtual machine 80 port is shielded: Telnet 192.168.0.57 80
Back: On port 80: Connection Failed
Description: The virtual machine's firewall blocked 80 ports, so the host could not access the Web site that we deployed on the virtual machine

* * Solution:
Firewall with CentOS off (directory:/ect/init.d/iptables)
Service Iptables stop**

You can also set the firewall to shut down permanently:
To view the currently running system level: RunLevel, 3
3 Mode off firewall: Chkconfig–level 3 iptables off
You can view the initial startup status under various RunLevel of iptables now: Chkconfig, you can see 3 off, table name 3 level is the default shutdown firewall, if you want to use manual open: Service iptables start

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

CentOS virtual machines can ping each other, but cannot access virtual machine services

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.