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