BBline-X

Magic DNS

Magic DNS lets you reach any peer by name instead of by IP. Every device in the mesh is automatically reachable at <hostname>.blinex.

How it works

The agent runs a small DNS server on 127.0.0.1:53535. Queries for names ending in the .blinexsuffix are answered from the agent's view of the mesh — each peer's hostname resolves to its mesh IP (in the 100.64.0.0/10 range). Everything else is forwarded to an upstream resolver.

$ ping server-2.blinex
64 bytes from 100.64.0.2: icmp_seq=1 ttl=64 time=2.1 ms

$ dig @127.0.0.1 -p 53535 db-1.blinex +short
100.64.0.9

Configuring your system to use it

Because the resolver listens on a non-standard port (53535), point your system DNS at it or forward port 53 to it.

  • systemd-resolved: add 127.0.0.1:53535 as a DNS server for the blinex0 link, scoped to the ~blinex domain.
  • Port-forward 53 → 53535: redirect local DNS so standard tools resolve .blinex names without extra flags, e.g.:
    sudo iptables -t nat -A OUTPUT -p udp -d 127.0.0.1 --dport 53 \
      -j REDIRECT --to-ports 53535
  • Manual lookups: tools like dig can query the resolver directly with @127.0.0.1 -p 53535.

Limitations

  • The resolver listens on 127.0.0.1:53535; using it as your system resolver requires the configuration above.
  • Only the .blinex suffix is served from the mesh; all other queries are forwarded upstream.
  • Names track the mesh as the agent sees it — a peer must be known to this agent for its .blinex name to resolve.

For more on how the agent fits together, see the Architecture docs.