I am using iptables with ipset on an Ubuntu server firewall. I am wondering if there is a command for importing a file containg a list of ip's to ipset. To populate an ipset, right now, I am adding each ip with this command:
ipset add manual-blacklist x.x.x.x
It would be very helpfull if I can add multiple ip's with a single command, like importing a file or so.
for ip in `cat /home/paul/ips.txt`; do ipset add manual-blacklist $ip;done
I get this response
resolving to IPv4 address failed to parse 22.214.171.124
for each ip in ips.txt
I do not know how to apply it.