Python & firewall control (Win32)
Tim Williams
listserver at tdw.net
Fri Jun 17 07:09:02 EDT 2005
On Thu, 16 Jun 2005, Tim Williams wrote:
> Does anyone know of (personal/desktop) firewall that can be controlled
> via Python, or a Python Firewall package, or even something like DAXFi
> but not dormant ?
http://wipfw.sourceforge.net/
import os
def deny(src, dst, proto="all"):
cmd = "ipfw add deny " + proto + " from " + src + " to " + dst
os.system(cmd)
ipfw for Windows is technically in beta, but ipfw itself is rock solid.
tom
------------------------------
Tom, many thanks for that. I'm actually looking for a firewall (packet
filter) I can control in realtime from a Python application, or even a
Win32 equivalent of http://woozle.org/~neale/src/ipqueue/ .
Though if I can stop & restart ipfw in a fraction of a second from within a
Python app then the result would be the same I guess. I will have a play
with it.
Any other suggestions gratefully received too
Cheers
Tim
More information about the Python-list
mailing list