You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
314 B

#! /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()