Port forwarding alternative (especially for people facing double nat issue)

Static public IP is basically an address to a server which doesn’t change.
So instead of going through the process of port forwarding there is a service known as ZeroTier which creates a psuedo (that’s what I call it) local network via VPN, which is more secure than port forwarding because you can authorize each device you need in the network and have access to your devices.

ZeroTier has a free service where it limits the number of nodes connected to the network to 50 (kind of enough for most of the IOT projects)

Steps:

  1. Go to ZeroTier and create an account

  2. Click on the Networks option on the top bar

  3. You’ll find Create A Network option there.

  4. Click on the network you created and you’ll see Network ID.
    This is important as you’ll be using this ID to sign up all your devices to the network

  5. Keep the access control as it is (PRIVATE) to authorize every device trying to access the network.

  6. Now you can start setting up your devices,

  7. In Downloads page you’ll find the details, but you can run

curl -s https://install.zerotier.com | sudo bash

to install the ZeroTier client on RaspberryPi

  1. After Installation, signup the Pi for the network by running
zerotier-cli join ################

replace ################ with 16digit Network ID

  1. You should see members added in the Members section and ipv4 address will be auto assigned and be displayed along with the device

  2. Name the device as ‘Blynk’ or ‘Rpi’ in order to avoid confusion

  3. Install the ZeroTier app in Android/IOS devices and go through the steps
    All you need to do is input the Network ID and put the RaspberryPi’s auto-assigned IP address in the Blynk app (port won’t change anyways)

The ZeroTIer sets up the VPN and you can use your device normally while accessing the Blynk local server from anywhere in the world

Note: Due to battery optimisations the app might be stopped by the OS, please start the app/ remove optimisations for better experience

Thank You @PeteKnight for suggesting the alternative

4 Likes

What ippude i should use in blynk app

In ZeroTier web, you’ll see your devices in Members. Name your Pi/Computer with a unique name for you to identify and use its IP (will be under Managed IPs column) with port 9443 or whatever you’ve chosen.

Blynk app and local server connected.
But
What to write in esp program managed ips (10.147.##.###) or local server ip (192.168.##.####) in ip section of blynk. Begin
Note: esp must be far away from server

You can’t use ZeroTier in that scenario, at least not without a lot of extra work, as the ESP isn’t running a ZeroTier client.

Pete.

1 Like