I saw that there was a guide to set up or configure protonVPN + nextDNS for iOS or macOS. I could not find anything for windows. I figured it out so I thought I could help out other people in case they ever have issues as to how to do it. If some part of the guide is not clear, please let me know. Be warned that proton does suggest not to use a private DNS along with VPN. This guide will assume that you already have a custom nextDNS profile set up.
Step 1 - Configure ProtonVPN
- Now that you decided to use nextDNS with protonVPN, you should know that you would not be able to use netshield which is offered within protonVPN itself.
- In protonVPN, go to settings
- Then click on “Connection” tab
- Turn on “Custom DNS servers”
- Go to https://my.nextdns.io/
- Once you log in, you should land on the “setup” tab by default. If not, click on “Setup” tab
- Under Linked IP, you’ll see 2 DNS servers (as seen in the image)
- Copy the first one and paste it in “Custom DNS servers” and then click the “+” symbol (image attached for clarification)
- Copy the second one and paste it in “Custom DNS servers” and then click the “+” symbol
- Restart protonVPN
Now you should have added nextDNS to protonVPN successfully. Test this by going to https://ip.me and confirm you’re connected to a Proton VPN server. After that go to https://test.nextdns.io and the status should be: ok
. Even though it is now added to your protonVPN, you will not have your custom DNS on the VPN. If you go to https://my.nextdns.io/, it might show something like this. If you dont see it, try disconnecting your VPN and reconnecting again.
This is because your new IP would be different to the linked IP in nextDNS. Linked IP on nextDNS can be seen on the setup tab in https://my.nextdns.io/
If you click on the refresh icon, your IP will get updated and you will see that

Step 2 - Updating DDNS (via a DDNS service)
Now you can manually go to the link and click on refresh button every single time you change your IP address by connecting to a different server in protonVPN. Doing that every single time you change your IP might be a tedious and annoying task. For an easy way, you can use a Dynamic DNS service to do this. There is also another way of doing it by setting up a program to run in task scheduler. Please see below for that step.
For using a DDNS service, I would recommend duck DNS but there are lots out there, so feel free to use whatever you feel you are comfortable with. (EDIT: Few people mentioned using YogaDNS in the comments. Since I have not used it, I can’t make a guide on how to configure that but it is worth a mention in case if you are looking for a good DDNS service.) I cant possibly list the steps for every single DDNS out there so you would have to do your research on how to set up and configure that. But once you are done with that, you can go to https://my.nextdns.io/ and in “setup” tab, youll see this
Once you are done configuring your DDNS, you can add it here by clicking on “Configure DDNS”
Once you click on save, it should automatically update your linked IP. Make sure to test it by disconnecting and reconnecting to your VPN and then going to https://my.nextdns.io/ . It should show a green circle on the setup tab implying that everything is configured properly.
Step 2 - Updating DDNS (via powershell and task scheduler)
There is also a way to programmatically update your linked IP. To do this,
- Open notepad and copy paste this to notepad
# Get the current IP address
$IP = Invoke-RestMethod -Uri "http://ifconfig.me"
# Update NextDNS with the current IP
Invoke-RestMethod -Uri "https://link-ip.nextdns.io/******/****************?ip=$IP" -Method Get
Instead of https://link-ip.nextdns.io/******/****************
, you would have to get your link from https://my.nextdns.io/ . You should be able to see it in the setup tab itself. It should be under “advanced options”
If you click on \“Show advanced options\” you should be able to see it
This is the link you wanna paste in notepad
-
Save the file as “UpdateNextDNS.ps1” and store it anywhere. I stored it in my desktop itself.
-
Open Task Scheduler from the Windows Start menu and then click on “Create task”
-
Name the task to whatever you want it to be(e.g., “NextDNS IP Update”). Optional - Give a description if needed
-
In the same tab, click on “Run whether user is logged on or not” and also check “Run with highest privileges”
-
Go to the next tab which is “Triggers”. Click on “New…”. Click on the tab which says “begin the task” and choose “At startup”. Under Advanced settings in the same tab, check "Repeat task every: " and choose 5 minutes. In the nearby tab"For a duration of: ", choose Indefinitely. Make sure the bottom tab which says “Enabled” is also checked. Click on Ok after that.
-
Go to the next tab “Actions”. Click on “New…”. Click on “Action:” tab and select “start a program”. Under settings field, type “powershell.exe” (without the quotation marks). In the “Add arguments (optional):” field, type -File “path where you placed your poweshell file\UpdateNextDNS.ps1” (with the quotation marks). For example since mine was in desktop, it would be -File “C:\Users\Stanley Mitchell\Desktop\UpdateNextDNS.ps1”. Click on Ok.
-
Go to the next tab “Conditions”. I unchecked “Stop if the computer switches to battery power”. But its a personal preference. If you have a desktop PC, you could uncheck it as well. Other than the options in “Power”, no other check box should be checked. So make sure that options like “Start the task only if the computer is idle for” and “Start only if the following network connection is available” are unchecked.
-
Go to the next tab “Settings”. I have only checked “Allow task to be run on demand” and “Run task as soon as possible after a scheduled start is missed”. See if other options are necessary for you but its just a personal preference as well.
-
After this, you can just click on Ok. If you have password to your computer, youll be asked to enter it but after that you should be done. For now, you can right click on the task you just made and click on “Run”. Once it runs, you can go to https://my.nextdns.io/ and check if it worked. You should see a green circle indicating that everything is setup properly and your custom DNS profile is working on the device you are using right now.
You can give it one last test by going to https://ip.me and confirm that you’re connected to a Proton VPN server. After that go to https://test.nextdns.io and the status should be: ok
. As one last test, you can also go to https://dnsleaktest.com/ and it should show your selected VPN exit point & the test should show ONLY “dns.nextdns.io” for Hostname.
Big thanks to u/Nelizea and u/koick for making the guides on iOS. If anybody has any corrections or modifications to this guide, please let me know, I will modify it as soon as I can