Kerry
I suspect that the problem with your first attempt is that your regular expression is " ^192\.168\.0$ ". This will never match any remote Remote_Addr, since you only have 3 parts of the IP address, with a forced start of " ^ " and " $ ".
Perhaps you intended to use the regular expression " ^192\.168\.0\. "?
Note that I excluded " $ " at the end, so it doesn't matter how the IP address ends. And that I included an extra " \. " Shielding period, so you make the corresponding IP addresses have the actual " 0 ", and not something like " 012 ", " 001 ", etc. (not that these zero parts must be present on any IP address).
Steve
source share