iptables防火墙命令,重启不失效

iptables基本命令# 查看规则列表 iptables -L -n # 放行指定端口:22 iptables -A INPUT -p tcp --dport 22 -j ACCEPT # 放行IP:123.123.56.50 iptables -A INPUT -s 123.123.56.50 -j ACCEPT新建脚本 ipt.shvi ipt.shDebian Ubuntu 脚本内容#

- 阅读全文 -

Firewalld防火墙命令

firewalld常用基本命令# 开放8080端口 firewall-cmd --permanent --add-port=8080/tcp # 移除8080端口 firewall-cmd --permanent --remove-port=8080/tcp #查看开放端口 firewall-cmd --zone=public --list-portsfirewalld白名单模式本次示例,是先设置

- 阅读全文 -