大网数据广告活动
服务器运维问答

Is a server firewall (i.e. UFW) necessary if a firewall is setup through the server provider?

· 52CE 我爱测

For example, if I have an Ubuntu server through DigitalOcean, if a firewall is setup through DigitalOCean's UI to control inbound and outbound traffic for said server, is it necessary to also enable and configure UFW? Do they fun…

问题原文

原帖链接 · fromtheloam · CC BY-SA 4.0

For example, if I have an Ubuntu server through DigitalOcean, if a firewall is setup through DigitalOCean's UI to control inbound and outbound traffic for said server, is it necessary to also enable and configure UFW? Do they functionally do the same thing? Is one better than the other?

已采纳解答

原帖链接 · Bob · CC BY-SA 4.0

A "host based firewall" is the more generic term for the firewall rules that you manage with UFW. They are complimentary with a "network firewall", which is configured independently from the host based firewall. Network firewalls can be for example an actual firewall appliance, ACL's in a router/switch, or security groups in the virtual network etc. IMHO one is not better than the other and you should have both.

But although two is better than one, having both can make troubleshooting connectivity issues more difficult as well.

The underlying security concept to have both a "network firewall" and a "host based firewall" is defense in depth".

The Wikipedia definition provides a good summary:

Defense in depth is a concept used in Information security in which multiple layers of security controls (defense) are placed throughout an information technology (IT) system. Its intent is to provide redundancy in the event a security control fails or a vulnerability is exploited that can cover aspects of personnel, procedural, technical and physical security for the duration of the system's life cycle.


To give a less abstract example: if somebody compromises your server and gets root access, they will also have enough privileges to either completely disable the host based firewall or insert their own custom rules. In that case the network firewall will still enforce your security policy.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2022-02-15)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。