Kali Linux默认安装了iptables防火墙,可以通过以下步骤来配置防火墙:
sudo iptables -L
sudo iptables -A INPUT -s <来源IP地址> -j DROP
这将阻止来自指定IP地址的所有入站连接。
sudo iptables -D INPUT -s <来源IP地址> -j DROP
sudo apt-get install ufw
sudo ufw enable
sudo ufw status
sudo apt-get install firewalld
sudo systemctl start firewalld
sudo systemctl enable firewalld
sudo firewall-cmd --state
请注意,配置防火墙可能会导致网络连接问题,因此在进行更改之前,请确保您知道您正在做什么并且有备份。