Answer the question
In order to leave comments, you need to log in
How to iterate over ipset and add new ips to it from a file?
How to iterate over ipset badips and add new ip abcd there if it is not in this list? Something like, but I don't know how:
sudo cat iplist.txt | while read line
do
if($(ipset test badips $line)=='$line is NOT in set bots') sudo ipset -A badips $line
done
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question