creating rule based on the IP address