centos 7 配置firewalld开放端口的问题

damenwudia 2018-03-27 10:13:10
各位大佬好,小弟装了一个centos7的虚拟机(用的oracle的 vbox),并在里边装了一个db2数据库。现在想开放50000端口,然后通过主机的客户端去连虚拟机里的数据库。但是我搜了很多firewalld开放端口的资料,配置完了还是无法访问。。还请大佬给予指点,不胜感激!PS:已将iptalbes屏蔽了
下边是配置的结果及链接情况:

...全文
1559 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
damenwudia 2018-04-12
  • 打赏
  • 举报
回复
感谢各位大佬指导,结贴了~
cqyy725 2018-04-08
  • 打赏
  • 举报
回复
引用 3 楼 yyshenlijun 的回复:
同求 刚刚新安装的 linux contos7 为什么开启不了SELinux enable # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=enforcing # SELINUXTYPE= can take one of three two values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection. SELINUXTYPE=targeted setenforce 1 后显示 setenforce: SELinux is disabled
这个是要重启系统的
cqyy725 2018-04-08
  • 打赏
  • 举报
回复
firewalld-cmd --permanent --zone=public --add-port=5000/tcp 配置完成后 firewalld-cmd --reload 一下就可以了 你在xml里面配置的时候要选择zone 我看你的zone是选择的dmz区所以你访问不到,还是用命令吧
yyshenlijun 2018-04-08
  • 打赏
  • 举报
回复
同求 刚刚新安装的 linux contos7 为什么开启不了SELinux enable # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=enforcing # SELINUXTYPE= can take one of three two values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection. SELINUXTYPE=targeted setenforce 1 后显示 setenforce: SELinux is disabled
damenwudia 2018-03-27
  • 打赏
  • 举报
回复
自己找到原因了。。配置没有问题。。问题出在服务和端口上。我安装了两遍db2,第二次db2的端口设为了50001,我一直想开通50000肯定不成功,改为50001就可以了。。字节接分。。

19,614

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧