What Is Port Forwarding For IoT?

Photo by Parker Byrd on Unsplash

As a developer or engineer, you’re tasked with setting up port forwarding for the company’s IoT devices out in the field. 

You want to make sure that you set this up in a secure way, particularly with the edge Linux devices you’ve got in use.

In this post, we’ll cover what port forwarding is and when to use it, so that you’ll have clear options for secure IoT device access through SSH or VNC.

What is port forwarding?

LearningHub describes port forwarding in easy-to-understand terms:

“Port forwarding, sometimes called port mapping, allows computers or services in private networks to connect over the internet with other public or private computers or services.”

Setting up port forwarding for your IoT devices starts by understanding when would make sense to do this. Below are some instances where port forward for IoT devices is a good solution.

When to use port forwarding for IoT devices

1. Using SSH / VNC connections

One of the most important reasons you’ll likely consider port forwarding is to enable remote SSH or VNC connections to your IoT devices.

Normally, you’d be able to access SSH on a computer via the local network. But what happens when you need to connect to an external network, like the internet? That’s when port forwarding is needed and can be easily set up.

2. Public HTTP server on a private LAN

Another instance that will need port forwarding is when websites, dashboards, or pages are hosted privately. 

For anyone to access these, they need to be available on the local internet. If you’ve got something on your home/office network that you need to share with others, employing port forwarding will be needed to redirect requests that come from outside of your network to the IoT. 

Port forwarding is the best solution for this to be enabled.

3. FTP servers

Another instance where you’ll use port forwarding is when trying to access a private FTP server from an external network. 

Port forwarding is the best solution. Set this up on your router/firewall for this to take place securely.

Port forwarding challenges

When you’re setting up remote access for your IoT devices to connect to your local network, the options mentioned above are the most common and easiest to set up.

Yet, port forwarding can be a real challenge if your network address isn’t fixed. For example, your ISP uses dynamic IP and this will change with time. 

Even though you configure everything on your network the right way, following the scenarios above, once the dynamic IP expires, your ISP is going to assign your network with a new IP. This prevents the IoT devices from accessing the network remotely until you update the new IP address.

Another challenge can be that if the router configuration has limited access, none of the options outlined will work with port forwarding. 

Before you use port forwarding with your edge Linux devices, make sure you’ve investigated the IP configuration and router setups. Ensure devices are backed up regularly and clear protocols are in place for remote access.

Plug&Play solution for Accessing IoT devices remotely

Here at JFrog Connect, we provide all the needed tools to manage, control, access and update IoT devices remotely. JFrog Connect platform designed to work on devices that are far from human hands, and still, must be managed 24/7.

This guide explains how to access an IoT device remotely using JFrog Connect Remote Access tool.

JFrog Connect is a modern Linux-first IoT platform designed to efficiently update, control and monitor edge and IoT devices at scale.