Is this possible to connect TV and PC not in the same LAN?

I’m trying to connect TV and PC which are not in the same LAN.
I’ve connected TV via manageable router using port forwarding.
Is it possible to make a connection this way?
Or should I use the same LAN for TV and PC?

To use the Developer Mode app, your PC must be connected to the same network as the webOS TV. (See App Testing with Developer Mode App.) For other uses, please contact LG customer service center in your region. Thank you.