Linux 防火墙

时间:2021-08-18 15:10:30   收藏:0   阅读:24

查看防火墙的状况

service iptables status

开启与关闭防火墙

1) 永久生效

开启: chkconfig iptables on
    chkconfig ip6tables on ---针对ipv6
关闭: chkconfig iptables off
    chkconfig ip6tables off ---针对ipv6

2) 即时生效,重启后失效
开启: service iptables start
关闭: service iptables stop

3) Centos7.0 以后不再使用 service, 而是systemctl
状态:systemctl status firewalld
开启:systemctl start firewalld
关闭:systemctl stop firewalld

 

原文:https://www.cnblogs.com/ghostnet/p/15156175.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!