Redirect startup based on IP address

Hi All, is there a way to programmatically set the function passed to Meteor.startup(()=>{}) ?

Ideally, I want to grab the client IP address and then depending on the IP address send a different render method.

Which Meteor.startup? Client and Server version have a little different functions.

Server would be better. I want to have a redirect for a dev server. Where a specific IP would be allowed to the main app but other IPs would be redirected to a restricted page. Trying to do it without the accounts package.

I am not sure you can redirect the client from a server Meteor.startup which only runs during startup of the server.

If I was you, to do this with server side decisions, the client at some point would call a method to ask server if needed to redirect. If server answers yes, then client do the redirect.