Speedtest Overview

The Speedtest application consists of two docker containers. The first container (netfoundry/speedtest) implements the user-facing web application (we'll refer to this as the application). The second container (netfoundry/speedtest-remote) implements the remote payload server (we'll refer to this as the remote).

Speedtest does rough performance characterization of both the "server to server" and the "local" (end user to application) links. It compares the performance of these links by requesting data payloads from the remote over both the public internet, and also over NetFoundry Network. The configuration looks roughly like this:

The SpeedTest will pull 2MB chunks for a total of 48MB.

Getting Started is Easy

We'll walk you through the simple steps below to spin up your first network and create a SpeedTest demonstration that can be used in any region of AWS.


Sign up for both an AWS and NetFoundry Accounts if you don't have one. They're free.

Sign up for a AWS Account

Click Here

Sign up for a NetFoundry Account

Click Here


a. Log into your NetFoundry console

b. If you have not created a network yet, “Create A New Network” and give it a name (ex: NFdemo).

c. It will take approximately 5-8 minutes for you network to be created. While the network is being created, the icon to the left of the network name will spin. Once your network is ready, the icon turns green.


We will break this tutorial into two pieces. The first part implements a Cloud Formation script which builds a pre-configured VPC with an NFN gateway and a SpeedTest payload server. The VPC and associated components will be created by the Cloud Formation script. This is called the “Remote side” and should be located in a distant region.

The second part will include setting up a single AWS Linux AMI in a “working” VPC in a nearby region. This instance provides the web front end to access the remote payload server. Your VPC must be active and have all the components including: Internet Gateway, active subnet, route table with subnet association, security group & ssh keys. You may also implement this host in other Cloud providers or on premise, however the example uses AWS with User Data parameter{s}. This is called the “App” side.

For the NFN prebuilt webserver:

a. From the NetFoundry Console left-hand navigation, select GATEWAYS.

b. In the upper right, click the + sign to add a gateway.

c. Select the “Create an AWS Gateway” option

d. Give your gateway a name (ex: gwDemo)

e. From the dropdown menu, select the region in which you plan to launch the AWS gateway. Hit the “Create” button.

f. Click on your Gateway Registration Key (this will copy it to your clipboard).

g. Hit Esc icon in upper right to close the window


For the prebuilt NetFoundry Gateway & webserver:

a. Click here to add NetFoundry MultiCloud Gateway to your AWS account – this will take you to your AWS account

b. CloudFormation will launch in the last region your account was signed in. If you would like to launch in a different region, simply switch regions from the drop down. Please be sure you are launching in the same region you selected your NetFoundry gateway to be in (from 3.e above).

c. Once in the CloudFormation Console, the template should already be filled in. Click Next to continue.

d. Paste your Gateway Registration key in the appropriate field. Click Next to continue.

e. On the next page (“Options”) – leave all defaults. Click Next to continue.

f. From the Review page… Click Create to launch the stack

g. This CloudFormation will create a simple VPC, subnet, routing table, internet gateway & two (2) EC2 instances along with a security group to allow port 8080(http) from anywhere to the Demo App.
• One t2.micro for the SpeedTest payload server
• One t2.micro for the NetFoundry MultiCloud Gateway

h. Once the stack is launched, go to the CloudFormation “Output” section of the stack just created. You will find the internal IP address of the SpeedTest App you will need for the next section. You can also test the external URL of the SpeedTest App to make sure it’s accessible. The internal URL will only work once the NFN network is complete. (This could take 2-3 minutes)


Before you can start using the NetFoundry CloudFormation template, you will need to accept the software terms in the AWS Marketplace.

- Login to AWS if needed.

- Click on the "Manual Launch" tab

- Click on "Accept Software Terms"


a. From the Left side panel select Network Dashboard. Then select SERVICES.

b. In the upper right, click the + sign to add a service.

c. Select “CREATE AN IP Host Service”.

d. Add a service name (ex: speedtest-remote).

e. Select a GATEWAY from the drop-down menu i.e. the one that you create in 4.

f. For the IP address use the private IP copied from above (step 4.h). This IP should be

g. Port/range = 8080

h. Intercept IP can be anything you want.  In our example we will leave it blank.

i. Protocol Type = TCP/UDP

j. Hit the “Create” button (NOTE: The Service you just created may take a couple minutes to complete before it becomes available in the list – the icon will turn GREEN when it is ready)


a. From the NetFoundry Console left-hand navigation select NETWORK DASHBOARD, select CLIENTS.

b. In the upper right, click the + sign to add a client.

c. Add a client name (ex: MikesMac).

d. Select Standard from the drop down menu.

e. From the Location dropdown menu, select the region closest to where you are located (NetFoundry uses this location information to optimize network).

f. Hit the “Create” button.

g. Copy the client registration key to your clipboard.

h. Hit Esc icon in upper right to close the window.


j. Click DOWNLOAD on the appropriate installer.


a. If you didn’t do step 6i then go  here and download the appropriate client for your computer. Client installation and registration instructions can be found here.

b. Follow the install instructions and enter the client registration key you copied (step 6.f).

Attention PC users: you may need to disable AntiVirus/Firewall.

Attention Mac users: If you experience issues trying to install the .pkg. Go to Security & Privacy -> general -> select open anyway for Nfninstall.pkg. You may need to install helper and grant dispersive systems access to system. Note that the NFN client will be visible on the top right of the navigation bar. You can click on it to activate it.


a. Make sure your Service in Step 5 has completed (the icon next to the Service name will be green)

b. From the NetFoundry Console left-hand navigation select NETWORK DASHBOARD. Then select APPWANS.

c. In the upper right, click the + sign to add a new AppWAN.


e. Add an APPWAN NAME (ex: SpeedTestAppWAN).

f. Underneath the “AVAILABLE CLIENTS” Select the client installed from step 6.

g. Click on your  client and it should move right to section “SELECTED ENDPOINTS”

f. In section 3 of this page, under the section “ADD SERVICES” add the Service created in step 5 by clicking on it. It should move to the right under “SELECTED SERVICES”.

g. Hit the “Create” button.

9. Configuration of SpeedTest application front-end webserver

a. In a nearby region create an AWS Linux AMI instance to support the website. Ensure you have a working VPC in that region which includes, Internet Gateway, a subnet, working route table with a entry pointing to IGW, Security group accepting connections from anywhere on Custom TCP ports 80-8080.

b. From the AWS Console hit launch instance.

c. Select the second Linux AMI Image

d. Choose a T3.small or T3.medium instance type and hit Next to Configure Instance details.

e. Select the desired Network VPC, Subnet and enable Auto-assign Public IP. Leave other parameters as default and scroll to the bottom and expand Advanced Details. Populate the User data field with the following entries “As text”. And hit Next

#!/bin/bash -ex

sudo su -

yum update -y

yum install docker -y

service docker start

docker run -d -it -p 80:8080 -e HTTP_PORT=8080 -e PUBLIC_IP=insertSpeedtestRemotePublicIPfromStep4 -e
INTERCEPT_IP= --name speedtest --rm netfoundry/speedtest 

f. Accept defaults for Storage and Tags. Choose or create a Security group with SSH port 22 and Custom TCP ports 80-8080 open to Anywhere. Hit Next and Launch, Select Key pair for instance and hit Launch Instance.


a.Make sure your NetFoundry client is running
• For Mac: Open NFN Client in Applications
• For PC: Open NFN Client from the Start Menu

Open Web browser and insert the following URL.


b.The SpeedTest web page should come up with this view.


a. From the AWS Console, select the service “CloudFormation”

b. Select the stack that you created within the region from the list

c. Click DELETE.

d. Remove Linux AMI application server from a distant region.