【问题标题】:Restricting access to all domains but one on the system/proxy level限制对所有域的访问,但系统/代理级别除外
【发布时间】:2019-02-18 17:38:17
【问题描述】:

我正在尝试将 [在 https 级别] 的访问限制为仅一个域(来自 docker 容器)。我找到了一种使用 squid 代理 https://aws.amazon.com/blogs/security/how-to-add-dns-filtering-to-your-nat-instance-with-squid/ 的方法,但似乎它需要 Man In the Middle 设置来进行 ssl 连接。如果可能的话,我想避免它。是否有任何简单且安全的方法来限制来自 linux 容器的出站流量? - 我的用例是为容器化的 nodejs 应用程序创建一个安全环境,因此即使任何恶意库尝试访问外部 url - 它也会被自动阻止。

【问题讨论】:

    标签: linux amazon-web-services proxy iptables squid


    【解决方案1】:

    如果您不想为 MITM 设置 Squid,那么您需要一些 dirty 解决方法,例如:

    • 使用 iptables 阻止生成的 IP(IE 定期查询要阻止的更新 IP 地址)
    • 伪造 DNS 解析(IE 将特定域解析为 localhost)

    【讨论】:

      猜你喜欢
      • 2013-06-10
      • 2023-01-19
      • 2011-11-11
      • 2020-05-29
      • 2015-05-10
      • 1970-01-01
      • 2011-12-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多