After centos is installed with tomcat, access the local file: http: // localhost: 8080. But cannot be accessed within the LAN

Source: Internet
Author: User

Problem description:
After centos is installed with tomcat, access the local file: http: // localhost: 8080. But cannot be accessed within the LAN

Cause:

/Etc/init. d/iptables status

Table: Filter
Chain input (Policy accept)
Num target prot opt source destination
1 RH-Firewall-1-INPUT all -- 0.0.0.0/0 0.0.0.0/0

Chain forward (Policy accept)
Num target prot opt source destination
1 RH-Firewall-1-INPUT all -- 0.0.0.0/0 0.0.0.0/0

Chain output (Policy accept)
Num target prot opt source destination

Chain RH-Firewall-1-INPUT (2 references)
Num target prot opt source destination
1 accept all -- 0.0.0.0/0 0.0.0.0/0
2 accept ICMP -- 0.0.0.0/0 0.0.0.0/0 ICMP Type 255
3 accept Esp -- 0.0.0.0/0 0.0.0.0/0
4 accept ah -- 0.0.0.0/0 0.0.0.0/0
5 accept UDP -- 0.0.0.0/0 224.0.0.20.udp DPT: 5353
6. Accept UDP -- 0.0.0.0/0 0.0.0.0/0 udp dpt: 631
7 access TCP -- 0.0.0.0/0 0.0.0.0/0 tcp dpt: 631
8 accept all -- 0.0.0.0/0 0.0.0.0/0 state related, established

9 accept TCP -- 0.0.0.0/0 0.0.0.0/0 state New tcp dpt: 22

10 reject all -- 0.0.0.0/0 0.0.0.0/0 reject-with ICMP-host-prohibited

A series of information is displayed, indicating that the firewall is on.

Solution:

/Etc/init. d/iptables stop

Flushing firewall rules: [OK]
Setting chains to policy accept: Filter [OK]
Unloading iptables modules: [OK]

Permanently disable :? Chkconfig -- level 35 iptables off

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.