Host hosts failed to access XAMPP built sites in virtual machines

Source: Internet
Author: User
Tags iptables

Recently in Vmbox virtual fedaro18 inside built a XAMPP environment, and in the inside configured well Testlink

Found in the virtual machine can be accessed, but to the outside of the host but found inaccessible

Ping the IP address in the virtual machine can be ping

and the Apache server in the XAMPP environment defaults to port 80.

The initial guess is the 80 port of the virtual machine, which is blocked by the virtual machine's firewall.

So enter in the shell:

/sbin/iptables-i input-p TCP--dport 80-j ACCEPT

And then restart the Apache in XAMPP.

/opt/lampp/xampp stop

/opt/lampp/xampp start

Alternatively, if you do not want to run the command every time you start, you can edit the configuration/etc/sysconfig/iptables file and add a:

-I input-m state--state new-m tcp-p TCP--dport 80-j ACCEPT

Then reboot the firewall:

/etc/init.d/iptables  Stop
/etc/init.d/iptables  start


Once again, you can access the

Reference Address:

Http://www.2cto.com/os/201207/138564.html


Similar problems;

http://blog.csdn.net/lyhdream/article/details/40711129





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.