How to control the board through web app

So the project is to build a temperature monitor and control system. The system consists of a temperature sensor and a multi-channel relay that directly connect to the Arduino Yun. The goal for this project to get the readings from the sensor and control the relay (turn on and off) when you are far away from the device. I found a lot tutorials on the internet however they all require that the Arduino Yun and the controlling computer to be on the same network, which means you can't control the system from far away.

I am wondering if there is any way for Arduino Yun to communicate to the web app over a remote network through WIFI? I have very limited knowledge on network communications, so I am kind of lost where to go from here, any help would be greatly appreciated!

The basic idea is that you have to open a port on your router so let your Arduino server be visible from the wan side, whereas normally it would only be visible in the lan, as you say.

How to open a port depends on the actual router hardware: you can usually access the router through a browser form the lan side and change settings there. My particular one had an explanation of how to do that in the manual.

Once you opened a port to the outside world, and you talk to the router from your Arduino on that port, you access the board from outside by browsing to the router's wan address and in through the right port.