linux centos系统开启和关闭防火墙命令 |
您所在的位置:网站首页 › centos79防火墙 › linux centos系统开启和关闭防火墙命令 |
CentOS:首先查看防火墙状态:service iptables status 永久性生效,重启后不会复原开启:chkconfig iptables on关闭:chkconfig iptables off 即时生效,重启后复原开启:service iptables start关闭:service iptables stop设置后重启:reboot 临时关闭防火墙systemctl stop firewalld永久关闭防火墙的开机自启动systemctl disable firewalld临时打开防火墙systemctl start firewalld防火墙开机启动systemctl enable firewalld查看防火墙状态 CentOS7开启和关闭端口开启2333端口firewall-cmd –zone=public –add-port=2333/tcp –permanent更新防火墙规则使刚刚添加的2333端口生效firewall-cmd –reload查看开放的端口列表firewall-cmd –list-ports关闭2333端口firewall-cmd –zone=public –remove-port=2333/tcp –permanent更新防火墙规则使用刚刚删除的端口关闭firewall-cmd –reload 相关文章: Linux CentOS 6/7/8 服务器绑定添加新IP地址 linux服务器修改 SSH 端口及对应的防火墙设置 Linux 系统服务器挂载第二块硬盘方法 宝塔面板重启不了apache,出现错误:httpd not running, trying to start Linux服务器运维常用命令列表 linux系统服务器管理最常用的150个命令 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |