UFW

来自Gea-Suan Lin's Wiki
Gslin讨论 | 贡献2021年2月26日 (五) 05:33的版本 →‎首段
跳到导航 跳到搜索

UFW是一套在Linux上常见的防火墙管理软件,底层通常是iptables

设定

可以修改/etc/rsyslog.d/20-ufw.conf内的设定,关闭阻挡的log写到dmesg里面:

# Log kernel generated UFW log messages to file
:msg,contains,"[UFW " /var/log/ufw.log

# Uncomment the following to stop logging anything that matches the last rule.
# Doing this will stop logging kernel generated UFW log messages to the file
# normally containing kern.* messages (eg, /var/log/kern.log)
& stop

范例

建议先设定:

sudo ufw allow 80/tcp
sudo ufw allow 443/tcp

然后再启用:

sudo ufw enable

相关连结

外部链接