How do you discover which ipset blocklist contains particular IP?
Hello,
how do you discover which ipset blocklist contains particular IP? Usually when i want to see if some IP is banned by ipset, i do: ipset list|grep IP But it do not tell me which ipset blocklist contain this IP. I can list blocklists: service ipset status But what is the most simple command that will tell me in which list this IP reside. I need to know it quickly without quering each list (ipset list listname|grep IP), i have many lists.. So far this works, but is not ideal (hard to remember): for ipset in $(service ipset status|grep "Name:"|awk "{print $2}");do echo $ipset;done|grep -v Name >> ipsetlist for ipset in $(cat ipsetlist);do echo $ipset && ipset list $ipset|grep IPHERE;done |
Quote:
https://www.linuxquestions.org/quest...8/#post5765388 Also, this post doesn't make sense; you ask a question, then post the answer to the question. If you have the commands to do what you're after, what else do you need? If you don't want to type them in, then put the command(s) in a file (make a 'script'), and run that. See any of your (many) other threads about how to write a script if needed. |
Yes, that do not solve the issue, for the reason i typed in my first post.
|
Quote:
AGAIN: Why can you not take the commands that you ***SAY ARE ALREADY WORKING***, put them in a script file, and just run it?? Where is the problem there? It would be a single command, followed by an IP address. AGAIN: You have been asking about iptables/ipset for years now, yet appear to be unable to apply ANYTHING you've learned in that time. |
Members please note this.
Replies should be informational and directly related to the original question. Replies like you asked that before are not solutions. |
Quote:
Quote:
I'm sorry to disagree with you here, but asking questions that differ only SLIGHTLY from one to another, indicate the poster shows no effort on applying what they've been told previously. |
All times are GMT -5. The time now is 06:36 PM. |