首页 > 其他 > 详细

CenOS下Tomcat外网不能访问

时间:2014-06-28 12:57:13      阅读:355      评论:0      收藏:0      [点我收藏+]

今天在CentOS下部署了一个Tomcat,启动没问题,但是外网不能访问,检查知防火墙开了。

1.检查防火墙是否开启,执行

/etc/init.d/iptables status

如果有下面结果,表示防火墙开启。

[root@yyl bin]# /etc/init.d/iptables status
表格:filter
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
2 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0
3 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
4 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
5 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
num target prot opt source destination
1 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
num target prot opt source destination

 

2.关闭防火墙

/etc/init.d/iptables stop

 然后Tomcat就能访问了。

 

 

CenOS下Tomcat外网不能访问,布布扣,bubuko.com

CenOS下Tomcat外网不能访问

原文:http://www.cnblogs.com/baby-bear/p/3798706.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!