Conditionally restrict meta data based on IP

How would I go about restricting access to meta data and methods bases on IP address.
I am aware of [Restrict(VisibilityTo = RequestAttributes.None)]. Is there a way to override this functionality and hide certain DTOs based on clients IP address. I need access from local network plus a couple of other IP addresses.

No, metadata attributes are a compile time constant. To validate IPs use a request filter that checks IRequest.UserHostAddress.