For Internet of Things (IoT) devices and cyber-physical systems (CPS), it is required to connect them securely and reliably to some form of cloud environment or computing entity for control, management and utilisation. The Internet is a suitable, standardized, and proven means for the connection of IoT devices in various scenarios. Connection over the Internet utilises existing protocols, standards, technologies and avoids investment in new, specialised concepts. Thereby, this connection requires a transparent addressing schema which is commonly TCP/IP, using domain names and IP addresses. However, in industrial, commercial and private networks, the addressability and connectability/connectivity is often limited by firewalls, proxies and router configurations utilising NAT. Thus, the present network configurations hinder the establishment of connections between IoT devices across different locations. Therefore, the method for connecting IoT devices in a client-server configuration proposed herein utilises the Tor (previously: The onion router/routing) network for addressing of and secured communication to IoT and CPS devices. It is an overlay protocol that was designed to allow for robust and anonymous communication. The benefit of this approach is to enable addressability and connectivity of IoT devices in firewalled and potentially unknown and changing network environments, thus allowing for IoT devices to be used reliably behind firewalls as long as outgoing communication is not blocked.