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.
At command
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 46.225.38.155
for each ip in ips.txt
I do not know how to apply it.
Asked by byte00
(83 rep)
Nov 2, 2017, 05:14 AM
Last activity: Apr 4, 2022, 01:03 PM
Last activity: Apr 4, 2022, 01:03 PM