Whitelist Client via IP Address

How can I have my Data Abstract server only allow clients that are in a whitelist (by IP Address)

Thanks

pls review code snippet at Receiving information about client on server-side .
it shows how to client IP can be detected at server-side.
also in this event you can raise exception if wrong IP calls server method