How prevent these user agents (iphone,ios, mac os) accessing from nextcloud?


now i am using nextcloud ver 26.

can i use the apache user agents block for preventing acess to nextcloud?


Check out the access control app, you can create specific rules with the request user agent:


thank you ,

i wanna know how to prevent nextcloud login from iPhone App and Mac OS.

You could also block certain user agents on the webserver level …

1 Like

thank you,

i tried by referencing this URL.
That URL works for file access control.

and then , i will try to block from IOS User login by using Apache .htaccess.
can’t not work well. :joy:

can you advice me good idea? :pray:

I apologize if my question was strange :smiley:

Well, it can be done, but User agents can be easily faked by modifying the user agent string that is sent with HTTP requests to make it appear as if the request is coming from a different type of device or browser.

Maybe you tell us more about your infrastructure and what your actual goal is. I mean, why do you want to block iOS specifically?

1 Like

With file access control, you can specifically block access to certain files/folders. E.g. you want to provide only on certain devices, in certain networks, … You could perhaps block access to all the files but probably it won’t prevent a login.

In this case, you could do the block on the webserver level instead. I didn’t add links for it because with you search engine, you already have all the keywords (block access user agent webserver nginx/apache) and you’ll find how to do it.

Yes, that is true. However, doing that with the iOS client will be difficult. You need to build your own client, … let’s say you prevent easy use of such devices but there are ways around.

I’m curious as well :stuck_out_tongue_winking_eye:

1 Like