I have existing ipset mylist, which I created with this command:
ipset create mylist hash:net
Now, I would like to be able, from my python script, to add IPs to this list. This is the command I would use to do it manually from the commandline:
ipset add mylist 45.254.246.0/24
how can I do the same from python script?
I found the netaddr module has IPSet support, but this seems to be just internal structure, not a module to interact with my iptables.