Play Linux-CentOS 6.5,tomcat cannot be accessed remotely

Source: Internet
Author: User

Problem description :
CentOS 6.5 Installation Complete Tomcat after accessing the Local: http://localhost:8080/is correct, but the LAN is inaccessible。

reason :

/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.251 UDP dpt:5353
6 ACCEPT UDP--0.0.0.0/0 0.0.0.0/0 UDP dpt:631
7 ACCEPT 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
Ten REJECT All--0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

will get a series of messages stating that the firewall is open.

Workaround 1:

/etc/init.d/iptables stop

Flushing firewall rules: [OK]
Setting chains to Policy Accept:filter [OK]
Unloading iptables modules: [OK]

permanently closed:

chkconfig--level iptables off

Workaround 2:  

1. Modify the file/etc/sysconfig/iptables

# cd/etc/sysconfig/
# VI Iptables

Add a line:

-A rh-firewall-1-input-m State--state new-m tcp-p TCP--dport 8080-j ACCEPT

Iptables Service Restart:

# Service Iptables Restart


Play Linux-CentOS 6.5,tomcat cannot be accessed remotely

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.