Hi All,

I have security appliance which put inline to ISP.
It save internet connectivity in log file, in this format.

|Datettime|source IP|Destination IP|URL

for example
2006-01-25 18:37|1.1.1.1|2.2.2.2|www.cnn.com
2006-01-25 18:37|2.1.1.1|2.2.2.2|www.cnn.com
2006-01-25 18:37|3.1.1.1|2.2.2.2|www.cnn.com
2006-01-25 18:37|1.1.1.1|2.2.2.2|www.cnn.com
2006-01-25 18:37|2.1.1.1|2.2.2.2|www.cnn.com
2006-01-25 18:37|4.1.1.1|2.2.2.2|www.cnn.com

This ISP provide Lease line to corporate customer.
each customer has IP address subnet such as

a.b.c.d/29
c.d.e.f/30

Most customer have only one subnet, Some customer have 2 or 3 subnet, some customer also have single IP address.

I want to create website which allow each customer logon and view their activily log file.

I have script which can read log file and store to database.
I'm not sure how can use PHP + MySQL to search database filter by customer subnet like this

SELECT * FROM table WHERE subnet=192.168.10.0/24 or subnet=161.256.0.0/16 or IP=1.2.3.4

One thing that I'm also worry is database performance, if we have a million record in database and search IP subnet, How about MySQL performance is this case?

If you have any idea how to do this, please let me know.

Thanks.