No 2FA Required for Local Access?

I recently set up remote access which involved requiring 2fa to log in.
Is it possible to set 2FA to be required only accessing from outside my home network (https://xxxxx.duckdns.org:xxx), and not when accessing locally (https://192.168.xxx.xxx:xxxx)?