Remote access from anywhere to your Raspberry Pi Zero

If we want access to our Raspberry Pi from outside our network, we need to do the following:

  • Check if our modem has a public IP address
  • Investigate the address that we'll be using in our browser
  • Type http://whatismyipaddress.com/ in our browser
    Remote access from anywhere to your Raspberry Pi Zero

IP provided by the ISP are genteraly dynamic IP which changes after some time. In our cases we need to have static addresses which does not change occasionally.

How to access our modem to configure it

Access our modem via the Ip address (gateway) and go to the port addressing part. Configure port 80 that points to our web server (put the IP address of our account), this IP address is the one that automatically assigns the DHCP server of our system.

Here we have some ports that can be forwarded from the modem-router:

How to access our modem to configure it

To get the gateway IP address, type the ipconfig command, you need to have admin rights. After this, type http://gatewayip_addres in the web browser of your router.1:

How to access our modem to configure it

This is an example of what you'd see if you had a Linksys router, yours may be a different interface:

How to access our modem to configure it

To open a port we need to configure our router to give permissions for entering from outside, so we need to give permission in our router:

How to access our modem to configure it

This screenshot shows the final results, how to open a port number 3000, and the name of the application node:

How to access our modem to configure it

Configuring Dynamic DNS

We need to configure a domain name service so we can access our web server by typing the name of our domain (it is very difficult to learn the IP addresses of the web pages). That's why Domain Name Servers (DNS) were created. Follow the next section to create a domain.

You may want to access your IoT control panels away from home. In that case, your web server will need to become a host on the Internet.

This is not a straightforward thing since it's behind the router in your home. Your ISP generally does not give you a static public IP address because most users are simply accessing the web, not serving web pages.

Therefore, the public side of your router is given an IP address that can change from time to time. If you browse to <whatsmyip...>, you will see what your public IP is currently.

Tomorrow it could be different. For setting up external access, you can do one of two things. If you want to simulate having a static IP, you can use a service such as Dynamic DNS. If you just want to "try out" external access, you can open a port on your router

Benefits of having Dynamic DNS:

  • One solution is to install a client that will allow the public IP to make it fixed. The client function (software that is installed on a computer), maintains communication with the site www.no-ip.org.
  • When the IP address of our modem changes, the client takes that IP change.
  • This allows our domain name to always point to our public IP address. The software that is installed is called: No-IP DUC.

Creating an account at No-ip.org

In the following screenshot we can see the Enhance dynamic DNS setting up:

Creating an account at No-ip.org
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.42.240