Created
November 3, 2023 09:30
-
-
Save eusonlito/053396ee75f95c3d80bd066e188408f2 to your computer and use it in GitHub Desktop.
Find IP in ipset lists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ip="XXX.XXX.XXX.XXX" | |
for set in $(ipset list -n); do | |
ipset test $set $ip &> /dev/null && echo "IP $ip found in $set" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment