Use grep to extract IPs using a regular expression.
Here, we extract from the auth log by reading it and piping to grep:
cat /var/log/auth.log | grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}"
-E
for extended regex, -o
for show just the matched part
No Comments Yet!