Hacker News new | ask | show | jobs
by seiferteric 1691 days ago
> it can also be hard to remember longer IPv6 addresses

mDNS helps since you can use hostname.local without having to set up a DNS server. I was going to make a joke blog post about using ipv4 addresses as hostnames so you can "keep using ipv4" while actually using ipv6, but I found you can't have "." in hostnames, so maybe instead use "-".

3 comments

Problem is .local domains don't resolve everywhere . E.g. on mobile or chrome's own DNS stack :(
If you run your own DNS resolver for your local network, you can use a Discovery Proxy (RFC 8766) to allow unicast DNS resolution of multicast DNS records. I'm using mdns-discovery-proxy[0] (slightly modified to support a newer version of the zeroconf Python library) with bind9 so that xyz.local is mirrored in unicast DNS as xyz.home.arpa. The script (proxy.py in Git; I renamed it) is run with this systemd service (/etc/systemd/system/mdns-discovery-proxy.service):

  [Unit]
  Description=DNS-SD Proxy
  After=network.target network.service

  [Service]
  Type=simple
  DynamicUser=yes
  ExecStart=/usr/local/bin/mdns-discovery-proxy.py home.arpa 35353
  Restart=always
  RestartSec=30

  [Install]
  WantedBy=multi-user.target

And the bind9 configuration to forward the zone is (in /etc/bind/named.conf.local):

  zone "home.arpa" {
    type forward;
    forward only;
    forwarders { 127.0.0.1 port 35353; };
  };
[0] https://github.com/nybble41/mdns-discovery-proxy
For me, both iOS and Chrome on Windows resolve .local.
Does mDNS work across VPN tunnels? The main reason I delay IPv6 is because I access hosts across the VPN by their IPs, and I don't want to publish their DNS records.
If you run your own internal DNS server: https://en.m.wikipedia.org/wiki/Split-horizon_DNS
I guess that's equivalent to setting up a hosts file... Unless the DNS resolver can be configured to treat a selected server on the VPN side as authoritative for .mynetwork.
Not currently. ff02::fb is used, which has link-local scope.
Also, ULA. You can have both “real” (internet-routable) IPv6 addresses for all devices as well as (fixed) ULA addresses for local communication and ease of use. fd00:dead:beef::/64