不能从其他机器访问RHEL5.5上的Tomcat 6
2016-01-31 18:26
399 查看
在RHEL5上安装了tomcat6, 启动之后,本机可以访问,但从其他机器访问不了,原来是iptables的问题。
1.环境:
vmware workstation 7.1.2 build-301548
RedHat Enterprise Linux 5.5
apache-tomcat-6.0.30
jdk1.6.0_22
2.问题描述:
在RHEL5上安装了tomcat6, 启动之后,本机可以访问,但从其他机器访问不了。
3.RHEL5安装后默认的ittables规则:
[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.解决办法:
删除当前INPUT链上的规则
iptables -F INPUT
增加两条INPUT链上规则,针对tcp的80和8080端口(8080是tomcat的默认端口)
iptables -A INPUT -p tcp -s 0/0 --dport 80 -j ACCEPT
iptables -A INPUT -p tcp -s 0/0 --dport 8080 -j ACCEPT
1.环境:
vmware workstation 7.1.2 build-301548
RedHat Enterprise Linux 5.5
apache-tomcat-6.0.30
jdk1.6.0_22
2.问题描述:
在RHEL5上安装了tomcat6, 启动之后,本机可以访问,但从其他机器访问不了。
3.RHEL5安装后默认的ittables规则:
[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.解决办法:
删除当前INPUT链上的规则
iptables -F INPUT
增加两条INPUT链上规则,针对tcp的80和8080端口(8080是tomcat的默认端口)
iptables -A INPUT -p tcp -s 0/0 --dport 80 -j ACCEPT
iptables -A INPUT -p tcp -s 0/0 --dport 8080 -j ACCEPT
相关文章推荐
- source命令执行SQL脚本文件
- 方便的IE源代码工具Instant Source
- 远程控制 RemotelyAnywhere v8.0.605 附注册码
- mysql source 命令导入大的sql文件的方法
- Mysql导入导出工具Mysqldump和Source命令用法详解
- Windows 下Spark 快速搭建Spark源码阅读环境
- Dalian University of Technology sourcelist
- 源码阅读——十个C开源项目
- 巧妙解决:access denied (javax.management.MBeanTrust...
- 让/etc/profile文件修改后立即生效
- 源码安装 vim
- 让source insight 搜索到.S的文件 高亮AT&T ASM 文件keyword的方法 sourceinsight技巧
- 用WINDOWS自带IP安全策略,指定ip访问数据库1433端口
- 17个新手常见Python运行时错误
- linux修改hiistory历史命令记录
- Linux中exec命令相关
- fork, exec, source
- 45 个非常有用的 Oracle 查询语句
- GHO镜像文件制作
- yum 报错 warning: rpmts_HdrFromFdno: Header V3 DSA signature: