arXiv:2609.35256cs.CRSep 2026

Manuscript Offprint

arXiv:2609.35256

Implementing Data Diodes Using Commodity Hardware and Open Source Software

Peter Story, Gert-Jan den Besten

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

One-way network devices, known as data diodes, are used to defend against sophisticated cyberattacks. Partly due to their high cost, data diodes are mostly deployed in nuclear power plants and within the government for handling classified information. Although commercially available data diodes are expensive, a data diode's hardware can assembled from commodity fiber-optic network equipment. However, specialized software is needed to send data through a data diode reliably: the receiving program cannot request retransmission of dropped packets, so packet loss must be minimized and mitigated. First, we developed a minimal program to measure packet loss. We found that most packet loss was caused by the receiving program processing incoming packets too slowly, and that packet loss often occurs in clusters. Also, we discovered ways to minimize packet loss on Linux and macOS without using superuser privileges. Next, we tested three existing open source programs for one-way data transfers: netcat, UDPcast, and lidi. Although these programs were unreliable in their default configurations, we identified reliable configurations for UDPcast and lidi. Finally, we incorporated our findings into pydiode, our cross-platform program for reliable one-way data transfers.

1 Introduction

It is challenging to defend against technically sophisticated cyberattacks. Militaries, intelligence agencies, and other powerful entities use unpatched software vulnerabilities to launch zero-day attacks against high-value targets. Nearly any internet-connected device can be hacked by zero-day attacks [3, 22]. Software-based solutions offer limited protection, since they can be hacked themselves. One approach to defend against zero-day attacks is to physically isolate devices from the internet using an air gap. However, air gaps are often impractical, since it is necessary to exchange data with most devices. Manually transferring data across an air gap using a USB drive is cumbersome and insecure [15, 36, 54, 16]. One-way network devices, known as data diodes, offer a more secure and usable alternative [18, 48]. Data diodes are physically limited to only transfer data in one direction. Today, data diodes are mostly deployed in nuclear power plants and within the government for handling classified information. Commercially available data diodes are expensive, with some costs exceeding one hundred thousand dollars [10]. Their high prices may discourage more widespread adoption. A data diode's hardware can be assembled from commodity fiber-optic network equipment [9, 55, 49]. However, specialized software is needed to send data through a data diode reliably: the receiving program cannot request retransmission of dropped packets, so packet loss must be minimized and mitigated. We answer three research questions about data diodes:

  1. What causes packet loss in data diodes?

  2. How does existing open source software for one-way data transfers perform? In particular, how long do transfers take, and how often do transfers fail?

  3. Can our own software send data reliably in less time than existing software?

First, we developed a minimal program to measure packet loss under different conditions on Linux and macOS ( §§ 3.3). We collected statistics on packet loss while transferring terabytes of data through a data diode built using commodity network hardware ( §§ 4.1 and §§ 4.2). In our testing, 99.99% of packet loss was due to RcvbufErrors, caused by the receiving program processing incoming packets too slowly. We discovered several ways to minimize packet loss without using superuser privileges. Some results were expected: packet loss can be minimized by using a separate helper thread to write out received data, programs on Linux can send packets with larger payloads, and programs on macOS can request a larger receive buffer size. However, we also made several counterintuitive discoveries. First, on both Linux and macOS, we observed cases where transferring data more slowly decreased transfer reliability.

Second, we found that although sending larger packets increased reliability on Linux, sending larger packets on macOS could decrease reliability.

Next, we performed one-way data transfers using three existing open source programs: netcat, UDPcast, and lidi. We found that only 93.89% of netcat's transfers succeeded (§ 4.3). Transfers were also unreliable when using UDPcast (§ 4.4) and lidi (§ 4.5) in their default configurations. However, we discovered configurations for UDPcast and lidi that enabled reliable transfers using these programs. We also incorporated our findings into the development of pydiode, a cross-platform program for reliably transferring information through data diodes (§ 3.3). pydiode uses redundancy to mitigate packet loss and can automatically detect transfer errors. Unlike UDPcast and lidi, our minimal program and pydiode do not employ forward error correction (FEC). Nevertheless, both minimal and pydiode offer faster reliable transfers than UDPcast, and they are only 52% and 46% slower than lidi, respectively (Table 7). When properly configured, the choice between pydiode, UDPcast, and lidi may depend on factors beyond transfer speed (§ 6.2). For example, lidi's FEC implementation may infringe on RaptorQ patents held by Qualcomm, whereas pydiode and UDPcast's underlying technology is public domain. Finally, we offer advice for software developers (§ 6.3), and describe opportunities for future work (§ 7).