Can TeamViewer be used only within a single network?

I have TeamViewer v12 installed on two separate computers.  When I am on my home wifi network, I am able to remote control either of the computers using the other one.  However, when I'm at school (different network), I am unable to remote into my home computer as TeamViewer will continue to try to connect with no luck.

Am I missing a setting?  Or did I install something incorrectly?

Thanks.