Port Forwarding

How a storage node communicates with others on the Storj network, even though it is behind a router.

Most, if not all ISPs give a dynamic IP address, which means your IP can change at any time. As a work around, you need a dynamic DNS service to ensure your storage node is connected.

Advanced: Already have a Static IP? Configure TCP Port Forwarding ↓

Setup Dynamic DNS Service: Hostname Configuration

If you do not have a static IP, the first step is setting up a hostname.

There are various services available that allow you to set up a DDNS hostname. The following steps will guide you through doing this with one of the services, NoIP.

Create a Free Hostname using NoIP

Add a free hostname using NoIP which needs to be renewed every 30 days when using a free account. On the NoIP website, scroll down to “Create Your Free Hostname now”, then do the following:

  • In the hostname input field, select a hostname of your liking (e.g. mystoragenode), it can contain letters and numbers.

  • Next, select a hostname provider of your liking (e.g. “.ddns.net”) in the box to the right.

  • Click “Sign Up".

Figure 1. Domain name sign up

On the sign-up page, enter your email, username and password. Make sure to write these details down, as you will need them later.

Once you have created an account and clicked the confirmation link in the e-mail, scroll down to where it says “How to remote access your device” and click “Get started with Dynamic DNS.”

This will take you to the NoIP dashboard.

Figure 3. How to remote access your device

Setup Dynamic DNS Service: Dynamic Update Client Tool

You will need to setup a dynamic update tool, which automatically tracks and assigns the IP address to your hostname. So, if your public IP changes, your node won’t get disconnected from the network.

Please keep your hostname at hand as we will need it later.

If your router supports NoIP's Dynamic DNS, we highly recommend configuring your router. Here's how to do that.

Windows
Linux
MacOS

1. Download and install with link above. 2. Enter your NoIP credentials. 3. Select the hostname you created earlier and click "save".

Dynamic Update Client for Linux

First, open a new terminal window so you can type commands into Linux. Once you’ve opened your terminal window, log in as “root” user. You can become the root user from the command line by entering sudo -s followed by the root password on your machine.

Navigate to src folder:

cd /usr/local/src/

Download the necessary files:

wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz

Extract the files using the following command:

tar xf noip-duc-linux.tar.gz

Navigate to the folder:

cd noip-2.1.9-1/

Once in the directory, type:

make install

You’ll then be prompted to log in with your NoIP account username and password.

If you get “make not found” or “missing gcc” then you don’t have the gcc compiler tools installed. Install the gcc compiler tools to proceed.

As root again (or with sudo) issue this command:

/usr/local/bin/noip2 -C

You’ll then be prompted for your NoIP username and password, as well as the hostnames you wish to update.

One of the questions is, “Do you wish to update ALL hosts?” If answered incorrectly, this could affect hostnames in your account that are pointing at other locations.

Now that the client is installed and configured, you just need to launch it. Simply issue this final command to launch the client in the background:

/usr/local/bin/noip2

By default, the DUC software will not start when you reboot your system.

Check the README file in the no-ip-2.1.9 folder for instructions on how to make the client run at startup. This varies depending on what Linux distribution you are running.

1.Download the most recent version above. 2. Open the downloaded file and drag the NoIP icon to the applications folder. 3.Open the applications folder and double-click on the NoIP DUC icon. 4. Enter your NoIP username and password and Log In. 5. Select the hostnames you would like updated.

Once complete, you can close the Select a Hostname window.

Setup Port Forwarding: Router TCP Port Forwarding Configuration

To set up port forwarding on a router, we must first get the gateway IP address so we can access the router:

Windows
Linux
MacOS

Open command prompt and run the following command

ipconfig | findstr /i "Gateway"

Open the terminal app and run the following command

ip route | grep default

Open the terminal app and run the following command

netstat -nr | grep default

Once you have your gateway IP, open a browser and type it in.

You will be forwarded to a log in page of your router.

If you don't know the log in, try Googling the default username and password for your routers make and model.

Once you are logged in to your router, find the port forwarding tab (for some routers it's in "advanced settings").

Now, you will need get the local IP of your machine the node is running on:

Windows
Linux
MacOS

Open a command prompt and run the following command:

ipconfig | findstr /i "IPv4"

Open the terminal app and run the following command:

hostname -I

The local IP will be the first set of numbers.

Open the terminal app and run the following command:

If you are connected to a wireless network:

ipconfig getifaddr en0

If you are connected via Ethernet:

ipconfig getifaddr en1

Next, go back to your routers port forward page and add a new rule for port 28967 with the IPv4 address you just retrieved.

Windows
Linux
MacOS

Make sure to add a firewall rule.

Your node will most likely read offline if there is not a firewall rule set in place. To do that, run a Powershell as Administrator and execute:

New-NetFirewallRule -DisplayName "Storj v3" -Direction Inbound –Protocol TCP –LocalPort 28967 -Action allow

As an alternative, you can manually access it through Windows Defender:

Windows Defender Firewall-> Advanced Setting-> Inbound Rule-> New Rule-> Port

Congratulations, you've set up port forwarding!

Congratulations, you've setup port forwarding!

Congratulations, you've set up port forwarding!

Have any difficulties?

Search for port forwarding instructions for your exact router model.

Next up, select your installation method