If I have seen further it is by standing on the shoulders of Giants
– was famously said by Isaac Newton.
Except humbling himself, Newton expressed the very nature of the success of us humans by saying those words. By building upon others success and contributing back to the community, everyone benefits!
In this post, I want to show an example of how we, at Cubro along with our partner QXIP, have used the power of Open-source software to elevate the EXA8 to the product it is today.
When I received the EXA8 a couple of months ago, it was an ARM-powered Linux box with a configurable 8 x 1G ports switch and 2x 10G SPF+ ports. My first reaction was, ‘cool box, but what can I do with it?’ Turns out a lot!
I started with simple stuff and created a Web UI and login form with user management.
The current consensus is to use SPAs for developing web applications. Perfect timing to dig into ReactJS which is one of the leading technologies used for building modern interactive User Interfaces.
Originally created by Facebook, ReactJS is a good example of how open source software can also benefit the company that is releasing it. Over the years ReactJS has become one of the most popular Web-Frameworks and at the time of writing this, over 1300 Developers have contributed towards its codebase and enhanced it for all users.
For the distribution of the HTML, JS and other static files, I chose the well-established Webserver NGINX. Fast, reliable, and easy to use; it is not hard to see why it became the most popular Open Source Web Server on the internet.
At this point the non-functional features were complete and it was time to think about how to “Elevate the EXA8”. I was introduced to Lorenzo Mangani from QXIP. Lorenzo is the founder and CEO of QXIP with over a decade of experience in telecommunications and VOIP. Lorenzo collaborated with us at Cubro during the development of the EXA8 platform and helped us with his vast knowledge and interconnectedness with the Open-source community.
Through Lorenzo we implemented Stenographer, a tool created by Google for troubleshooting their own network infrastructure. This enabled us to implement a rolling-capture of all the traffic that goes through the EXA8 and quickly extract a PCAP between two timestamps.
Stenographer is a CLI only tool, meaning there was no graphical UI for it. However, it is an open source tool and therefore I could read how its internals worked. I decided to write a Stenographer-Parser myself for it which returned me the json data I needed to paint a Graph of the used bandwidth for the Web UI.
Speaking of graphs, the Library I chose to paint them is called React-Vis and it’s made by Uber. Another example of how a company can build upon another’s successful product and increase the value of it for everyone involved!
With the rolling-capture done, we felt we could do more. Why simply extract a PCAP, why not examine it right there on the Web? This is exactly what Lorenzo helped us with, by suggesting we implement Webshark onto the EXA8 platform.
Lorenzo and I worked on this feature together. I took care of porting the Webshark backend from Django to NodeJS while Lorenzo took care of the Fastify server and Docker integration. In a short amount of time, Webshark was successfully ported and integrated into the EXA8.
We weren’t done yet, so we started working on making ntopng part of the EXA8. We already had a standard Linux Network Interface called Xv from which we can tap packets and hence it was straight forward to point ntopng towards it as the source. As a result, EXA8 is now able to monitor live network traffic and discover application protocols such as Facebook or Youtube.
This is the power of Open Source Software. And with the EXA8 your ideas can be implemented as easily as apt-get install too.
By Nikola Jovicic