Making an exception to the firewall?

Hi, I’m currently using Avast Internet Security. My pc system is Windows 10 Professional.

I work at my office and use a desktop computer, but sometimes I need to access it from outside - usually my home - because the database that I use requires the access be made in the office only.

So I tried using remote desktop access from my house and it failed. It turned out to be the firewall, which was preventing me from remote accessing.

If I turn off Avast, than it works. But I’d like to protect my pc from all other types of access, except for mine from my house.

What should I do?

https://support.avast.com/article/25/ (Firewall FAQ)