简体   繁体   English

在 AWS 中的 EC2 上配置防火墙

[英]firewall configuring on EC2 in AWS

Few days ago I configured firewall on EC2 in AWS.几天前,我在 AWS 的 EC2 上配置了防火墙。 But, the problem was when I configure firewall in EC2, that server went down.但是,问题是当我在 EC2 中配置防火墙时,该服务器出现故障。 Then when I remove this firewall, then the server went up again.然后当我删除这个防火墙时,服务器又启动了。 but after restarting the server, it was down.但是重启服务器后,它就宕机了。 then when I disabled firewall from the server it gone up, then remains ok also after restarting further.然后,当我从服务器禁用防火墙时,它启动了,然后在进一步重新启动后也保持正常。 My question is should we avoid firewall installing on aws EC2?, as the firewall is automatically configured by aws instance.我的问题是我们应该避免在 aws EC2 上安装防火墙吗?因为防火墙是由 aws 实例自动配置的。 but won't it increase the security by configuring firewall.但它不会通过配置防火墙来增加安全性吗? Did, I do something wrong like double layer protection by installing firewall?是不是我装防火墙做了双层保护之类的错误?

Enabling the Firewall/Security Groups/ does not DOWN the server, it is still up and running but maybe inaccessible to you, as you might have locked yourself from it.启用防火墙/安全组/不会关闭服务器,它仍在运行,但您可能无法访问,因为您可能已将自己锁定在其中。

This is exactly the reason why the EC2 Security Groups are there, so you can block access to specific ports and allow access only from specific ports for management, and/or open public access to Web services for example.. if you are building a webserver.这正是 EC2 安全组存在的原因,因此您可以阻止对特定端口的访问并仅允许从特定端口访问以进行管理,和/或开放对 Web 服务的公共访问,例如……如果您正在构建网络服务器.

Firewalls can be dangerous if you do not know what you are doing.如果您不知道自己在做什么,防火墙可能很危险。

If you locked yourself out, then Yes you did something wrong.如果您将自己拒之门外,那么是的,您做错了什么。 If you first allow your IP in the firewall, then you will still be able to manage or access it, once the Firewall is up.如果您首先在防火墙中允许您的 IP,那么一旦防火墙启动,您仍然可以管理或访问它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM