Troubleshooting

In case of problem, you should enable additional logging by setting the LOG_LEVEL=info environment variable, as explained in the documentation. InterDiode checks if the current configuration is valid, and these checks can also be manually run with the check command.

A process does not start

The different services wait for the database and the Redis cache to be prepared before they can start. This action is performed with the configuration apply command.

The connection between the black and red instances does not work

Obviously, the ability to transfer data from the black side to the red side is critical in InterDiode. However, using a diode makes troubleshooting transmission issues more difficult. Nevertheless, here are the steps to follow and the points to check in case of a problem.

  • Deactivate the send process on the black side and the receive process on the red side, to avoid data loss during the troubleshooting process.

  • If the transfers use UDP connections, be sure that the MAC address of the red server is known by the black server, and that it is injected into the ARP cache of the host machine before using the integrated air gap protocol. This must be done on the host machine, not in the Docker container.

  • Be sure that the black server can reach the red server on the configured port, and that the red server can receive data on this port: no firewall should block the connection.

    On the red machine, you can start a basic UDP or TCP server with docker run --rm -it interdiode python3 to check if the black machine can reach it:

    import socket
    sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    # replace SOCK_DGRAM by SOCK_STREAM if you want to test a TCP connection instead of UDP
    sock.bind(("0.0.0.0", 15124))
    # Replace 15124 with the port configured in RED_DESTINATION_PORT
    print("Waiting for a UDP message...")
    data, addr = sock.recvfrom(1024)
    print(f"Received from {addr} : {data.decode(errors='replace')}")
    

    On the black machine, launch a UDP transmitter with docker run --rm -it interdiode python3 to check if the black machine can reach it:

    import socket
    sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    # replace SOCK_DGRAM by SOCK_STREAM if you want to test a TCP connection instead of UDP
    sock.sendto(b"Hello from A", ("8.8.8.8", 15124))
    # Replace 15124 with the port configured in RED_DESTINATION_PORT
    # Replace 8.8.8.8 with the IP address configured in RED_DESTINATION_IP
    print("Message sent.")
    
  • If the connection is working, you can use dedicated InterDiode tools to check the connection and the data transfer, as explained in the documentation.

    On the red machine, you can use the docker run --rm -it interdiode interdiode-ctl hairgap --skip-db -v 2 test-receive --count 1 --port 15124 command to receive a single file.

    On the black machine, you can use the docker run --rm -it interdiode interdiode-ctl hairgap --skip-db -v 2 test-send --port 15124 <filename> command to send an arbitrary file.