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.
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 220.127.116.11 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.
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.
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 18.104.22.168 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 22.214.171.124 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 126.96.36.199 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:
188.8.131.52 184.108.40.206 2606:4700:4700::1111 2606:4700:4700::1001
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.
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
3) Install OpenVPN using comment at above link, here it is directly:
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 220.127.116.11, 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.
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 18.104.22.168 app and it worked to get 22.214.171.124 DNS, but since I wanted OpenDNS and filtering, I opted for the VPN route.
Try this app : DNS Override set DNS for Wi-Fi and cellular