【问题标题】:How to block aceess to a HTTPS site using python-iptables如何使用 python-iptables 阻止对 HTTPS 站点的访问
【发布时间】:2014-02-18 04:47:32
【问题描述】:

我想使用 python 实现一个简单的防火墙,它将阻止对给定站点列表的访问。为此,我想知道如何使用 python-iptables 阻止特定站点。例如如何阻止对 www.facebook.com 的访问?

【问题讨论】:

  • 您想在您自己的客户端机器上阻止对网站的访问?
  • @jonathon 是的。我想阻止访问我自己机器上的网站。

标签: python https firewall iptables


【解决方案1】:

试试这个link,它工作得很好,使用子进程并说块。

或者你也可以使用 iptables

iptables -A OUTPUT -d www.facebook.com -j DROP

【讨论】:

  • iptable 方法不起作用。它将第 1 行 DROP all -- 0.0.0.0/0 31.13.81.128 添加到链输出。但是网站可以访问。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-11-17
相关资源
最近更新 更多