Request 2FA for external ip adresses

I am trying to configure a Nextcloud server and to enable 2FA only for a specific sub-net or for external ip addresses.
Is for the firs time i am working with Nextcloud and would really need some help.
Can anybody give me some ideas?