I want to get access to an windows iot device from internet. I want to connect my device via Ethernet to any network. The networks are connected to the internet. I have no static ip and I don't know anything about the network where my device is connected.

So I thought I can run an application on that device which detects a new Ethernet connection. That application could send me the actual ip address and informations about the network to a specific endpoint. With those informations I thought I could connect myself with the windows iot device?

Is that even possible to get automatically access to a device from "outside" without knowing anything from the network?


When I plugin the device to Ethernet and the firewall allows it, I want the device to send specified data to a cloud service like Azure Event Hub. After receiving events and recognition of the new device in the cloud, I also want to send messages to the device. But I don't want to use DNS or VPN and I don't want to use Azure IoT Hub, because I want be able to change the cloud provider.


In order to connect to a device in an IP network from an outside network (i.e., to cross a router boundary) without having information about the internal network, you need to initiate a connection from your IoT device to a server you have control over in the external network (e.g., Internet). If the internal network firewall allows your device to do that (that is usually allowed), then you need to connect from your computer to the external server and that server should be able to route your communications to your device. This is how TeamViewer works, for instance.

If the internal network firewall disallow your device from connecting to the external server, then you won't be able to do what you want.

If you need to go through a specific gateway to connect to the Internet (e.g., a proxy server) then you will need to have the exact credentials needed for that, otherwise your device will stay confined in the internal network.

  • 1
    To improve your answer you could mention about using, say, an outbound SSL VPN connection from the IoT device to an external server then, as a VPN connection has been made, the device can communicate over different ports (tunnelled through the VPN). This is how SSTP works... the excellent thing about SSTP is that it works over the HTTPS protocol and almost all firewalls don't block this as secure websites need to work (in almost all cases). – Kinnectus Jan 5 '16 at 9:50
  • @Big Chris: I agree. I just wanted to stay generic. The problem will still exist for the HTTPS port if applications need to communicate via an authenticated proxy. – Dr. Koutheir Attouchi Jan 5 '16 at 12:11
  • Oh, of course, just thought I'd make a little addition.. and your reply has given a great addition to help future visitors :) – Kinnectus Jan 5 '16 at 12:14
  • Please see the edited question. – CPA Jan 5 '16 at 23:07

You can use various dynamic DNS name server apps to provide a static name so you can connect to a known address. See more in wiki: https://en.wikipedia.org/wiki/Dynamic_DNS

This won't help you getting connection to "know nothing" network. That's where UPNP comes in. You can use UPNP to create a specific port mapping automagically to the router so a known port is always routed to your ip device inside the router. More details here: https://en.wikipedia.org/wiki/Universal_Plug_and_Play#NAT_traversal

If you combine the two you should

a) Have a fixed address to connect to b) A fixed port in the address which is routed to your device

Unfortunately the name server update is not instant so if you're relying on e.g. Google name server it will take some time for the new dynamic address to propagate. Some dynamic DNS providers have their own name servers to work around this. You will be naturally exposing all of your network traffic to them that way so checking TOS wrt data mining would be appropriate.

  • Please see the edited question. – CPA Jan 5 '16 at 23:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.