双绞线以太网与 iptables
我需要实施一些低级 IP 过滤/跟踪。通常我会使用 iptables 来实现此目的,但由于我目前在一些项目中使用twisted,所以如果可能的话,我会考虑使用它的以太网库。实际上,我更喜欢它(它比 iptables 规则更容易部署)。
是否可以使用twisted python的twisted.pair.ethernet来实现iptables的部分模拟?
I need to implement some low-level IP filtering/tracking. Typically I would use iptables for this, but since I am currently using twisted in a few projects I'd consider using it's ethernet library, if it's possible. Actually, I would prefer it (it's easier to deploy than iptables rules).
Is it possible to use twisted python's twisted.pair.ethernet to implement a partial analog of iptables?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
twisted.pair.ethernet
将为您提供一些解析,但它不会为实际获取数据做任何事情,也不会将其放回到网络上(如果您不这样做)不要过滤掉它)。为此,您需要与 tuntap 系统对话,而 Twisted 对此不做任何事情。twisted.pair.ethernet
will give you a little bit of the parsing, but it doesn't do anything for actually getting the data in the first place, nor putting it back on the network (if you don't filter it out). For that you need to talk to the tuntap system, which Twisted doesn't do anything with.