zoukankan      html  css  js  c++  java
  • linux(5)-关闭防火墙命令

    关闭服务器上的防火墙:

    /etc/init.d/iptables stop 

    PS:如若访问不了,有可能是防火墙开启的原因,则需关闭防火墙

    systemctl status firewalld  查看防火墙状态,如果开启则需关闭
    systemctl stop firewalld    暂时关闭防火墙
    systemctl disable firewalld   永久关闭防火墙

    实际上对防火墙还是不了解,每次虚拟机重启都需要执行

    service iptables stop

    systemctl disable firewalld   永久关闭防火墙   也不知道是哪句起了作用!!

    此处我遇到了问题:
    CentOS 7 执行service iptables start出现redirecting to systemctl ...Failed to ...not loaded.

    在centOS 7系统中运行

    service iptables stop

    发现出错:出现redirecting to systemctl ...Failed to ...not loaded.

    解决办法

    1. 使用systemctl

    systemctl [start|stop|restart|save|status] iptables.service

    2. 安装iptables-services

    切换到root用户下,执行:

    yum install iptables-services
    systemctl enable iptables.service //设置开机启动

    之后就可以使用以下指令了:

    service iptables [start|stop|restart|save|status]

    iptables常用命令

    查看是否已经安装了iptables以及iptables版本号 

    iptables -V (注意:V是大写字母V)
     

    关闭iptables

    service iptables stop


    启动iptables

    service iptables start


    重启iptables

    service iptables restart

  • 相关阅读:
    设计数据库步骤
    sql练习题
    多表连接查询
    数据约束
    管理并行SQL执行的进程
    关于Oracle数据库后台进程
    配置数据库驻留连接池
    为共享服务器配置Oracle数据库
    关于数据库驻留连接池
    关于专用和共享服务器进程
  • 原文地址:https://www.cnblogs.com/yiyaxuan/p/12450416.html
Copyright © 2011-2022 走看看