Centos7防火墙问题及端口说明

p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px ".PingFang SC"; color: #454545 }
p.p2 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px "Helvetica Neue"; color: #454545 }
p.p3 { margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify; font: 12.0px "Helvetica Neue"; color: #454545 }
p.p4 { margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify; font: 12.0px ".PingFang SC"; color: #454545 }
p.p5 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px "Helvetica Neue"; color: #454545; min-height: 14.0px }
span.s1 { font: 12.0px "Helvetica Neue" }
span.s2 { font: 12.0px ".PingFang SC" }

1、zookeeper3个端口说明:

(1)2181:对client端提供服务;

(2)3888:选举leader使用;

(3)2888:集群内机器通讯使用(Leader监听此端口);

2、centos7无法启动防火墙的问题:

systemctl unmask firewalld.service     不屏蔽firewall服务

systemctl stop firewalld.service

systemctl start firewalld.service

查看防火墙状态的命令:

firewall-cmd --state

3、在centos7上部署的python项目,不要轻易启动防火墙,有可能外网无法访问;如果要开启防火墙,

则开放指定端口访问:c;

然后firewall-cmd --reload

4、启动nginx服务命令:systemctl restart  nginx.service

原文地址:https://www.cnblogs.com/haoxinchen/p/9664524.html

时间: 2024-07-30 15:15:14

Centos7防火墙问题及端口说明的相关文章

Centos7防火墙快速开放端口配置方法

▲这篇文章主要为大家详细介绍了Centos7防火墙开放端口的快速方法,具有一定的参考价值,感兴趣的小伙伴们可以参考一下! 例如安装Nagios后,要开放5666端口与服务器连接,命令如下 [[email protected] ~]# firewall-cmd --add-port=5666/tcp 即时打开,这里也可以是一个端口范围,如1000-2000/tcp success [[email protected] ~]# firewall-cmd --permanent --add-port=

CentOS 6、CentOS7 防火墙开放指定端口

当我们在CentOS服务器中装了一些开发环境(如 tomcat.mysql.nginx 等...)时,希望能从外界访问,就需要配置防火墙对指定端口开放. CentOS 6.51.开放指定端口/sbin/iptables -I INPUT -p tcp --dport 端口号 -j ACCEPT   //写入修改/etc/init.d/iptables save                                       //保存修改service iptables restart

Centos6与Centos7防火墙设置与端口开放的方法

Centos升级到7之后,内置的防火墙已经从iptables变成了firewalld.所以,端口的开启还是要从两种情况来说明的,即iptables和firewalld.更多关于CentOs防火墙的最新内容,请参考Redhat官网. 一.iptables 1.打开/关闭/重启防火墙 开启防火墙(重启后永久生效):chkconfig iptables on 关闭防火墙(重启后永久生效):chkconfig iptables off 开启防火墙(即时生效,重启后失效):service iptables

Centos7防火墙开启3306端口

CentOS7的默认防火墙为firewall,且默认是不打开的. systemctl start firewalld # 启动friewall systemctl status firewalld # 查看firewall启动情况 firewall-cmd --zone=public --add-port=3306/tcp --permanent # 开启3306端口 firewalld   # firewall-cmd --reload 重启 firewall-cmd --query-port

CentOS6、CentOS7 防火墙开放、关闭端口

当我们在CentOS服务器中装了一些开发环境(如 tomcat.mysql.nginx 等...)时,希望能从外界访问,就需要配置防火墙对指定端口开放. CentOS 6.5 1.开放指定端口/sbin/iptables -I INPUT -p tcp --dport 端口号 -j ACCEPT   //写入修改/etc/init.d/iptables save                                       //保存修改service iptables restar

centos6和centos7防火墙的关闭

CentOS6.5查看防火墙的状态: [[email protected] ~]$service iptable status 显示结果: [[email protected] ~]$service iptable status Redirecting to /bin/systemctl status iptable.service ● iptable.service Loaded: not-found (Reason: No such file or directory) Active: in

CentOS7 防火墙 firewall-cmd

最小化安装 CentOS7 后,很多端口默认是不打开的,需要通过  firewall-cmd   把这些端口打开. 检查防火墙状态 # firewall-cmd --state running 关闭防火墙 # systemctl stop firewalld # firewall-cmd --state not running 查看开放端口列表 # firewall-cmd --list-allpublic (default, active) interfaces: docker0 enp0s3

详解centos6和centos7防火墙

CentOS6.5查看防火墙的状态: ? 1 [[email protected] ~]$service iptable status 显示结果: ? 1 2 3 4 5 6 7 8 9 [[email protected] ~]$service iptable status Redirecting to /bin/systemctl status iptable.service iptable.service   Loaded: not-found (Reason: No such file

CentOS7环境下SSH端口修改笔记

CentOS7环境下SSH端口修改笔记 说明: CentOS7服务器环境,默认SSH端口为22,考虑到安全方面问题,欲修改端口为62231(机器内网IP为192.168.1.31) ssh配置文件和iptables中端口开放配置调整时,原先的先不要移除,显式的同时打开22和62231端口,待配置完成确认62231端口访问正常后再逐个移除22端口的配置,防止配置过程中出现差错导致服务器访问不了. 一.SELinux配置修改 1.先检查SELinux状态,如果已关闭则无需相关修改 [[email p