Linux防火墻軟件版本更新因防火墻類型和系統發行版而異,以下是常見類型防火墻的更新方法:
sudo apt update
sudo apt install ufw
sudo service ufw restart
apt
命令更新軟件包,安裝或更新iptables后,重啟服務使更改生效。命令如下:sudo apt update
sudo apt install iptables
sudo service iptables restart
yum
或dnf
命令更新系統包來實現firewalld的更新,更新后重啟服務。以CentOS 7為例,命令如下:sudo yum update firewalld
sudo systemctl restart firewalld
對于CentOS 8及以上版本,使用dnf
命令:
sudo dnf update firewalld
sudo systemctl restart firewalld
yum
或dnf
命令更新軟件包,然后重啟iptables服務。以CentOS 7為例:sudo yum update iptables-services
sudo systemctl restart iptables