Updated LOCAL_IP check for rules application