In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article shows you how to use Tomcat 6 on RHEL5.5 that cannot be accessed from other machines. The content is concise and easy to understand. It will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
Tomcat6 is installed on RHEL5, and after startup, it can be accessed locally, but not from other machines. It turns out that it is the problem with iptables.
1. Environment:
Vmware workstation 7.1.2 build-301548
RedHat Enterprise Linux 5.5
Apache-tomcat-6.0.30
Jdk1.6.0_22
two。 Problem description:
Tomcat6 is installed on RHEL5, and after startup, it can be accessed locally, but not from other machines.
Default ittables rules after 3.RHEL5 installation:
[root@localhost] # iptables-L
Chain INPUT (policy ACCEPT)
Target prot opt source destination
RH-Firewall-1-INPUT all--anywhere anywhere
Chain FORWARD (policy ACCEPT)
Target prot opt source destination
RH-Firewall-1-INPUT all--anywhere anywhere
Chain OUTPUT (policy ACCEPT)
Target prot opt source destination
Chain RH-Firewall-1-INPUT (2 references)
Target prot opt source destination
ACCEPT all-anywhere anywhere
ACCEPT icmp-anywhere anywhere icmp any
ACCEPT esp-anywhere anywhere
ACCEPT ah-anywhere anywhere
ACCEPT udp-- anywhere 224.0.0.251 udp dpt:mdns
ACCEPT udp-anywhere anywhere udp dpt:ipp
ACCEPT tcp-anywhere anywhere tcp dpt:ipp
ACCEPT all-anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp-anywhere anywhere state NEW tcp dpt:ssh
REJECT all-anywhere anywhere reject-with icmp-host-prohibited
4. Solution:
Delete the rule on the current INPUT chain
Iptables-F INPUT
Add two INPUT chain rules for ports 80 and 8080 of tcp (8080 is the default port for tomcat)
Iptables-An INPUT-p tcp-s 0ax 0-- dport 80-j ACCEPT
Iptables-An INPUT-p tcp-s 0ax 0-- dport 8080-j ACCEPT
The above is that you cannot access Tomcat 6 on RHEL5.5 from other machines. Have you learned any knowledge or skills about how to use it? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.