UFW
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
相关连结
外部链接
- 官方网站 (英文)