因为在开发中有windows需要频繁连接虚拟机Linux等操作,比如windows连接虚拟机的redis失败,把防火墙关了就行了。,所以索性直接关闭防火墙,省的次次都得搞一遍。
我目前用的是CentOS8,以下是CentOS8命令:
1.查看防火墙状态
service iptablesstatus
2.暂时关闭防火墙
service iptablesstop
3.重启防火墙
service iptables restart
4.永久关闭防火墙
chkconfig iptables off
5.永久关闭后重启
chkconfig iptableson