Restrict login and api and send access to different ips

I want that I can share passwords via send to to public world,
butt the login should only available from one ip.

Is this possible?
which urls have to restrict by frontend proxy to what?