Secure way to control Arduino devices from anywhere in Arduino Control Center(Part I)
By default setup, the web port for ACC is port 80. If this port is already used, you can set any other port. First of all, let's see how we connect to Arduino Control Center web server in a non-secure way.
If you plan to access Arduino devices from the local network, you can access them simply by typing in the web browser http://[YOUR_PC_IP_ADDRESS], for example, http://192.168.1.101 where 192.168.1.101 is IP address of PC with running Arduino Control Center desktop application and started web server. If you use any other port, for example, 8080, the address in the web browser will be like this: http://192.168.1.101:8080. How to start the server you can see here: Setup and start HTTP and UDP servers
At this point, without any kind of port forwarding on a wireless router or whatever is your network configuration, you are pretty safe within a home-local network with WI-FI enabled, of course, if you have strong password and encryption on a home-office router and no one without the password cannot access to WLAN. Even if someone knows that the ACC server address is http://192.168.1.101:8080, the server will not be reachable because it is used so-called private IP address(IP address that's reserved for internal use behind a router or other Network Address Translation (NAT) device, apart from the public).
If your intention is to use ACC server this way, there is no need for reading the rest of the topic. But...
Let's say that you want to turn on home heating from your office to a workplace with a smartphone. Accessing ACC web server with address http://192.168.1.101 is no longer possible, why, we are already explained.
In order to connect to the Arduino Control Center server, you must have either a public FIXED(STATIC) IP address(buy it from your ISP - internet service provider), or to use Dynamic DNS providers, which is another subject and will be discussed in other topics, read provided link with best free services or google it.
In this topic, I will assume that you have public STATIC IP address bought from your ISP, or at least you know your current public IP address.
In our example, we will use port 8080 for Arduino Control Center web server, which means that you have to forward this port to IP address of your PC with Arduino Control Center application running, our example is 192.168.1.101, but you have to add your PC IP address. If you are not familiar with these terms, ask for help or google port forwarding for your router type.
Finally, we have an IP address, forwarded port 8080 on your home router to PC with Arduino Control Center application, and running ACC with started WEB server on HTTP port 8080.
Type http://[YOUR_PUBLIC_IP]:8080. and login page should appear:
View with all assigned devices shows after login:
Google Chrome shows you that connection is NOT secure:
Read about HTTP security here and google about this topic.
How to use Arduino Control Center in a secure way, read in Part II of this topic, which will be soon :)
Comments
Post a Comment