Skill v2.0.1+alrcatraz.0
currentAutomated scan100/100+2 new
name: astra-sre-fix-easytier-martian description: >- Fix martian packet flood caused by easytier-core self-connecting to its own port (11012) from all network interfaces, leaking 127.0.0.1 packets out the physical interface. version: 2.0.1+alrcatraz.0 author: alrcatraz platforms: [linux] metadata: hermes: tags: [sre, easytier, martian, packet-loss, kernel-log, network] triggers:
- martian destination 127.0.0.1
- easytier.127.0.0.1.11012
- kernel log flooded martian
- logread full of martian
- rx_missed_errors
- 11012 connection refused
related_skills:
astra-sre-fix-easytier-martian
When to Use
When martian destination packets from easytier-core flood the kernel log — caused by easytier-core self-connecting to its own port (11012) from all network interfaces, leaking 127.0.0.1 packets out the physical interface.
Symptom
- Router kernel log fills with
IPv4: martian destination 127.0.0.1 from <LAN_IP>, dev br-lan - occurs from multiple machines on the same LAN that run easytier
- Router's logread buffer fills up, pushing out real events (PPPoE disconnects, DHCP events)
dmesgshows the same martian messages repeating every 1-2 seconds- The affected machine's
netstat -tanpshowsSYN_SENTconnections from its LAN IP to127.0.0.1:11012
Root Cause
easytier-core (the EasyTier mesh VPN daemon) enumerates all network interfaces and probes port 11012 (its own listening port) for peer discovery / connectivity checks. When the probe originates from:
- The physical interface IP (e.g.
192.168.0.30or10.x.x.x) - A Docker bridge interface (e.g.
172.17.0.1,172.19.0.1)
...the kernel's routing table sends the packet to 127.0.0.1 through the physical interface instead of staying on loopback. This is caused by:
- Policy routing rules (
ip rule show) that route traffic from the LAN IP through a specific table (e.g. OVS table) - Open vSwitch bridges (Synology DSM) that alter normal routing behaviour
- Any non-standard network stack (Docker bridges, OVS, policy routing) where the loopback route is bypassed
The resulting packet (src=LAN_IP, dst=127.0.0.1) arrives at the router's bridge interface and is logged as a "martian destination" because 127.0.0.0/8 is not reachable via the LAN bridge.
Detection
On the affected machine
# Check for SYN_SENT connections to selfss -tanp state syn-sent | grep 127.0.0.1# Verify it's easytierss -tanp | grep 11012# Confirm easytier processps aux | grep easytier-core
On the router
# Check if martian flood is activedmesg | grep "martian destination 127.0.0.1" | tail -5# Count ratewatch -n 1 'dmesg | grep -c "martian destination 127.0.0.1"'
Fix
Step 1: Add iptables DROP rule
Block outgoing packets to 127.0.0.0/8 from the physical network interface:
# Identify the physical egress interface (the one with the LAN IP)ip -br addr | grep "<LAN_SUBNET>"# Add DROP ruleiptables -I OUTPUT -o <physical_iface> -d 127.0.0.0/8 -j DROP
Examples:
- Synology NAS (OVS bridge):
iptables -I OUTPUT -o ovs_eth0 -d 127.0.0.0/8 -j DROP - openSUSE (WiFi):
iptables -I OUTPUT -o wlo1 -d 127.0.0.0/8 -j DROP - openSUSE (Ethernet):
iptables -I OUTPUT -o eth0 -d 127.0.0.0/8 -j DROP
Step 2: Verify
# On the affected machine - check rule hit countiptables -L OUTPUT -n -v | grep DROP# Wait a few seconds, check if hits incrementediptables -L OUTPUT -n -v | grep DROP# On the router - check if new martian packets stoppeddmesg | grep "martian destination" | tail -1
No new entries = fix working.
Step 3: Persist across reboot
On openSUSE Tumbleweed — systemd oneshot service:
cat > /etc/systemd/system/martian-drop.service << 'EOF'[Unit]Description=Drop martian packets from easytier self-connectAfter=network.target[Service]Type=oneshotExecStart=/usr/sbin/iptables -I OUTPUT -o <physical_iface> -d 127.0.0.0/8 -j DROPRemainAfterExit=yes[Install]WantedBy=multi-user.targetEOFsystemctl daemon-reload && systemctl enable --now martian-drop.service
On Synology DSM — rc.d script:
cat > /usr/local/etc/rc.d/martian-drop.sh << 'EOF'#!/bin/shiptables -I OUTPUT -o ovs_eth0 -d 127.0.0.0/8 -j DROPEOFchmod +x /usr/local/etc/rc.d/martian-drop.sh
Pitfalls
- The iptables rule goes in the OUTPUT chain, not INPUT. The leak is from the machine's own processes sending packets out the wrong interface.
- Do NOT use `route_localnet=1` as an alternative — this allows routing 127.0.0.0/8 through non-loopback interfaces, which has security implications (bypassing loopback-only access controls).
- Docker bridge interfaces also trigger the leak. On machines with Docker, easytier also connects from
172.17.0.1and172.19.0.1bridge IPs to127.0.0.1. The iptables rule on the physical interface catches these because the docker0 bridge routes through the physical interface. - Multiple identical rules can accumulate. Running
-Imultiple times adds duplicate rules. Clean up withiptables -D OUTPUT -o <iface> -d 127.0.0.0/8 -j DROPbefore re-adding.
Related
cifs-mount-over-sdwan-diagnostics.md— For CIFS mount timing issues over SD-WAN overlays (NetBird, EasyTier, ZeroTier)