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

  • 相关阅读:
    4、java变量、函数、基本类型的值传递、分支、循环、流程控制
    mysql-数据库维护
    mysql-安全管理
    mysql-管理事务
    mysql-触发器
    mysql-游标
    mysql-过程与函数
    ViewPager 带动画的欢迎界面
    Pull to RefreshListView 添加HeaderView
    解决 listView gridView 与ScrollView嵌套时的冲突
  • 原文地址:https://www.cnblogs.com/yiyaxuan/p/12450416.html
Copyright © 2011-2022 走看看