Login Page Blocked From Internet

We are running the ubuntu snap of nextcloud 15.0.5. Is it possible to configure the login page to ONLY show the username and password boxes when visiting it from internal IP’s, say 10.x.x.x/8 and block from the Internet?

We’d like to keep nextcloud functioning like normal but simply block anyone from accessing the login page or fields from the Internet. We want application codes to continue to work from mobile devices but nobody to be able to try logging in from the Internet.

We have our snap working with let’s encrypt so we don’t want to change how that fetches the ssl renewal cert. We simply want the login boxes to not show if accessing the login page from an IP not in a list of networks.

Thanks

You should be able to achieve this by performing a http-rewrite of the login page url to some other web page, probably one that states, that you are not permitted to login from the current IP of the requestor. Both, Apache and Nginx can do that, or a reverse proxy, if you happen to have one in front of your NC instance. NC itself, doesn’t offer such a feature.