Best IP4 filter I have ever found… 🙂

grep -P '(((2(5[0-5]|[0-4][0-9])|(1[0-9]|[1-9])?[0-9])\.){3}((?3)))' data.log