The log file is large, it sometimes gets up to 3GB
A large file seeking technique is described here and it works very well.. the discussion was about replacing characters with tr, you can adapt it to your IP matching needs easily I think. HTH
Comment on Re: Efficient Way to Parse a Large Log File with a Large Regex