Is it possible to write a firewall in python?

后端 未结 6 1064
深忆病人
深忆病人 2020-12-28 21:27

Is it possible to write a firewall in python? Say it would block all traffic?

6条回答
  •  北海茫月
    2020-12-28 21:53

    Python-iptables provides python bindings to iptables under Linux. Interoperability with iptables is achieved via using the iptables C libraries (libiptc, libxtables, and the iptables extensions), not calling the iptables binary and parsing its output.

    http://ldx.github.io/python-iptables/index.html

提交回复
热议问题