警惕CentOS7防火墙
警惕CentOS7防火墙
[root@localhost bin]# ls
bash-java-utils.jar flink historyserver.sh kubernetes-session.sh mesos-taskmanager.sh sql-client.sh start-scala-shell.sh stop-zookeeper-quorum.sh zookeeper.sh
config.sh flink-console.sh jobmanager.sh mesos-appmaster-job.sh pyflink-gateway-server.sh standalone-job.sh start-zookeeper-quorum.sh taskmanager.sh
find-flink-home.sh flink-daemon.sh kubernetes-entry.sh mesos-appmaster.sh pyflink-shell.sh start-cluster.sh stop-cluster.sh yarn-session.sh
[root@localhost bin]# sh start-cluster.sh
/opt/flink-1.10.1/bin/config.sh: line 32: syntax error near unexpected token `<'
/opt/flink-1.10.1/bin/config.sh: line 32: ` done < <(find "$FLINK_LIB_DIR" ! -type d -name '*.jar' -print0 | sort -z)'
[root@localhost bin]# ./start-cluster.sh
Starting cluster.
[INFO] 1 instance(s) of standalonesession are already running on localhost.localdomain.
Starting standalonesession daemon on host localhost.localdomain.
Starting taskexecutor daemon on host localhost.localdomain.
[root@localhost bin]# netstsat -tnpl
bash: netstsat: command not found...
[root@localhost bin]# netstat -tnpl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1072/rpcbind
tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN 2068/dnsmasq
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1584/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1588/cupsd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1937/master
tcp6 0 0 :::39485 :::* LISTEN 17362/java
tcp6 0 0 :::40002 :::* LISTEN 17362/java
tcp6 0 0 :::43431 :::* LISTEN 17691/java
tcp6 0 0 :::37705 :::* LISTEN 17691/java
tcp6 0 0 127.0.0.1:40938 :::* LISTEN 17691/java
tcp6 0 0 :::6123 :::* LISTEN 17362/java
tcp6 0 0 :::111 :::* LISTEN 1072/rpcbind
tcp6 0 0 :::8081 :::* LISTEN 17362/java
tcp6 0 0 :::22 :::* LISTEN 1584/sshd
tcp6 0 0 ::1:631 :::* LISTEN 1588/cupsd
tcp6 0 0 ::1:25 :::* LISTEN 1937/master
[root@localhost bin]# firewall-cmd --zone=public --list-ports
[root@localhost bin]# firewall-cmd --zone=public --add-port=8081/tcp --permanent
success
[root@localhost bin]# firewall-cmd --state
running
[root@localhost bin]# firewall-cmd --reload
success
[root@localhost bin]#
备注:
1、开放关闭端口
firewall-cmd --zone=public --add-port=5672/tcp --permanent # 开放5672端口
firewall-cmd --zone=public --remove-port=5672/tcp --permanent #关闭5672端口
firewall-cmd --reload # 配置立即生效
2、查看防火墙所有开放的端口
firewall-cmd --zone=public --list-ports
3.、关闭防火墙
如果要开放的端口太多,嫌麻烦,可以关闭防火墙,安全性自行评估
systemctl stop firewalld.service
4、查看防火墙状态
firewall-cmd --state
推荐阅读
-
警惕CentOS7防火墙
-
VNC Viewer 10061, connection refused 博客分类: Linux linux vncviewer 防火墙 10061
-
centos7下 Mysql+Keepalived 双主热备高可用图文配置详解
-
华为网络----防火墙双机热备实验(VGMP、HRP协议)
-
centos6、centos7下的jenkins+maven3+webpack环境变量问题 maven3webpackjenkinscentosnpm
-
Centos7安装Cassandra
-
防火墙设置
-
centos7安装zabbix4.4(zabbix-agent)
-
centos7安装与使用influxdb1.7.8
-
防火墙设置