Kali操作系统安装时默认已经安装了"iptables"防火墙,配置前先检查是否安装,执行:iptables -L
root@kali:~# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
root@kali:~#
Iptables described above has been installed, if not installed, execute: apt-get install iptables installed with " " means to "iptables" all relevant packages are installed, to prevent the installation of dependencies not lead to "iptables" installation failed.