deepin系统防火墙设置
deepin firewall
安装服务
sudo apt-get install firewalld systemd -y
查看服务器上是否安装了firewall
systemctl status firewalld
开启防火墙
systemctl start firewalld.service
关闭防火墙
systemctl stop firewalld.service
设置开机自启
systemctl enable firewalld.service
设置关闭开机自启动
systemctl disable firewalld.service
在不改变状态的条件下重新加载防火墙
firewall-cmd --reload
查看已开发的端口
netstat -anp
开放100-500端口
firewall-cmd --zone=public --add-port=100-500/tcp --permanent
开放全部端口给指定ip:192.168.31.131
firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.31.131" port protocol="tcp" port="1-65535" accept"