Is it possible to change DNS for cellular internet? How can it be done without a jailbreak?
I've tried Apple Configurator, but didn't find suitable settings.
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.
Sign up to join this communityIs it possible to change DNS for cellular internet? How can it be done without a jailbreak?
I've tried Apple Configurator, but didn't find suitable settings.
Build your own VPN using OpenVPN & easy-rsa on a digital ocean cloud server ($5/mo for cheapest VM & 2TB monthly transfer), configure VPN to tunnel/forward all traffic, set up Cloudflare 1.1.1.1 on VPN, then use Apple Configurator to set an always on VPN connection.
Can confirm this is how I do it, I set up Ubuntu 16.04 server instance and the above and never shut my vpn off.
NOTE: Depending on your Mobile ISP, this may not work for a tethered device. i.e. a laptop tethered to your mobile phone (via hotspot) often does NOT have it's DNS passed through this tunnel and instead will use the ISP supplied via the Cellular config.
For those looking to use 1.1.1.1 on your iOS devices, you can download the official 1.1.1.1 app from the App Store (free, no in-app purchases), or follow the link on the https://1.1.1.1 home page.
The app sets up a VPN profile that automatically routes all DNS queries from any app through Cloudflare's free DNS servers.
Cloudflare's servers will be used, even for cellular data.
You can also use a third party iOS app called DNS Override (paid app, costs $1.99) that automatically configures 1.1.1.1 for you on any network you connect to. Directions from Cloudflare can be found here and are referenced below:
Launch the DNS Override app.
Click 1.1.1.1 at the top of the app.
Turn on the DNS Override toggle
DNS Override may ask you to install their VPN profile so that they can automatically update DNS settings.
Lastly, wifi users can setup DNS servers manually by going to the iOS wifi settings. Note your device will only use 1.1.1.1 for each wifi connection you configure.
Go to Settings.
Click on Wi-Fi.
Click the information ‘i’ icon next to the Wi-Fi name you are connected to.
Scroll down until you see the section called Configure DNS
Change the configuration from Automatic to Manual.
Click Add Server.
Remove any IP addresses that may be already listed and in their place add:
1.1.1.1
1.0.0.1
2606:4700:4700::1111
2606:4700:4700::1001
Click Save.
I can't think of a good reason to pay for a third party app like DNS Override when an official app is provided free directly from Cloudflare.
For those using a manual Wifi configuration, know that Cloudflare's DNS is not used for your cellular data. Your iOS device will only use a custom DNS on connections that have it configured. There is not a way to configure cellular DNS on iOS at this time - your carrier settings will be used. For this reason, I suggest using the official Cloudflare app.
Not possible without a jailbreak.
Source: iPhone Configuration for OpenDNS It says, in part (emphasis mine):
"These instructions only work for Wi-Fi connections because iOS does not allow you to change the DNS servers when connected to cellular networks. Also, the changes are network specific, so you'll need to change the DNS servers every time you connect to a new wireless network."
These folks surely know more about DNS (and in particular overriding standard settings) than anybody else.
it's an old entry, but maybe someone found it when looking for how to change the DNS server on the iPhone.
I have found for me a more dynamic variant. A WireGuard-Pseudo-VPN can be used to assign DNS to all (or "included" or "without excluded" SSIDs): Simply set up a new connection and set up 127.0.0.1 as server. Then specify the DNS server under DNS separated by commas. Thats all – no VPN-Server or special app (except WireGuard) needed. You can switch on or off your specialized DNS/DoH-Server by hand or on demand.
So you can even use mobile DNS over HTTPS on cellular, quad9 for example. 😃
DNS Override worked for me on the tests, although I noted some bad reviews around battery life. Having a quick look at doing this via a profile and Apple Configurator software, seems you can set-up a profile with proxy DNS settings, but the profile just allows you to refer to a bundle within an iOS application. Looks like you do need an app like DNS Override in order to change cellular DNS, and can't be done through profile on it's own.
Would be very happy to be proved wrong on this. (iOS 11/8 Plus)
The suggestions by @cinematicme got me on my way; super helpful. Here is what I am running: iOS OpenVPN app tunnels to Azure Ubuntu server, app set to only activate on cellular. DNS Override app makes all WiFi connections use my preferred DNS (OpenDNS). My home network and Azure server are in my OpenVPN account with custom blocking rules.
1) Create cloud server in Azure (or DigitalOcean) with UDP port 1194 open; Azure burstable B1s size costs me $9/mo, 25GB bandwidth costs $1.75/mo
2) I spent hours setting up OpenVPN with the following guide, then found the top comment there links an install script that took literally 3 minutes, (see 3 below).
https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-16-04
3) Install OpenVPN using comment at above link, here it is directly:
https://github.com/Nyr/openvpn-install
wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh
Can read the script on GitHub here before installing.
The install script will ask you what DNS you want to use for your VPN. You can choose 1.1.1.1, Google, or OpenDNS.
4) Import the .ovpn file generated above into the iOS OpenVPN app, set to continuously reconnect on cellular only.
5) Bonus: I wanted OpenDNS on all WiFi connections as well, which can be accomplished via iOS DNS Override app ($1.99). I set this to force OpenDNS for all WiFi and cellular connections. It does not seem to conflict with the autoconnected VPN on cellular opened by the OpenVPN app.
https://www.dnsoverride.com/change-iphone-dns-with-an-app/
Hopefully this helps someone with their private cellular data needs. What took me a day to set up could have taken just a couple hours with the right information. Like @spinalwrap mentioned, a nice bonus of the actual VPN method is your cellular provider has none of your metadata.
I also installed the 1.1.1.1 app and it worked to get 1.1.1.1 DNS, but since I wanted OpenDNS and filtering, I opted for the VPN route.
Surfshark Trust DNS allows setting a manual DNS and works via Provisioning Profiles.
Try this app : DNS Override set DNS for Wi-Fi and cellular