NetFoundry for Zero Trust IOT / Edge embedded Networking

NetFoundry Platform Architecture

Introduction

NetFoundry provides a zero-trust dark network alternative solution to traditional solutions such as VPNs / SSL / TLS for IoT & Edge networks. Additionally, NetFoundry's software orchestration, APIs, and "Network as a code" helps in managing the scale of deployment and operations of IoT / Edge networks. This guide will cover steps in setting up a NetFoundry network for IoT / Edge embedded requirements. 

Network Diagram & Lab Set-Up:

In our setup,  we have considered the IoT / Edge device to be an open WRT device such as Teltonika RU240T. A computer connected to Teltonika edge is the LAN device that would act as the source device accessing the application. The Teltonika SDK toolchain is used to compile a Linux package with NetFoundry Linux c-sdk- tunnel. The Teltonika appliance runs the Linux tunnel package. At the cloud end, we have set up a  "Hello World" webserver at AWS behind a NetFoundry customer edge router. Both the webserver in the cloud and the computer at our lab are on private subnets. Services are created for accessing the webserver from the computer and the computer from the webserver to demonstrate that either side can host and access services. 

Step 1:  Create a network

The options in a Teams / Growth plan may vary. Refer to the support guide on creating a network on a Teams / Growth account. 

For Enterprise accounts, follow the below steps:

    • Log in to your NetFoundry Console athttps://nfconsole.io/.
    • Once logged in, you will be prompted to create your network.
    • Give your network a name.
    • Hit Create My Network to commence the provisioning of your network.
    • It will take approximately 5-10 minutes for the network provisioning to complete. Once your network is ready, you will see the spinning globe icon turning green.

For additional information or assistance please see our Support Hub article Product v7-Create and Manage Networks.

Step 2: Create the customer edge router hosting the service:

Customer self-hosted Edge Routers (CERs) act as egress routers for endpoints / other CERs to reach the services terminated on the CER endpoint.

For this lab demonstration, we have set up the customer edge router at AWS Singapore where the test application resides.

Create and Register Customer Edge Router

  • From your Network Dashboard page, navigate to Edge Routers.
  • Under the Edge Routers tab, click on the + sign at the upper-right to add an edge router.
  • Give your edge router a name.
  • Give your edge router a router attribute (optional). Router attributes are tags applied to a router. The same tag can be applied to other edge routers to form a collection of Customer-hosted Edge Routers. This attribute can be used for provisioning APPWANs.
  • Select Customer Hosted as your hosting type.
  • Hit Create to complete the process.
  • A new customer-hosted edge router would be created with the registration key as below. This registration key is required to register the edge router to the network.
  • Download the JWT registration token.

See more details here - https://support.netfoundry.io/hc/en-us/articles/360044956032-Create-and-Manage-Edge-Routers on the NetFoundry Support Hub.

Step 3: Provision NetFoundry-hosted Edge routers to build the fabric

NetFoundry hosted Edge Routers provide data transport as part of the fabric for endpoints and customer edge routers to dial to the fabric.  At least one publicly accessible Edge Router is required for endpoints and edge routers to create a fabric. Having a min of two hosted ERs is a best practice for redundancy and smart routing. 

  • From your Network Dashboard page, navigate to Edge Routers.
  • Under the Edge Routers tab, click on the + sign at the upper right to add an edge router.
  • Give your edge router a name.
  • Give your edge router a router attribute (optional). Router attributes are tags applied to a router. The same tag can be applied to other edge routers to form a group of NetFoundry-hosted Edge Routers.
  • Select NetFoundry Hosted as your hosting type, and choose the Data Center region strategic to Cloud Resources.
  • Hit Create to commence the provisioning of your edge router.
  • Once your edge router is registered, it will start accepting outbound fabric connections from a private edge router or endpoints.

See more details here - https://support.netfoundry.io/hc/en-us/articles/360044956032-Create-and-Manage-Edge-Routers on the NetFoundry Support Hub.

For this lab demonstration, we have created hosted edge routers at AWS Singapore and US East. The "Teams" account provides an option to host ERs only in OCI

Step 4: Build the NetFoundry executable for Teltonika OpenWRT edge device

A software development kit (SDK) is a set of software development tools that provides the possibility to create applications for a certain software package, software framework, computer system, or similar development platform.

1. The OpenWRT hardware manufacturers provide their own pre-configured SDKs for download. For our lab, we are using Teltonika RU240T as an IoT / Edge device.

You can download SDKs from one of the links in the section below, based on the choice of the Teltonika device.

https://wiki.teltonika-networks.com/view/Software_Development_Kit

2. For instructions on how to compile your own firmware using the SDK package - follow instructions to build the toolchain and target image for your target platform/device (it takes a while)

https://wiki.teltonika-networks.com/view/RUTOS_Software_Development_Kit_instructions

https://wiki.teltonika-networks.com/view/Legacy_RUTOS_Software_Development_Kit_instructions

mceclip2.png

mceclip5.png

3. Ziti Tunneler SDK for building `ziti-edge-tunnel`

Check out for ziti-tunneler-sdk-c folder in (https://github.com/openziti/ziti-tunnel-sdk-c)

mceclip0.png

                                                          or
Download the source code from (https://github.com/openziti/ziti-tunnel-sdk-c/releases)

mceclip2.png

Copy the Downloaded folder 'ziti-tunneler-sdk-c' to the virtual machine running Linux OS (Ubuntu), where you have compiled your own firmware using the SDK package.

mceclip3.png

4. Building ziti-edge-tunnel for OpenWRT

In the example below:
* `ZITI_TUN_SRC_DIR` is the location of the `ziti-tunneler-sdk-c` source
* `OPENWRT_DIR` is the location of OpenWRT SDK

* `openwrt-build.sh` is the script to simplify building of ziti-edge-tunnel with OpenWRT SDK builds [Teltonika SDK in this case]

```shell
$ mkdir /ziti/build
$ cd /ziti/build
$ ${ZITI_TUN_SRC_DIR}/script/openwrt-build.sh -s ${OPENWRT_DIR} -t ${TARGET}
```

mceclip3.png

mceclip4.png

mceclip7.png

mceclip6.png

5. Move the executable file and the jwt token to the Teltonika device:

mceclip9.png

mceclip14.png

mceclip16.png

6. Register the Ziti edge tunnel on the Teltonika device with the JWT

mceclip18.png

7. Run the Ziti edge tunnel on the Teltonika device

mceclip17.png

The Teltonika Ziti edge tunnel is online

mceclip19.png

Step 5: Create service, APPWAN & ER- Policy

Service

The service definition provides the details of what device, or devices) will be utilized to provide access to services, either on the device(Zero Trust Client SDK Application) or on the network connected to the device (via its LAN, for example).  The service also defines how the endpoints acting as clients to the service will access the service.  Also, the service hosting details are provided.

  • From your Network Dashboard page, navigate to Services.
  • Under the Services tab, click on the + sign at the upper right to add a service.
  • Choose the type of your service. Clicking on Advanced Services allows you to create services with IP/Port ranges.  
  • Select Advanced Service as the service type and give the service a name. Give your service a service attribute (optional). Service Attributes are tags applied to a service. The same tag can be applied to other services to form a group of services.
  • In the Edge Router Attributes field, specify the public ( ex NF Hosted) edge routers participating in this service. If all edge routers are participating in this service, then leave this field blank. 
  • The Client intercept configuration is the section used to denote how the Client Endpoints that will be utilizing this service need to access it. There can be a hostname or IP Address or IP subnet specified, along with the application port numbers or port ranges. Multiple individual ports  or port ranges can be configured. The hostname can be any contrived hostname to be utilized by the Client user.  The protocol - TCP or UDP or both may be allowed.
  • The Destination Configuration  is used to configure the terminating endpoints and the destination details if forwarding is disabled. Select one or more endpoints to host the service by the individual endpoint names or endpoint group attributes . Select protocol / address / port forwarding if the destination is reachable on the same hostname / IP / procotol / port or ports as in the client intercept configuration.
  • If the destination IP / hostname / port are different from the client configuration, you can disable forwarding of IP / hostname or port or protocol and provide the details. The NetFoundry local DNS will resolve the client configuration to the destination configuration. Ensure that the application / destination is reachable on the IP / port / port range / protocol as specified in the destination configuration.

  • Hit Create to complete the process.

Service for the APP at AWS

mceclip3.png

 

Service for the Teltonika device management portal:

Note that the services can also be hosted on the computer connected to Teltonika RU240T.

mceclip3.png

 

For additional information or assistance please see our Support Hub article Create and Manage Services.

APPWAN

The AppWAN defines the services that can be accessed by one or more client endpoints.

  • From your Network Dashboard page, navigate to AppWANs.
  • Under the AppWANs tab, click on the + sign at the upper right to add an AppWAN.
  • Give your AppWAN a name.
  • In the Service Attributes field, specify the services or service attributes to be associated with this AppWAN.
  • In the Endpoint Attributes field, specify the endpoints or endpoint attributes to be associated with this policy.
  • Click Create to complete the process.

Note: The use of the endpoint/service attribute will select all endpoints/services having that specific attribute. The @ symbol is used to tag Individual endpoints/services and the # symbol is used to tag a group of endpoints/services/edge routers.

APPWAN to access services hosted on Teltonika RU240T:

mceclip1.png

mceclip4.png

APPWAN to access the hello world app hosted in AWS from the computer connected to TeltonikaRU240T:

 

mceclip5.png

For additional information or assistance please see our Support Hub article Create and Manage AppWANs.

ER-Policy: 

Edge Router Policies - Defines specific Edge Routers for specific Endpoints (can be used for Network Transport segregation/optimization).

  • From your Network Dashboard page, navigate to Edge Routers.
  • Under the Edge Routers Policies tab, click on the + sign at the upper right to add a policy. An Edge Router Policy allows a specific endpoint or group of endpoints to have access to a specific edge router or group of edge routers.
  • Give your edge router policy a name.
  • In the Edge Router Attributes field, specify the edge routers to be associated with this policy. Use of edge router attribute will select all edge routers having that specific attribute.
  • In the Endpoint Attributes field, specify the endpoints to be associated with this policy. Use of endpoint attribute will select all endpoints having that specific attribute.
  • Hit Create to complete the process.

mceclip1.png

To know more about Edge Routers Policies go to the Create and Manage Edge Router Policies article on the NetFoundry Support Hub.

Step 6: Access your services

Teltonika device management portal being accessed over NetFoundry network

mceclip2.png

Laptop connected to Teltonika RU240T accessing hello world app hosted in AWS

mceclip2.png

The applications or the service is accessed via a private hostname that is not reachable via the public internet. The application is therefore dark to the outside world and reachable only within the NetFoundry network.

 

 

 

 

Was this article helpful?
2 out of 2 found this helpful

Comments

0 comments

Please sign in to leave a comment.