private void ConfigureIPAddressRestrictions()
{
if (restrictionManager == null)
restrictionManager = new IPAddressRestrictionManager();
// Reset everything.
restrictionManager.ResetDisabledRules();
restrictionManager.DeleteRules();
// Apply settings.
if (IPAddressRestrictionConfiguration.IsEnabled())
restrictionManager.ApplySettings(IPAddressRestrictionConfiguration.GetSettings());
}