centos7 防火墙 错误 (坑)
2016-03-30 19:17
477 查看
centos7中 防火墙以及端口号的 启动。
1、centos7中 取消了iptables ,只能使用firewall。
2、安装tomcat 后,并启动tomcat,发现访问不通,检查tomcat配置文件,端口号没错是8080,
确认端口号是否启用,telnet 182.169.*.*(虚拟机ip) 8080, 无法使用,
使用 firewall-cmd --query-port=8081 确认8080 是否开启
结果:bad port (most likely missing protocol), correct syntax is portid[-portid]/protocol
!!! 这是什么鬼,端口坏掉了吗!!!
百度也没有找到找到有人碰到我这种情况,谷歌到是有人提出过这个问题,但是也只是提交BUG的页面,没有给出解决的方案。
https://bugzilla.redhat.com/show_bug.cgi?id=1274961(翻墙。。)
在我都打算重装系统,回退到centos6的时候,想到是不是可以关闭掉防火墙,禁用firewall,而改用iptables呢?
感谢:http://www.linuxidc.com/Linux/2015-03/114749.htm
安装iptables-services,然后禁用firewalld。
yum install -y iptables-services
安装iptables-services
systemctl mask firewalld
禁用firewalld
systemctl enable iptables
systemctl enable ip6tables
启动iptables
systemctl stop firewalld
暂停firewalld
systemctl start iptables
systemctl start ip6tables
开启iptables
到现在开始,我们就可以配置iptables规则。
然后访问重新启动telnet 8080 端口,终于能访问通了,启动tomcat,终于看到那只猫了。。。。
关于 bad prot 的 问题,其实还是没有解决,只是想办法避开了这个问题,如果解决不了的话,还是考虑降版本。。。。
1、centos7中 取消了iptables ,只能使用firewall。
2、安装tomcat 后,并启动tomcat,发现访问不通,检查tomcat配置文件,端口号没错是8080,
确认端口号是否启用,telnet 182.169.*.*(虚拟机ip) 8080, 无法使用,
使用 firewall-cmd --query-port=8081 确认8080 是否开启
结果:bad port (most likely missing protocol), correct syntax is portid[-portid]/protocol
!!! 这是什么鬼,端口坏掉了吗!!!
百度也没有找到找到有人碰到我这种情况,谷歌到是有人提出过这个问题,但是也只是提交BUG的页面,没有给出解决的方案。
https://bugzilla.redhat.com/show_bug.cgi?id=1274961(翻墙。。)
在我都打算重装系统,回退到centos6的时候,想到是不是可以关闭掉防火墙,禁用firewall,而改用iptables呢?
感谢:http://www.linuxidc.com/Linux/2015-03/114749.htm
安装iptables-services,然后禁用firewalld。
yum install -y iptables-services
安装iptables-services
systemctl mask firewalld
禁用firewalld
systemctl enable iptables
systemctl enable ip6tables
启动iptables
systemctl stop firewalld
暂停firewalld
systemctl start iptables
systemctl start ip6tables
开启iptables
到现在开始,我们就可以配置iptables规则。
然后访问重新启动telnet 8080 端口,终于能访问通了,启动tomcat,终于看到那只猫了。。。。
关于 bad prot 的 问题,其实还是没有解决,只是想办法避开了这个问题,如果解决不了的话,还是考虑降版本。。。。
相关文章推荐
- 嵌入式linux:Ubuntu12.04 root用户登录设置
- Linux内核分析实验六
- Linux具体权限规划之ACL(Access Control List)
- 《linux内核设计与实现》读书笔记第三章
- 常见linux笔试题-100道选择题-(答案见最后)
- 《Linux内核分析》第六课笔记
- Linux学习笔记--less命令(显示文件内容的命令)
- centos安装pip
- centos svn服务器搭建
- linux 实现输出重定向(printf 打印,输出到指定文件(不输出到终端))
- linux下创建目录,清空目录文件
- linux命令笔记
- Linux与windows之间实现文件共享
- linux云服务器信息查看
- LINUX - CUT
- 系统管理员需知:25个Linux服务器安全技巧(转)
- linux正则表达式BRE
- linux的kobject分析
- Makefile选项CFLAGS,LDFLAGS,LIBS
- Linux-- 简单的程序守护脚本,程序异常退出后自动重启