SlideShare a Scribd company logo
Creating Network Overlays
with IoT Devices using N2N
Emanuele Faranda <faranda@ntop.org>
Emanuele Faranda – LinuxLab 2018
IoT Challenges [1/2]
 Constrained resources (cpu, memory)
 Connect to the device for
configuration/troubleshooting
 Remotely export data and metrics
 Remotely install security updates
Emanuele Faranda – LinuxLab 2018
IoT Challenges [2/2]
 Interconnect different IoT devices in a
secure way
 Monitor the devices traffic for
anomaly/malware detection
 Implement policies to block unknown
threats
Emanuele Faranda – LinuxLab 2018
Internet Today
 The IP address of the devices is dynamic
 IoT devices are often located behind NAT
 IPv6 can improve the situation but we still
need a way to define our own networks
Emanuele Faranda – LinuxLab 2018
NAT and Home [1/2]
Emanuele Faranda – LinuxLab 2018
NAT and Home [2/2]
How to reach the device from anywhere?
 Setup IP forwarding in the home router
 Use dedicated vendor software to access
the device from the cloud
 The vendor must implement security into
the application
Emanuele Faranda – LinuxLab 2018
 Existing VPN solutions are complex and
heavyweight
 Most IoT protocols are not encrypted by
design (MQTT, HTTP, ...) and would require
modifications
Other Problems
Emanuele Faranda – LinuxLab 2018
Our Vision
 The internet should be a “transparent” IP-
based transport for users, not a
geographical/ISP constrain
 Users should control/create their
community networks (today network
administrators do)
 Move encryption and network reachability
from the application to the network layer
Emanuele Faranda – LinuxLab 2018
Introducing N2N [1/2]
 Is an encrypted Layer 2 VPN
 It can cross NAT and firewalls
 It’s decentralized, no single point of failure
(like traditional VPN)
 Makes it simple to join multiple virtual
networks (comminities)
Emanuele Faranda – LinuxLab 2018
 Open source project, driven by the
community
 Easy setup: cli tool or service
 Easy integration: just a single function call
 Cross platform: Android, Linux, *BSD,
MacOs, Windows
Introducing N2N [2/2]
Emanuele Faranda – LinuxLab 2018
N2N Architecture [1/2]
Edge
Node
Edge
Node
Edge
Node
Edge
Node
Super
Node
Super
Node
Edge
Node
Edge
Node
Super
Node
Super
Node
Edge
Node
Edge
Node
Edge
Node
Edge
Node
Edge
Node
Edge
Node
Edge
Node
Edge
Node
Emanuele Faranda – LinuxLab 2018
 Meshed, semi-centralized architecture (like
P2P) with super-nodes that can be build the
basic network infrastructure
 Multiple supernodes to announce hosts
 Edge nodes beloging to the same
community can talk together
 Each edge node has a virtual network
interface for each network it joined
N2N Architecture [1/2]
Emanuele Faranda – LinuxLab 2018
Don’t Reinvent The
Wheel
 TUN/TAP adapters to run across OS
 L2/L3 encrypted tunnels are used by peers
to communicate
 P2P protocols will be used for finding and
registering hosts, as well as announcing
new networks (communities)
 DHCP and DNS
Emanuele Faranda – LinuxLab 2018
Why P2P
 P2P has overcome all the limitation of the
“closed” internet (firewalls, dynamic IP and
NAT)
 P2P can be seen as a “new/modern” IP
routing protocol
 P2P allows decentralized application
design and works even with non-
permanent connections contrary to IP
Emanuele Faranda – LinuxLab 2018
Install N2N
Prebuilt binaries:
 Setup repo http://packages.ntop.org
 $ apt-get install n2n
From github:
 $ git clone https://github.com/ntop/n2n
 $ ./autogen.sh && make
Emanuele Faranda – LinuxLab 2018
Run N2N
 edge1$ edge -d n2n0 -c mycommunity -k
mykey -a 192.168.9.1 -l
supernode.ntop.org:7777
 edge2$ edge -d n2n0 -c mycommunity -k
mykey -a 192.168.9.2 -l
supernode.ntop.org:7777
 edge2$ ping 192.168.9.1
Emanuele Faranda – LinuxLab 2018
N2N Today
 Users can setup their own supernodes
Users can join different communities at
once
 Edge nodes can talk directly (in a LAN via
multicast advertisements, or in a WAN if
not NATed)
 N2N can be intergrated into other software
Emanuele Faranda – LinuxLab 2018
Embedding N2N
Emanuele Faranda – LinuxLab 2018
Remote Assistance
(ntopng)
Emanuele Faranda – LinuxLab 2018
Performance (scp)
 Line rate: 1 gbit/s
 Direct transfer: 900 mbit/s
 N2N no encryption: 850 mbit/s
 N2N with encryption: 114 mbit/s
Note: encryption currently requires high computational
resources and provides low througput. This will be
addressed in the next release.
Emanuele Faranda – LinuxLab 2018
Going Beyond
 Use asymmetric keys for nodes end-to-end
encryption
 Leverage hardware encryption
 Apply traffic policies at the edge (nDPI)
 Make N2N traffic stealth to DPI software
Emanuele Faranda – LinuxLab 2018
Credits and Links
● Luca Deri <deri@ntop.org>
● https://www.ntop.org/products/n2n
● https://github.com/ntop/n2n
● https://www.ntop.org/guides/ntopng/remot
e_assistance.html
● https://github.com/gregnietsky/simpletun
Emanuele Faranda – LinuxLab 2018
Thank You

More Related Content

PDF
Luca Cipriani - Control your Embedded Linux remotely by using MQTT and a web ...
PDF
Claudio Scordino - Handling mixed criticality on embedded multi-core systems
PDF
Alessio Lama - Development and testing of a safety network protocol
PDF
Michele Dionisio & Pietro Lorefice - Developing and testing a device driver w...
PDF
Tommaso Cucinotta - Low-latency and power-efficient audio applications on Linux
PDF
Mirko Damiani - An Embedded soft real time distributed system in Go
PDF
Andrea Righi - Spying on the Linux kernel for fun and profit
PDF
BSD Sockets API in Zephyr RTOS - SFO17-108
Luca Cipriani - Control your Embedded Linux remotely by using MQTT and a web ...
Claudio Scordino - Handling mixed criticality on embedded multi-core systems
Alessio Lama - Development and testing of a safety network protocol
Michele Dionisio & Pietro Lorefice - Developing and testing a device driver w...
Tommaso Cucinotta - Low-latency and power-efficient audio applications on Linux
Mirko Damiani - An Embedded soft real time distributed system in Go
Andrea Righi - Spying on the Linux kernel for fun and profit
BSD Sockets API in Zephyr RTOS - SFO17-108

What's hot (20)

PDF
Valerio Di Giampietro - Introduction To IoT Reverse Engineering with an examp...
PDF
BUD17-104: Scripting Languages in IoT: Challenges and Approaches
PDF
BKK16-500K2 CTO talk - The End to End Story
PDF
MOVED: RDK/WPE Port on DB410C - SFO17-206
PDF
Internet of Tiny Linux (IoTL): Episode IV - SFO17-100
PPTX
LAS16-300K2: Geoff Thorpe - IoT Zephyr
PDF
BKK16-105 HALs for LITE
PDF
Using SoC Vendor HALs in the Zephyr Project - SFO17-112
PDF
LAS16-100K1: Welcome Keynote
PDF
BKK16-309A Open Platform support in UEFI
PDF
Stefano Cordibella - An introduction to Yocto Project
PDF
LAS16-400K2: TianoCore – Open Source UEFI Community Update
PDF
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
PDF
LAS16-407: Internet of Tiny Linux (IoTL): the sequel.
PDF
BKK16-211 Internet of Tiny Linux (io tl)- Status and Progress
PDF
New Zephyr features: LWM2M / FOTA Framework - SFO17-113
PDF
Mender; the open-source software update solution
PDF
BUD17-405: Building a reference IoT product with Zephyr
PDF
Mender: The open-source software update solution
PDF
Kernel Recipes 2017 - Developing an embedded video application on dual Linux ...
Valerio Di Giampietro - Introduction To IoT Reverse Engineering with an examp...
BUD17-104: Scripting Languages in IoT: Challenges and Approaches
BKK16-500K2 CTO talk - The End to End Story
MOVED: RDK/WPE Port on DB410C - SFO17-206
Internet of Tiny Linux (IoTL): Episode IV - SFO17-100
LAS16-300K2: Geoff Thorpe - IoT Zephyr
BKK16-105 HALs for LITE
Using SoC Vendor HALs in the Zephyr Project - SFO17-112
LAS16-100K1: Welcome Keynote
BKK16-309A Open Platform support in UEFI
Stefano Cordibella - An introduction to Yocto Project
LAS16-400K2: TianoCore – Open Source UEFI Community Update
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
LAS16-407: Internet of Tiny Linux (IoTL): the sequel.
BKK16-211 Internet of Tiny Linux (io tl)- Status and Progress
New Zephyr features: LWM2M / FOTA Framework - SFO17-113
Mender; the open-source software update solution
BUD17-405: Building a reference IoT product with Zephyr
Mender: The open-source software update solution
Kernel Recipes 2017 - Developing an embedded video application on dual Linux ...
Ad

Similar to Emanuele Faranda - Creating network overlays with IoT devices using N2N (20)

PDF
ESP8266 and IOT
PDF
Andrea De Gaetano - An Adventure with ESP8266 firmwares and IOT
PPTX
What should you know about Net Core?
PDF
Network Design For Alliance Française de Dhaka
PDF
ArduRadio
PDF
#OSSPARIS19 : Control your Embedded Linux remotely by using WebSockets - Gian...
PPTX
DockerDay2015: Keynote
ODP
Deauthentication Attack with Node MCU & Esp8266
PDF
Chapter 7 security tools i
PDF
nativeappdevelopmentwithpython1658264723355.pdf
PDF
SDN & NFV Introduction - Open Source Data Center Networking
PDF
Network Virtualization & Software-defined Networking
PPTX
Microsoft Connect 2018 .NET User Group Paderborn
PDF
Making Networking Apps Scream on Windows with DPDK
PDF
Resin.io overview (2016 July)
PPT
FIWARE Developers Week_FIWARE IoT: Beginner's tutorial_conference
PDF
Katuwal_Arun_flex_get_vpn.pdf
PPTX
IRATI @ RINA Workshop 2014, Dublin
PDF
IBC2022 IPShowcase: Tips for Media-over-IP Network Design
PDF
229 Convergence In Device Software
ESP8266 and IOT
Andrea De Gaetano - An Adventure with ESP8266 firmwares and IOT
What should you know about Net Core?
Network Design For Alliance Française de Dhaka
ArduRadio
#OSSPARIS19 : Control your Embedded Linux remotely by using WebSockets - Gian...
DockerDay2015: Keynote
Deauthentication Attack with Node MCU & Esp8266
Chapter 7 security tools i
nativeappdevelopmentwithpython1658264723355.pdf
SDN & NFV Introduction - Open Source Data Center Networking
Network Virtualization & Software-defined Networking
Microsoft Connect 2018 .NET User Group Paderborn
Making Networking Apps Scream on Windows with DPDK
Resin.io overview (2016 July)
FIWARE Developers Week_FIWARE IoT: Beginner's tutorial_conference
Katuwal_Arun_flex_get_vpn.pdf
IRATI @ RINA Workshop 2014, Dublin
IBC2022 IPShowcase: Tips for Media-over-IP Network Design
229 Convergence In Device Software
Ad

More from linuxlab_conf (10)

PDF
Jonathan Corbet - Keynote: The Kernel Report
PDF
Marco Cavallini - Yocto Project, an automatic generator of embedded Linux dis...
PDF
Bruno Verachten - The Android device farm that fits in a (cloudy) pocket
PDF
Jagan Teki - U-boot from scratch
PDF
Jacopo Mondi - Complex cameras are complex
PDF
Dario Faggioli - Virtualization in the age of speculative execution HW bugs
PDF
Angelo Compagnucci - Upgrading buildroot based devices with swupdate
PDF
Davide Berardi - Linux hardening and security measures against Memory corruption
PDF
Luca Abeni - Real-Time Virtual Machines with Linux and kvm
PDF
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
Jonathan Corbet - Keynote: The Kernel Report
Marco Cavallini - Yocto Project, an automatic generator of embedded Linux dis...
Bruno Verachten - The Android device farm that fits in a (cloudy) pocket
Jagan Teki - U-boot from scratch
Jacopo Mondi - Complex cameras are complex
Dario Faggioli - Virtualization in the age of speculative execution HW bugs
Angelo Compagnucci - Upgrading buildroot based devices with swupdate
Davide Berardi - Linux hardening and security measures against Memory corruption
Luca Abeni - Real-Time Virtual Machines with Linux and kvm
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job

Recently uploaded (20)

PPTX
Materi-Enum-and-Record-Data-Type (1).pptx
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PDF
medical staffing services at VALiNTRY
PPTX
Materi_Pemrograman_Komputer-Looping.pptx
PPTX
ai tools demonstartion for schools and inter college
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Transform Your Business with a Software ERP System
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
Online Work Permit System for Fast Permit Processing
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Materi-Enum-and-Record-Data-Type (1).pptx
How to Choose the Right IT Partner for Your Business in Malaysia
ManageIQ - Sprint 268 Review - Slide Deck
medical staffing services at VALiNTRY
Materi_Pemrograman_Komputer-Looping.pptx
ai tools demonstartion for schools and inter college
Design an Analysis of Algorithms II-SECS-1021-03
Transform Your Business with a Software ERP System
Internet Downloader Manager (IDM) Crack 6.42 Build 41
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
2025 Textile ERP Trends: SAP, Odoo & Oracle
How Creative Agencies Leverage Project Management Software.pdf
PTS Company Brochure 2025 (1).pdf.......
Which alternative to Crystal Reports is best for small or large businesses.pdf
Softaken Excel to vCard Converter Software.pdf
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Online Work Permit System for Fast Permit Processing
Lecture 3: Operating Systems Introduction to Computer Hardware Systems

Emanuele Faranda - Creating network overlays with IoT devices using N2N

  • 1. Creating Network Overlays with IoT Devices using N2N Emanuele Faranda <faranda@ntop.org>
  • 2. Emanuele Faranda – LinuxLab 2018 IoT Challenges [1/2]  Constrained resources (cpu, memory)  Connect to the device for configuration/troubleshooting  Remotely export data and metrics  Remotely install security updates
  • 3. Emanuele Faranda – LinuxLab 2018 IoT Challenges [2/2]  Interconnect different IoT devices in a secure way  Monitor the devices traffic for anomaly/malware detection  Implement policies to block unknown threats
  • 4. Emanuele Faranda – LinuxLab 2018 Internet Today  The IP address of the devices is dynamic  IoT devices are often located behind NAT  IPv6 can improve the situation but we still need a way to define our own networks
  • 5. Emanuele Faranda – LinuxLab 2018 NAT and Home [1/2]
  • 6. Emanuele Faranda – LinuxLab 2018 NAT and Home [2/2] How to reach the device from anywhere?  Setup IP forwarding in the home router  Use dedicated vendor software to access the device from the cloud  The vendor must implement security into the application
  • 7. Emanuele Faranda – LinuxLab 2018  Existing VPN solutions are complex and heavyweight  Most IoT protocols are not encrypted by design (MQTT, HTTP, ...) and would require modifications Other Problems
  • 8. Emanuele Faranda – LinuxLab 2018 Our Vision  The internet should be a “transparent” IP- based transport for users, not a geographical/ISP constrain  Users should control/create their community networks (today network administrators do)  Move encryption and network reachability from the application to the network layer
  • 9. Emanuele Faranda – LinuxLab 2018 Introducing N2N [1/2]  Is an encrypted Layer 2 VPN  It can cross NAT and firewalls  It’s decentralized, no single point of failure (like traditional VPN)  Makes it simple to join multiple virtual networks (comminities)
  • 10. Emanuele Faranda – LinuxLab 2018  Open source project, driven by the community  Easy setup: cli tool or service  Easy integration: just a single function call  Cross platform: Android, Linux, *BSD, MacOs, Windows Introducing N2N [2/2]
  • 11. Emanuele Faranda – LinuxLab 2018 N2N Architecture [1/2] Edge Node Edge Node Edge Node Edge Node Super Node Super Node Edge Node Edge Node Super Node Super Node Edge Node Edge Node Edge Node Edge Node Edge Node Edge Node Edge Node Edge Node
  • 12. Emanuele Faranda – LinuxLab 2018  Meshed, semi-centralized architecture (like P2P) with super-nodes that can be build the basic network infrastructure  Multiple supernodes to announce hosts  Edge nodes beloging to the same community can talk together  Each edge node has a virtual network interface for each network it joined N2N Architecture [1/2]
  • 13. Emanuele Faranda – LinuxLab 2018 Don’t Reinvent The Wheel  TUN/TAP adapters to run across OS  L2/L3 encrypted tunnels are used by peers to communicate  P2P protocols will be used for finding and registering hosts, as well as announcing new networks (communities)  DHCP and DNS
  • 14. Emanuele Faranda – LinuxLab 2018 Why P2P  P2P has overcome all the limitation of the “closed” internet (firewalls, dynamic IP and NAT)  P2P can be seen as a “new/modern” IP routing protocol  P2P allows decentralized application design and works even with non- permanent connections contrary to IP
  • 15. Emanuele Faranda – LinuxLab 2018 Install N2N Prebuilt binaries:  Setup repo http://packages.ntop.org  $ apt-get install n2n From github:  $ git clone https://github.com/ntop/n2n  $ ./autogen.sh && make
  • 16. Emanuele Faranda – LinuxLab 2018 Run N2N  edge1$ edge -d n2n0 -c mycommunity -k mykey -a 192.168.9.1 -l supernode.ntop.org:7777  edge2$ edge -d n2n0 -c mycommunity -k mykey -a 192.168.9.2 -l supernode.ntop.org:7777  edge2$ ping 192.168.9.1
  • 17. Emanuele Faranda – LinuxLab 2018 N2N Today  Users can setup their own supernodes Users can join different communities at once  Edge nodes can talk directly (in a LAN via multicast advertisements, or in a WAN if not NATed)  N2N can be intergrated into other software
  • 18. Emanuele Faranda – LinuxLab 2018 Embedding N2N
  • 19. Emanuele Faranda – LinuxLab 2018 Remote Assistance (ntopng)
  • 20. Emanuele Faranda – LinuxLab 2018 Performance (scp)  Line rate: 1 gbit/s  Direct transfer: 900 mbit/s  N2N no encryption: 850 mbit/s  N2N with encryption: 114 mbit/s Note: encryption currently requires high computational resources and provides low througput. This will be addressed in the next release.
  • 21. Emanuele Faranda – LinuxLab 2018 Going Beyond  Use asymmetric keys for nodes end-to-end encryption  Leverage hardware encryption  Apply traffic policies at the edge (nDPI)  Make N2N traffic stealth to DPI software
  • 22. Emanuele Faranda – LinuxLab 2018 Credits and Links ● Luca Deri <deri@ntop.org> ● https://www.ntop.org/products/n2n ● https://github.com/ntop/n2n ● https://www.ntop.org/guides/ntopng/remot e_assistance.html ● https://github.com/gregnietsky/simpletun
  • 23. Emanuele Faranda – LinuxLab 2018 Thank You