Privacy Tools Guide

When the internet goes down due to shutdowns, disasters, or infrastructure failures, alternative communication methods become critical for staying connected. This guide teaches practical techniques for maintaining communication during internet shutdowns using mesh networks, offline messaging apps, LoRa radio systems, and satellite communication. You’ll learn how to set up ad-hoc Wi-Fi networks, use Briar for device-to-device messaging, and configure emergency communication layers that work independently of traditional internet infrastructure.

Understanding the Problem Space

Internet shutdowns typically affect connectivity at the ISP level, disrupting DNS resolution, blocking traffic at network borders, or completely severing physical links. However, local network infrastructure often remains functional. This creates opportunities for alternative communication methods that operate independently of wide-area networks.

The key distinction in alternative networking is between infrastructure-dependent methods (which require some existing network hardware) and infrastructure-independent methods (which create entirely new network topologies).

Quick Comparison

Feature Tool A Tool B
Privacy Policy Privacy-focused Privacy-focused
Open Source Check license Check license
Jurisdiction Check provider Check provider
Platform Support Cross-platform Cross-platform
Pricing See current pricing See current pricing
Ease of Use Moderate learning curve Moderate learning curve

Mesh Networking with IBSS/MANET

One of the most solutions involves creating ad-hoc networks between devices using IBSS (Independent Basic Service Set) or MANET (Mobile Ad-hoc Networking) protocols. Linux supports this natively through iw and wpa_supplicant.

Setting Up an Ad-Hoc Network on Linux

# Create an ad-hoc network named "mesh-network"
sudo ip link set wlan0 down
sudo iw wlan0 ibss join mesh-network 2437
sudo ip link set wlan0 up
sudo ip addr add 10.0.0.1/24 dev wlan0

This creates a peer-to-peer link between two or more devices equipped with Wi-Fi adapters supporting ad-hoc mode. Each participant runs the same commands with unique IP addresses. For larger groups, consider using B.A.T.M.A.N. (Better Approach to Mobile Ad-hoc Networking) or OLSR (Optimized Link State Routing) protocols for automatic mesh formation.

Using B.A.T.M.A.N. for Automatic Mesh Routing

# Install batctl
sudo apt install batctl

# Load the batman-adv kernel module
sudo modprobe batman-adv

# Attach Wi-Fi interface to the mesh
sudo batctl -i wlan0 interface create

# Set up IP addressing on the mesh interface
sudo ip addr add 10.0.0.2/24 dev bat0
sudo ip link set bat0 up

B.A.T.M.A.N. handles packet routing automatically, allowing nodes to enter and leave the mesh dynamically. This scales well for neighborhood-sized deployments where devices can reach each other through multi-hop paths.

Offline Messaging Applications

Several applications provide store-and-forward messaging without internet connectivity. These typically use Bluetooth, Wi-Fi Direct, or local network scanning to discover nearby devices.

Using Briar for Offline Messaging

Briar is an open-source messaging app designed for decentralized communication. It supports Bluetooth and Wi-Fi connectivity for device-to-device synchronization.

# Install Briar on Linux (requires Android via Anbox or physical device)
# Download from https://briarproject.org/

# For headless operation, consider using briar-headless
git clone https://code.briarproject.org/briar/briar-headless.git
cd briar-headless
./gradlew installDist

Briar implements the Bramble protocol, which handles key exchange and message synchronization without central servers. Messages propagate through trusted contacts when they eventually connect to the internet.

Implementing Custom Offline Messaging with Python

For developers building custom solutions, a simple offline message relay can be implemented:

import socket
import json
from datetime import datetime

class OfflineMessageServer:
    def __init__(self, port=45678):
        self.port = port
        self.messages = []

    def broadcast(self, message, username):
        msg_data = {
            "user": username,
            "text": message,
            "timestamp": datetime.now().isoformat()
        }
        self.messages.append(msg_data)

        # Relay to all connected peers
        for client in self.connected_clients:
            try:
                client.send(json.dumps(msg_data).encode())
            except:
                pass

    def start(self):
        server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
        server.bind(('0.0.0.0', self.port))
        server.listen(5)

        while True:
            client, addr = server.accept()
            self.handle_client(client)

# Usage: Run on each device on the same local network
# Clients connect and receive messages via TCP

This serves as a starting point. Production implementations should include encryption (consider using the cryptography library with X25519 key exchange), message persistence, and automatic peer discovery via UDP broadcast on port 45678.

Packet Radio and LoRa Communication

For longer-range scenarios where Wi-Fi reach is insufficient, amateur radio techniques and LoRa (Long Range) modules provide viable alternatives.

LoRa Mesh Networking with Meshtastic

Meshtastic is an open-source project combining LoRa radios with ESP32 microcontrollers for off-grid mesh communication.

# Install Meshtastic Python CLI
pip install meshtastic

# List connected devices
meshtastic --port /dev/ttyUSB0 --info

# Send a message to the mesh
meshtastic --port /dev/ttyUSB0 --send "Hello mesh"

Meshtastic devices can communicate over several kilometers in open terrain, making them suitable for community-wide communication during extended outages. The firmware handles routing automatically using a modified version of the Hugo protocol.

Configuring LoRa Parameters

from meshtastic import meshtastic

# Connect to a Meshtastic device
interface = meshtastic.SerialInterface("/dev/ttyUSB0")

# Set node preferences for maximum range
prefs = {
    "tx_power": 20,
    "spread_factor": 12,
    "coding_rate": 8,
    "channel_number": 0
}
interface.setPreferences(prefs)

# Send a message
interface.sendText("Emergency: Check local mesh for updates")
interface.close()

These settings maximize range at the expense of data rate—appropriate for short text messages but not suitable for file transfers.

Satellite-Based Emergency Communication

When local infrastructure fails completely, satellite-based solutions provide global connectivity independent of terrestrial networks.

Using Iridium Short Burst Data (SBD)

Iridium SBD provides low-bandwidth data transmission from anywhere on Earth:

import serial

class IridiumSBD:
    def __init__(self, port='/dev/ttyUSB0'):
        self.serial = serial.Serial(port, 19200, timeout=10)

    def send_message(self, message):
        # Enter AT command mode
        self.serial.write(b"AT\r")
        self._wait_ok()

        # Set SBD session parameters
        self.serial.write(b'AT+SBDD0\r')  # Clear buffer
        self._wait_ok()

        # Write message to buffer (340 bytes max)
        self.serial.write(f'AT+SBDWB={len(message)}\r'.encode())
        self._wait_ok()
        self.serial.write(message.encode())
        self._wait_ok()

        # Initiate SBD session
        self.serial.write(b'AT+SBDI\r')
        response = self._read_response()
        return "SBDIX OK" in response

    def _wait_ok(self):
        while not self.serial.readline().strip().endswith(b"OK"):
            pass

    def _read_response(self):
        return self.serial.readall().decode()

# Example: Send emergency status
iridium = IridiumSBD()
iridium.send_message("STATUS: All clear, using backup communication")

This approach works anywhere with sky visibility but carries associated hardware and service costs.

Building a Redundant Communication Strategy

For developers responsible maintaining communication capabilities, implement defense in depth:

  1. Primary layer: Local mesh network using Wi-Fi ad-hoc or Ethernet
  2. Secondary layer: Bluetooth LE for very short-range device-to-device
  3. Tertiary layer: LoRa or packet radio for extended range
  4. Emergency layer: Satellite communication for external connectivity

Test these systems regularly. An untested solution fails when needed most.

Built by theluckystrike — More at zovo.one