zoukankan      html  css  js  c++  java
  • centos 7 防火墙firewall 与iptables 的一些常用命令

    CentOS 7的防火墙配置跟以前版本有很大区别,CentOS7这个版本的防火墙默认使用的是firewall,与之前的版本使用iptables不一样。

    firewall常用命令
    
    service firewalld restart     重启
    service firewalld start     开启
    service firewalld stop     关闭
    service firewalld status     状态
    
    也可以使用这些命令
    (.service 可有可无)
    systemctl restart firewalld.service      重启
    systemctl start firewalld.service        启动
    systemctl stop firewalld.service       关闭
    systemctl status firewalld.service    状态
    
    (.service 可有可无)
    systemctl disable firewalld.service    禁止开机自启
    
    systemctl enable firewalld.service    允许开机自启
    
    查看运行状态
    firewall-cmd --state
    
    查看防火墙规则
    firewall-cmd --list-all 
    
    
    firewall切换为iptables防火墙
    
    service firewalld stop        关闭
    systemctl disable firewalld.service     禁止firewall开机启动
    
    iptables简介
    iptables 一般在/etc/sysconfig/iptables
    
    iptables常用命令
    
    service   iptables status    状态
    service   iptables stop    关闭
    service   iptables start    启动
    service   iptables restart    重启
    chkconfig   iptables off     禁止开机自启
    chkconfig   iptables on    允许开机自启
  • 相关阅读:
    会议记录
    周总结
    团队博客
    周总结
    移动端疫情展示
    代码规范
    阅读笔记2
    解决 import numpy as np ModuleNotFoundError: No module named 'numpy'错误
    周总结
    爬取最新疫情数据
  • 原文地址:https://www.cnblogs.com/linhuaming/p/9047317.html
Copyright © 2011-2022 走看看