diff --git a/geofirewall.py b/geofirewall.py index 02543f4..3882465 100755 --- a/geofirewall.py +++ b/geofirewall.py @@ -58,13 +58,13 @@ def build_ip_set(): """ Take the list of subnets, merge them and load the iptables ipset """ - summary_subnets = netaddr.cidr_merge(IPSubnets) + # summary_subnets = netaddr.cidr_merge(IPSubnets) os.system('sudo ipset create GEO hash:net -exist') os.system('sudo ipset create GEO2 hash:net -exist') os.system('sudo ipset flush GEO2') - for subnet in summary_subnets: - os.system('sudo ipset add GEO2 ' + str(subnet)) + for subnet in IPSubnets: + os.system('sudo ipset add GEO2 ' + subnet) os.system('sudo ipset swap GEO GEO2') os.system('sudo ipset destroy GEO2')