Wi-Fi Calling test DNS

easyepdg-dns

Point your phone at a DNS server whose IPv6 address contains your SIM's MCC and MNC and your ePDG's address. It answers the phone's ePDG lookup with your test ePDG and forwards every other name to public resolvers, so the rest of the internet keeps working.

DNS prefix
2406:840:f990:e9d6::/64
API
https://easyepdg-dns.cyyself.name

How the address works

When Wi-Fi Calling starts, the phone looks up epdg.epc.mnc<MNC>.mcc<MCC>.pub.3gppnetwork.org using the Wi-Fi network's DNS server. Every address in 2406:840:f990:e9d6::/64 is a DNS server, and the second half of the address says what to answer:

2406:840:f990:e9d6:6001:01:203.0.113.7
/64 prefix mode MCC MNC ePDG IPv4
ModeA answerAAAA answerSetup
0 IPv4 onlythe IPv4 in the addressnonenone
6 IPv6 onlynonethe IPv6 you registerstep 2
a Dual stackthe IPv4 in the addressthe IPv6 you registerstep 2

MCC and MNC are written as the same decimal digits (460 stays 460). Lookups for both mnc01 and mnc001 match.

1Make your DNS server address

0IPv4 only2406:840:f990:e9d6:1:1:203.0.113.7
6IPv6 only2406:840:f990:e9d6:6001:1:203.0.113.7
aDual stack2406:840:f990:e9d6:a001:1:203.0.113.7

For modes 6 and a, the IPv4 must be the public IPv4 address of the machine you register from in step 2, normally your ePDG. To see it and its addresses, run curl -4 'https://easyepdg-dns.cyyself.name/api/v1/encode?mcc=001&mnc=01' there.

2Register your ePDG's IPv6 address modes 6 and a

Mode 0 needs no setup. For 6 and a, tell the server your ePDG's IPv6 address. A record belongs to the public IPv4 address it is sent from, so run the command on the machine whose IPv4 is in your DNS address, and keep -4: requests over IPv6 are refused.

curl -4 -X POST https://easyepdg-dns.cyyself.name/api/v1/records \
  -H 'Content-Type: application/json' \
  -d '{
    "mcc": "001",
    "mnc": "01",
    "epdg_ipv6": "YOUR_EPDG_IPV6",
    "valid_duration_secs": 86400,
    "ttl": 60
  }'

The reply lists your DNS addresses under listeners. A record lasts up to 7 days; run the command again to renew or change it. Only requests from the record's IPv4 address can change or delete it. If others share that address (for example behind carrier-grade NAT), set a token.

Look up or delete your record
curl -4 'https://easyepdg-dns.cyyself.name/api/v1/records?mcc=001&mnc=01'
curl -4 -X DELETE 'https://easyepdg-dns.cyyself.name/api/v1/records?mcc=001&mnc=01'

3Use it on your phone

  1. Join a Wi-Fi network that has IPv6: the DNS server address is IPv6 only.
  2. Make your address from step 1 the network's only DNS server. On the router, that is its DHCPv6 or router advertisement DNS setting. On iPhone you can set it per network: Settings → Wi-Fi → ⓘ → Configure DNS → Manual. Android only lets you set DNS servers with a static IPv4 setup, so the router is usually easier.
  3. Make sure nothing replaces it: turn off VPNs, and on Android set Private DNS to Off.
  4. Turn on Wi-Fi Calling.

4Check it

From any machine with IPv6:

dig @2406:840:f990:e9d6:1:1:203.0.113.7 epdg.epc.mnc001.mcc001.pub.3gppnetwork.org A
dig @2406:840:f990:e9d6:6001:1:203.0.113.7 epdg.epc.mnc001.mcc001.pub.3gppnetwork.org AAAA

The first answers with your ePDG's IPv4. The second answers with your registered IPv6 once step 2 is done.

Good to know