I'd like to once again point out that it's better to use min and max ip, each in separate columns, and CREATE INDEX (ipmin, ipmax).
If you don't have a range when you insert allowed addresses, insert the same value in both columns since x BETWEEN x AND x => true, for all x.
Thus, your .* would be inserted as the separate values 192.168.2.1 and 192.168.2.254. Unless you go with weedpackets suggestion and use ip2long, which requires less space. They index key will also be smaller and search speed should be improved. The downside obviously is that you won't directly see what ip addresses you have, but depending onf your DBMS, you might have functions that does the same as PHP's ip2long and long2ip, such as INET_ATON() and INET_NTOA()
As for pattern matching, it depends on what database you're using. If you're using MySQL, it has native support for regexp
expression regexp pattern