【发布时间】:2014-05-12 05:55:45
【问题描述】:
我有一个 ec2 虚拟机,它是我从 VMWare 实例导出的 CentOS 机器。与此 VM 关联的安全组是默认安全组,此默认安全组仅启用了入站设置,我无法编辑该组的出站设置(在 ec2 仪表板中显示为禁用)不知道为什么。
我想要做的是阻止来自机器内部的所有出站呼叫,我有一个应用程序并试图模拟在离线环境中运行它,它可以接受来自 VM 外部的呼叫,但不能在外部进行任何呼叫虚拟机。
是否可以在 ec2 VM 中实现这一目标?我不确定此时我可以提供哪些信息,以便获得最好的帮助,所以请向我询问任何其他信息。
iptables 当前在 VM 中停止,如果我启动它,它将阻止对 VM 的所有入站调用,我将无法访问应用程序(它是 Web 应用程序)。
这是 iptables -L 的输出
[root@ip-10-154-146-78 app_module]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
【问题讨论】:
-
你是在经典还是 VPC 中运行这个?
-
是类VM,不是VPC
标签: amazon-ec2 centos iptables offlineapps