Kali防火墙ufw安装与命令
前言
版本说明
linux.kali=kali-linux-2020.1a-installer-amd64.iso
相关链接
安装 ufw 防火墙
apt-get install ufw
ufw 防火墙命令
- ufw status :检查防火墙的状态(默认 inactive)
- ufw version :查看 ufw 防火墙版本
- ufw enable :启动 ufw 防火墙
- ufw disable :关闭ufw防火墙
- ufw default deny :默认禁止访问所有
- ufw allow 22/tcp :开放 22/tcp 端口
- ufw allow 53 :开放53端口(tcp/udp)
- ufw deny 3306 :禁止3306访问
- ufw delete allow 22 :删除已经添加过的规则
- ufw allow from 192.168.8.1 :允许此IP访问所有的本机端口
- ufw delete allow from 192.168.8.1 : 删除上面的规则
- ufw status numbered :查看规则,显示行号
- ufw delete 3 :删除第三条规则
- ufw reload : 重新加载防火墙
- ufw reset :重置防火墙
root@kali:/home/kali# ufw help Usage: ufw COMMAND Commands: enable enables the firewall disable disables the firewall default ARG set default policy logging LEVEL set logging to LEVEL allow ARGS add allow rule deny ARGS add deny rule reject ARGS add reject rule limit ARGS add limit rule delete RULE|NUM delete RULE insert NUM RULE insert RULE at NUM route RULE add route RULE route delete RULE|NUM delete route RULE route insert NUM RULE insert route RULE at NUM reload reload firewall reset reset firewall status show firewall status status numbered show firewall status as numbered list of RULES status verbose show verbose firewall status show ARG show firewall report version display version information Application profile commands: app list list application profiles app info PROFILE show information on PROFILE app update PROFILE update PROFILE app default ARG set default application policy