上一篇
临时关闭(重启失效)
sudo iptables -F # 清空规则 sudo iptables -X # 删除自定义链 sudo iptables -P INPUT ACCEPT # 允许所有入站 sudo iptables -P OUTPUT ACCEPT # 允许所有出站
永久禁用(需卸载或禁用服务)
sudo systemctl stop iptables # 停止服务(若存在) sudo systemctl disable iptables # 禁用自启 sudo apt remove iptables -y # Debian/Ubuntu卸载 sudo yum remove iptables -y # CentOS/RHEL卸载
临时关闭
sudo systemctl stop firewalld # 停止服务 sudo firewall-cmd --state # 检查状态(应显示"not running")
永久禁用
sudo systemctl disable firewalld # 禁用自启 sudo systemctl mask firewalld # 彻底锁定(防止被其他服务唤醒)
UFW
(Uncomplicated Firewall)可简化管理(Ubuntu默认工具)。 需要更详细的规则配置?可追加提问! 🔍💡
本文由 茹驰媛 于2025-08-02发表在【云服务器提供商】,文中图片由(茹驰媛)上传,本平台仅提供信息存储服务;作者观点、意见不代表本站立场,如有侵权,请联系我们删除;若有图片侵权,请您准备原始证明材料和公证书后联系我方删除!
本文链接:https://vps.7tqx.com/wenda/515537.html
发表评论