Don't greylist DSNs.

This commit is contained in:
Stuart Gathman
2008-10-11 15:45:46 +00:00
parent 1c4878963b
commit 96f5b6e9dc
3 changed files with 24 additions and 4 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/python2.4
# Convert banned ip list to zonefile data suitable for use as a
# DNS blacklist with BIND. This is a way to share your banned ips
# with friends.
import socket
import sys
from glob import glob
banned_ips = [socket.inet_aton(ip) for fn in sys.argv[1:] for ip in open(fn)]
banned_ips.sort()
for ip in banned_ips:
a = socket.inet_ntoa(ip).split('.')
a.reverse()
print "%s\tIN A 127.0.0.2"%('.'.join(a))