How can I make my thing visible outside the local network?

Hi,
I am a newbie experimenting with WebThings Framework.
I am trying to make my Philps hue bulb & bridge controllable through WebThings Framework but I currently succeeded within just my local network.
Is it possible to make the devices visible outside my local network?
And no, I do not own a raspberry pi :frowning: just a windows PC

Hi junwyoo, welcome!

The safest way to expose web things to the Internet is by using the WebThings Gateway. If you don’t have a Raspberry Pi you can install the software on a Windows PC by following the instructions in the README. Windows isn’t as well tested as Mac OS and Linux, but it should work. (Your PC will obviously have to be turned on whenever you want to use it).

The gateway will give you a free subdomain on the web which uses HTTPS and is password protected for security. You can add web things created using the WebThings Framework by their local URL and the gateway will give them a web URL on the Internet using your registered subdomain.

In the case of Philips Hue you can use either the Zigbee add-on (doesn’t require the Hue bridge) or the Philips Hue add-on (does require the Hue bridge) to control your bulbs over the Internet, without needing to write any of your own code using the WebThings framework.

If you don’t to use the gateway it’s possible to directly expose the web thing to the Internet by configuring your own DNS, NAT and TLS but that is a lot more complicated and requires you to implement your own authentication mechanism to make it safe.

Hope this helps, feel free to ask further questions.

Ben

1 Like

It may be easy to access your WebThings from the internet depending on you knowledge of various networking tools. If you only have Windows, you will need to install SSH, but the solution is basically the same.

Minimum steps:

  • On your internet-facing router/gateway forward a random port to SSH port 22 on a computer on your LAN. This local computer could co-host WebThings or the SW could be on another computer also on your LAN.

  • Using Putty from the internet establish a new SSH connection to the public IP:random_port of your router. Log into your lan computer. This established a secure SSH connection from your internet computer into you LAN.

  • On the internet computer using Putty, forward a local port to the IP:port of your WebThings instance. If port 8080 is not used on your internet computer then use the same one as WT. For the forwarded port input the IP of you LANs WT instance and the default WT port: 8080.

  • On a web browser on your internet pc, access URL: 127.0.0.1:8080. Your browser will use Putty to transfer traffic into your LAN (encrypted by SSL) to access your local WT instance.

I can access my WT using my android phone or laptop w/o issue.

There are other things you can do:

  • Establish a free DNS record to your cable modem’s IP. I have my linux box update my IP daily (althought it has not changed for years). I can access my network using a public DNS name…

  • Establish public and private SSL keys used when establishing your SSL connection. Generate a private key and different public keys for each device that needs to access the network remotely. You can easily disable a specific key should a device become compromised. Only devices with certificates are allowed into the network…

  • If you only have Windows, I recommend Cygwin and it’s SSL server. MS’ SSL server is not as easy if your Linux-literate. I have Cygwin SSL on all my Windows boxes by default and can access all of them remotely over SSL from the internet too.

Once you have 1 SSL server on the LAN you can forward forward other port on your internet device to any ip:port on your LAN e.g.: RDP, HTTP/S, etc. I often RDP into my LAN remotely to work on my home computer.

Eric L. Edberg

1 Like