Code:
// Read the ips from a file, text file or whatever you like to use if you are going to use other database types then you are on your own
string[] BannedClients = File.ReadAllText(<banned ips list path>).Split('\r', '\n');
// Iterate through the array
foreach(string Client in BannedClients)
{
if(<Socket refrence name>.RemoteEndPoint.ToString().Split(':')[0] == Client)
<Socket refrence name>.Disconnect(false);
// Then if you have a list of clients or whatever which you should have then you should remove the client from the List<T> or Dictionary<T Key, T Value>
}