Teng's blog Teng's blog
首页
Java
H5前端
GitHub (opens new window)
首页
Java
H5前端
GitHub (opens new window)
  • 介绍

  • 安装

    • 安装VMware
    • 安装Centos
    • 配置网络
    • 安装Xshell
    • 附-克隆虚拟机
    • 附-配置ssh
    • 附-安装JDK
    • 附-防火墙设置
      • Centos7
      • Centos6
        • 永久操作
        • 临时操作
  • 基础

  • shell

  • 面试与总结
  • System-Linux
  • 安装
Shetengteng
2022-02-26

附-防火墙设置

# Centos7

查看状态

  • 表示防火墙开启中 active (running)
  • 表示防火墙关闭中 inactive (dead)
[root@linux101 module]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
   Active: active (running) since 四 2022-04-07 23:02:26 CST; 22h ago
     Docs: man:firewalld(1)
 Main PID: 802 (firewalld)
    Tasks: 2
   CGroup: /system.slice/firewalld.service
           └─802 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid

4月 07 23:02:24 linux101 systemd[1]: Starting firewalld - dynamic firewall daemon...
4月 07 23:02:26 linux101 systemd[1]: Started firewalld - dynamic firewall daemon.

# 或者
[root@linux101 zookeeper]# firewall-cmd --state
running
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

开启防火墙

systemctl start firewalld
1

关闭防火墙

systemctl stop firewalld
1

永久关闭防护墙

systemctl disable firewalld.service
1

# Centos6

# 永久操作

# 查看防火墙状态
chkconfig iptables --list
iptables  0:关闭	1:关闭	2:启用	3:启用	4:启用	5:启用	6:关闭
# 关闭防火墙
chkconfig iptables off
# 再查看防火墙状态
chkconfig iptables --list
iptables  0:关闭	1:关闭	2:关闭	3:关闭	4:关闭	5:关闭	6:关闭
1
2
3
4
5
6
7
8

# 临时操作

# 查看防火墙状态
service iptables status
# 临时关闭防火墙
service iptables stop
1
2
3
4
Last Updated: 2022/05/15, 15:38:49
附-安装JDK
Linux目录结构

← 附-安装JDK Linux目录结构→

Theme by Vdoing | Copyright © 2021-2022 Shetengteng | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式