Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    How to set a DNS server for the tunnel on iOS???

    Scheduled Pinned Locked Moved WireGuard
    1 Posts 1 Posters 432 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      ChrisJenk
      last edited by ChrisJenk

      I am experimenting with WireGuard as a 'better' VPN solution for my client population compared to IPsec.

      I have got WireGuard working (it was surprisingly easy) and it tunnels both IPv4 and IPv6 nicely. My problem is DNS resolution from the client. WireGuard doesn't; appear to have any mechanism to pass DNS server settings over to the client so somehow they must be set at the client side.

      For macOS clients this isn't a huge deal since one can set up some additional 'resolvers' for the relevant private network domains under /etc/resolver and that takes care of that.

      However for iOS clients (iPhone and iPad) there is no way on the client side to specify a DNS server for the VPN connection (tunnel) so all DNS queries go to the DNS servers for the underlying network connection (in a plot tunnel situation). Given that the DNS server for the underlying network connection (could be public WiFi, could be mobile network, could be Google or CloudFlare servers, ...) cannot of course resolve any hosts on my private network, once the VPN is connected the device has zero DNS resolution capability.

      Even if I set WireGuard to tunnel all traffic it still doesn't because again I can't set any DNS server for the tunnel so it still tries to use the servers for the underlying connection which results in the same problem.

      Has anyone got any ideas for solving this?

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.