I'm developing an intranet web application in ASP.NET MVC3 with some simple content management features. The website can be viewed by anyone within in the intranet, but edited only by registered users. From outside the intranet, the website should not be viewable by anyone but the registered users.

Is there a way to check whether someone is accessing the website from outside the intranet somehow and redirect them to the login page? Should this be done in IIS or C#? I really don't know which way to approach this problem. I would still like to use the highly convenient [Authorize] attributes.

Can anyone help? Thank you very much in advance.