Server hardening, firewalls, and anti-flood
Public Reticulum transport hubs and LXMF propagation nodes are reachable from the internet and from untrusted peers. Use this playbook to diagnose active traffic floods and layer defenses across the OS firewall, TCP/Backbone listener, Reticulum router, and lxmd-rs daemon.
The controls below apply to standalone rsReticulum 1.5.0+ and rsLXMF 1.5.0+. Keys added in rsReticulum 1.5.1 (such as client_limit, the blocked_ips file, and per-interface hop_limiter) are marked explicitly.
1. Triage an active flood first
Before changing settings, determine which layer is being hit: TCP connection flapping, announce/path-request floods, or LXMF propagation syncs.
# Live interface monitor (refreshes every 1s)
rnstatus-rs -m -I 1
# One-shot flood diagnostics: announces, path requests, filters, blocked IPs, queues
rnstatus-rs -A -P -F -b -q
# Only show interfaces currently experiencing a burst
rnstatus-rs -B -A -P
# Sort busiest interfaces by incoming announces or dropped TX packets
rnstatus-rs -A --sort arx --reverse
rnstatus-rs -q --sort txdrp --reverse
# Inspect announce rates and top talkers
rnpath-rs --rates
rnpath-rs --analyze
# Emergency: drop all queued outgoing announces on a congested node
rnpath-rs -D
If you also run lxmd-rs, inspect active propagation peering and sync pressure:
lxmd-rs --status
lxmd-rs --peers
| What you see | Layer being hit | Jump to |
|---|---|---|
High blocked_ips, huge connection churn, many sockets from one IP | TCP / IP layer | Backbone & IP limits + OS firewall |
High arx / held / active bursts (-B), spiking announce rates | Reticulum announce / PR flood | Ingress control, rate limits & filters |
| One or a few identities flooding the mesh | Specific abusive identities | Blackhole management |
High CPU or disk growth on lxmd-rs, low-stamp sync floods | LXMF propagation layer | LXMF propagation throttling |
2. TCP and BackboneInterface protection
For public internet-facing hubs on Linux, macOS, or Windows desktop, prefer BackboneInterface over TCPServerInterface. BackboneInterface includes dataplane egress control, Linux TCP_USER_TIMEOUT dead-peer detection, and built-in abuse controls:
[interfaces]
[[Public Backbone]]
type = BackboneInterface
enabled = yes
listen_on = 0.0.0.0
port = 4242
mode = gateway
# Connection cap (rsReticulum 1.5.1+, default 500)
client_limit = 250
# Built-in fast-flapping auto-blocker (enabled by default in 1.5.0+)
block_fast_flapping = yes
fast_flapping_threshold = 20 # seconds: shorter connections count as flaps
fast_flapping_grace = 5 # short connections allowed before blocking
fast_flapping_block_time = 720 # MINUTES (720 = 12 hours)
# Announce budgeting & rate limiting
announce_cap = 2 # percent of interface bandwidth
announce_rate_target = 3600 # target seconds between announces per dest
announce_rate_grace = 6 # violations tolerated before penalty
announce_rate_penalty = 7200 # extra seconds added after exceeding grace
fast_flapping_block_timefast_flapping_threshold is in seconds (default 20), whereas fast_flapping_block_time is in minutes (default 720 = 12 hours). Entering 43200 sets a 30-day block, not 12 hours.
| Key | Default | Meaning |
|---|---|---|
client_limit (1.5.1+) | 500 | Maximum concurrent accepted clients on this listener. Additional connections are closed while full. |
block_fast_flapping | yes | Automatically track and block IPs opening rapid short-lived connections. |
fast_flapping_threshold | 20 s | Connections closed faster than this count as a fast flap. |
fast_flapping_grace | 5 | Number of fast flaps tolerated from an IP before blocking starts. |
fast_flapping_block_time | 720 min | Minutes since the last short connection before an IP's block expires (12 hours default). |
Permanent IP blocklist (blocked_ips, rsReticulum 1.5.1+)
Create a plain text file named blocked_ips inside your rnsd-rs config directory (for example ~/.rsReticulum/blocked_ips), with one IPv4 or IPv6 address per line:
# ~/.rsReticulum/blocked_ips
203.0.113.42
2001:db8::99
BackboneInterface listeners with block_fast_flapping = yes refuse every listed address canonically (blocking an IPv4 address also blocks its IPv4-mapped IPv6 form). Verify active blocks with rnstatus-rs -b.
3. OS firewall and systemd limits
Application-level caps still pay kernel accept/handshake cost during a volumetric flood. Put OS-level per-IP connection and new-connection rate limits in front of your Reticulum port (replace 4242 with your listener port).
Linux nftables (recommended for public hubs)
# Example nftables ruleset snippet for TCP port 4242:
# - Max 20 concurrent connections per source IP
# - Max 10 new connections per minute per source IP (burst 20)
sudo nft add table inet ratspeak_guard
sudo nft 'add chain inet ratspeak_guard input { type filter hook input priority 0; policy accept; }'
sudo nft 'add rule inet ratspeak_guard input tcp dport 4242 ct state new meter conn_limit { ip saddr ct count over 20 } drop'
sudo nft 'add rule inet ratspeak_guard input tcp dport 4242 ct state new meter rate_limit { ip saddr limit rate over 10/minute burst 20 packets } drop'
Linux ufw (basic port allow + rate limit)
# Open only the Reticulum listener port (and SSH on your admin port)
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow OpenSSH
sudo ufw limit 4242/tcp comment 'Reticulum Backbone'
# Only open AutoInterface ports if running on a trusted LAN
# sudo ufw allow 29716/udp comment 'Reticulum AutoInterface discovery'
# sudo ufw allow 42671/udp comment 'Reticulum AutoInterface data'
sudo ufw enable
sudo ufw status verbose
Keep rnsd-rs shared-instance ports (37428/37429 or custom shared_instance_port) and I2P SAM (7656) bound to 127.0.0.1 and blocked at the firewall. The Reticulum shared-instance RPC key grants administrative control over the daemon.
systemd resource guardrails
Add memory and file-descriptor ceilings in /etc/systemd/system/rnsd-rs.service so a traffic spike cannot exhaust host RAM or hit default 1024 FD limits:
[Service]
LimitNOFILE=65536
MemoryMax=1G
Restart=on-failure
RestartSec=5
4. Reticulum ingress control, rate limits, and filters
Ingress control (ingress_control & ic_*)
Ingress control detects sudden bursts of incoming announces or path requests on an interface and holds excess announces in a bounded queue, releasing them gradually once the burst subsides. It is enabled by default (ingress_control = yes).
Global defaults can be overridden under [reticulum] or per-interface under [[Interface Name]]:
| Key | Default | Meaning |
|---|---|---|
ingress_control | yes | Enable burst holding on this interface. |
ic_new_time | 7200 s (2 h) | How long a newly started interface uses the stricter _new burst thresholds. |
ic_burst_freq_new | 3.0 /s | Announce rate (per second) that triggers holding on a new interface. |
ic_burst_freq | 10.0 /s | Announce rate (per second) that triggers holding on an established interface. |
ic_pr_burst_freq_new | 3.0 /s | Path-request rate (per second) that triggers limiting on a new interface. |
ic_pr_burst_freq | 8.0 /s | Path-request rate (per second) that triggers limiting on an established interface. |
ic_burst_hold | 15.0 s | Minimum seconds to hold incoming announces once a burst triggers. |
ic_burst_penalty | 15.0 s | Extra cooldown seconds before returning to normal rate. |
ic_max_held_announces | 64 | Maximum distinct destinations held in the burst queue before dropping excess. |
ic_held_release_interval | 5.0 s | Seconds between releasing held announces after a burst clears. |
Tightened profile for a busy public gateway or constrained LoRa AP:
[[Public Gateway]]
type = BackboneInterface
enabled = yes
listen_on = 0.0.0.0
port = 4242
mode = gateway
ingress_control = yes
ic_burst_freq_new = 1.5
ic_burst_freq = 4.0
ic_pr_burst_freq_new = 1.5
ic_pr_burst_freq = 4.0
ic_burst_hold = 30
ic_burst_penalty = 30
ic_max_held_announces = 32
ic_held_release_interval = 10
Announce budgeting & per-destination rate limiting
announce_cap: Percentage of interface bandwidth reserved for announces (default2= 2%). Lower to1on congested LoRa links.announce_rate_target: Minimum target seconds between announces from any single destination (for example3600for hourly).announce_rate_grace: Number of faster-than-target announces tolerated before penalty kicks in.announce_rate_penalty: Extra seconds added to the target interval once a destination exceedsannounce_rate_grace.
Packet filters ([filter]) and hop limits
Use [filter] to drop deep-hop noise or unwanted destination aspects before they consume routing table space:
[filter]
hop_limiter = 16
# ignored_types = nomadnetwork.node
# required_only = yes
# allowed_types = lxmf.delivery, lxmf.propagation
hop_limiter lives in [filter], not [reticulum]rnsd-rs reads the global hop_limiter only from [filter]. Placing it under [reticulum] has no effect and logs nothing. In rsReticulum 1.5.1+, you can also set a per-interface hop_limiter inside an interface block, and place destination aspect lists in known_types / flagged_types files inside your config directory (one aspect per line).
Network stamps ([stamps])
Require lightweight proof-of-work on announces, path requests, and link requests to raise the CPU cost of mass floods. In rsReticulum 1.5.1+ (Reticulum 1.6.1), stamp_destinations and stamp_prs are enabled by default; enforce_stamps remains opt-in until you choose to require stamps from inbound peers:
[stamps]
stamp_destinations = yes
stamp_prs = yes
enforce_stamps = yes
# Optional fractional cost tuning (defaults shown):
# destination_cost = 23.5
# destination_value = 25.0
# pr_cost = 15.8
# lr_cost = 12.5
Setting enforce_stamps = yes drops announces, path requests, and link requests from pre-1.6 clients that do not attach network stamps. Test on a staging interface before enabling on a general community hub.
Private/group access control (IFAC)
If your server is meant only for a friend group or private mesh rather than the public internet, set network_name and a strong passphrase on the listener and all authorized peers. Packets without a valid IFAC tag are dropped at ingress before transport sees them.
5. Blackhole management
When specific Reticulum identities abuse your node, blackholing drops their announces and traffic locally — and optionally publishes your blocklist to trusted peer hubs.
Managing blackholes with rnpath-rs
# List currently blackholed identities
rnpath-rs -b
# Blackhole an abusive identity hash (optional duration in hours and reason)
rnpath-rs -B <32_char_identity_hash> --duration 168 --reason "announce flood"
# Remove a blackhole
rnpath-rs -U <32_char_identity_hash>
# Manage a remote transport node you are authorized to administer
rnpath-rs -R <transport_id_hash> -i ~/.rsReticulum/admin_id -B <abusive_hash> --reason "flood"
# Inspect a remote transport node's published blackhole list
rnpath-rs -p <remote_transport_id_hash>
Sharing or subscribing to blackhole lists ([reticulum])
[reticulum]
enable_transport = yes
# Publish this node's blackhole list for trusted peers to fetch
publish_blackhole = yes
# Subscribe to blackhole lists published by transport identities you trust
blackhole_sources = <trusted_transport_hash_1>, <trusted_transport_hash_2>
blackhole_update_interval = 60 # MINUTES (default 60 = 1 hour, minimum 2)
Only add transport hashes to blackhole_sources whose operators you trust — a subscribed source can cause your node to drop traffic for any identity it lists.
6. LXMF propagation throttling (lxmd-rs)
If your lxmd-rs Offline Inbox is being flooded with spam messages, oversized payloads, or aggressive peer syncs, tighten [propagation] in ~/.rsLXMF/config:
[propagation]
enable_node = yes
# Storage & payload ceilings
message_storage_limit = 500
propagation_message_max_accepted_size = 256
propagation_sync_max_accepted_size = 10240
# Proof-of-work anti-spam
propagation_stamp_cost_target = 16.0
propagation_stamp_cost_flexibility = 3.0
propagation_stamp_throttle = 30 # minutes to throttle peers sending low stamps
peering_cost = 18.0
remote_peering_cost_max = 26.0
# Concurrency & peering limits
max_peers = 20
max_inbound_syncs = 2 # use 1 on low-power boards (RPi)
sequential_pn_stamp_validation = yes
static_peers_bypass_sequential = yes
# Emergency lock-down options (uncomment if under sustained spam attack):
# from_static_only = yes
# static_peers = <trusted_pn_hash_1>, <trusted_pn_hash_2>
# auth_required = yes
ignoredfile: Place destination hashes (one per line) in~/.rsLXMF/ignoredto drop messages from known spammers.allowedfile: Whenauth_required = yes, only identity hashes listed in~/.rsLXMF/allowedcan retrieve messages from this propagation node.enforce_stamps = yes(lxmd-rsextension): Rejects direct inbound LXMF messages to the daemon itself whose stamp falls below[lxmf] stamp_cost.
Next steps
- Review all daemon options in Configuration reference.
- See all diagnostic flags in CLI tools reference.
- Set up production
rnsd-rs,lxmd-rs, and Docker deployments in Infrastructure and operations.