Use the ICIServer interface AddIPAccessRule method to add an allowed or denied IP mask to the server.
Signature:
HRESULT AddIPAccessRule(
[in] BSTR bstrMask,
[in] VARIANT_BOOL bAllow);