firewall/roulette.py
2020-01-18 14:23:41 +01:00

14 lines
314 B
Python
Executable file

#! /usr/bin/python3
import requests
from firewall import NetfilterSet
ips = requests.get('http://roulette.rez/banned_ip').text.split('\n')
content = [(i,) for i in ips if i] or None
s = NetfilterSet(
target_content=content,
type_=('IPv4',),
name='ip_roulette',
table_name='firewall'
)
s.manage()