Keep DNS rewrites active with "disabled protection" #1455

Closed
opened 2026-03-04 01:18:47 -05:00 by deekerman · 19 comments
Owner

Originally created by @coffinbearer on GitHub (Apr 7, 2020).

Originally assigned to: @EugeneOne1 on GitHub.

Problem Description

I would like to have the option to have my dns rewrites active and "disable the ad protection".

Proposed Solution

add a option to keep dns rewrites active while disabeling ad protection.

Alternatives Considered

change the default way dns rewites work and alwyas keep them active.

Additional Information

Version of AdGuard Home server:
v0.101 (Docker tag :latest)

Originally created by @coffinbearer on GitHub (Apr 7, 2020). Originally assigned to: @EugeneOne1 on GitHub. ### Problem Description I would like to have the option to have my dns rewrites active and "disable the ad protection". ### Proposed Solution add a option to keep dns rewrites active while disabeling ad protection. ### Alternatives Considered change the default way dns rewites work and alwyas keep them active. ### Additional Information Version of AdGuard Home server: v0.101 (Docker tag :latest)
deekerman 2026-03-04 01:18:47 -05:00
Author
Owner

@lbalogh commented on GitHub (May 5, 2020):

Why has this request been closed ?

I access AdGuard web interface by going to https://adguard.mydomain.com. adguard.mydomain.com is defined in the "DNS rewrites" section.

If I disable protection for some reason (like debugging a problematic website), adguard.mydomain.com doesn't resolve anymore and I lose access to the web interface (and all other services that are defined as DNS rewrites)

@lbalogh commented on GitHub (May 5, 2020): Why has this request been closed ? I access AdGuard web interface by going to **https://adguard.mydomain.com**. **adguard.mydomain.com** is defined in the "DNS rewrites" section. If I disable protection for some reason (like debugging a problematic website), **adguard.mydomain.com** doesn't resolve anymore and I lose access to the web interface (and all other services that are defined as DNS rewrites)
Author
Owner

@ameshkov commented on GitHub (May 8, 2020):

@lbalogh please upvote this issue if you want this to work that way.

@ameshkov commented on GitHub (May 8, 2020): @lbalogh please upvote this issue if you want this to work that way.
Author
Owner

@lbalogh commented on GitHub (May 8, 2020):

Done. Thanks !

@lbalogh commented on GitHub (May 8, 2020): Done. Thanks !
Author
Owner

@Raytestrak commented on GitHub (May 25, 2020):

I'd like this too, because all my apps on my NAS make use of url rewrites and I need to disable adguard sometimes (when using some smart tv apps, which don't anything in the query log, but will only work when adguard is suspended). Funny thing is, when I disable adguard, my dns rewrite is unavailable (say: adguard.dnssuffix) but immediately after I access adguard via my public domain (addguard.mydomainwhichistoolongtotypehencetheurlrewrites.com), the rewrite works again?

@Raytestrak commented on GitHub (May 25, 2020): I'd like this too, because all my apps on my NAS make use of url rewrites and I need to disable adguard sometimes (when using some smart tv apps, which don't anything in the query log, but will only work when adguard is suspended). Funny thing is, when I disable adguard, my dns rewrite is unavailable (say: adguard.dnssuffix) but immediately after I access adguard via my public domain (addguard.mydomainwhichistoolongtotypehencetheurlrewrites.com), the rewrite works again?
Author
Owner

@Raytestrak commented on GitHub (May 25, 2020):

@Archive5

I know how to disable / pause adguard and I don't think that is the OP's question as well. I do it automatically via a webhook when I launch the troublesome apps on my smart tv, my 'problem' is that all of my webapps on my nas are unavailabe via the dns rewrite after turning off adguard due to fact the dns rewrites stop working when disabling adguard.

@Raytestrak commented on GitHub (May 25, 2020): @Archive5 I know how to disable / pause adguard and I don't think that is the OP's question as well. I do it automatically via a webhook when I launch the troublesome apps on my smart tv, my 'problem' is that all of my webapps on my nas are unavailabe via the dns rewrite after turning off adguard due to fact the dns rewrites stop working when disabling adguard.
Author
Owner

@lbalogh commented on GitHub (May 26, 2020):

@Archive5 You're right, in my case 'block domains using filters and hosts files' is the solution.

But I still think that the "Disable protection" button on the main page should disable, as it says, protection. DNS rewrites is not "protection" in my opinion.

Maybe the label could be changed to "Disable AdGuard Home", OR the option to completely disable AdGuard Home (dns rewrites included) should be moved to an other place

@lbalogh commented on GitHub (May 26, 2020): @Archive5 You're right, in my case 'block domains using filters and hosts files' is the solution. But I still think that the "Disable protection" button on the main page should disable, as it says, **protection**. DNS rewrites is not "protection" in my opinion. Maybe the label could be changed to "Disable AdGuard Home", OR the option to completely disable AdGuard Home (dns rewrites included) should be moved to an other place
Author
Owner

@Raytestrak commented on GitHub (May 26, 2020):

@Archive5 disabling block lists probably could be the solution to my 1st problem, but like @lbalogh said, DNS rewrites isn't part of protection. The top four checkboxes under general settings are, though.

Right now I use curl -X POST -H "Content-Type:application/json" -d '{"protection_enabled":false}' http://192.168.1.252:9080/control/dns_config to apparently disable everyting.

I'll change it to curl -X POST -H "Content-Type:application/json" -d '{"enabled":false}' http://192.168.1.252:9080/control/filtering/config and see what happens. That probably won't interfere with my dns rewrites (my 2nd problem). But ... I still think this feature should still be active when disabling protection.

edit: curl -X POST -H "Content-Type:application/json" -d '{"enabled":false}' http://192.168.1.252:9080/control/filtering/config fixes both my problems, but I still stand by the original request. There are no red flags warning me that I have adblocking disabled by doing it this way.

@Raytestrak commented on GitHub (May 26, 2020): @Archive5 disabling block lists probably could be the solution to my 1st problem, but like @lbalogh said, DNS rewrites isn't part of protection. The top four checkboxes under general settings are, though. Right now I use **curl -X POST -H "Content-Type:application/json" -d '{"protection_enabled":false}' http://192.168.1.252:9080/control/dns_config** to apparently disable everyting. I'll change it to **curl -X POST -H "Content-Type:application/json" -d '{"enabled":false}' http://192.168.1.252:9080/control/filtering/config** and see what happens. That probably won't interfere with my dns rewrites (my 2nd problem). But ... I still think this feature should still be active when disabling protection. edit: **curl -X POST -H "Content-Type:application/json" -d '{"enabled":false}' http://192.168.1.252:9080/control/filtering/config** fixes both my problems, but I still stand by the original request. There are no red flags warning me that I have adblocking disabled by doing it this way.
Author
Owner

@SilentGob commented on GitHub (Jun 1, 2020):

Got bitten by this and it took me too long to understand what was happening so I will just agree with the orignal poster.
Rewrite is (in my configuration) not part of protection and I would prefer that disabling protection for testing purpose does not shutdown rewrite.

@SilentGob commented on GitHub (Jun 1, 2020): Got bitten by this and it took me too long to understand what was happening so I will just agree with the orignal poster. Rewrite is (in my configuration) not part of protection and I would prefer that disabling protection for testing purpose does not shutdown rewrite.
Author
Owner

@zilexa commented on GitHub (Jan 27, 2021):

This is a horrible bug: everyone runs AGH on their home network and can use DNS rewrite to easily access.. the web UI of AGH!!

And probably all their other services running on their network.

After I disable protection, I can't even access AdGuardHome anymore!

Please fix. Note the bug is worse: after enabling protection, the DNS rewrite still doesn't work. I have to restart AGH!

@zilexa commented on GitHub (Jan 27, 2021): This is a horrible bug: everyone runs AGH on their home network and can use DNS rewrite to easily access.. the web UI of AGH!! And probably all their other services running on their network. After I disable protection, I can't even access AdGuardHome anymore! Please fix. Note the bug is worse: after enabling protection, the DNS rewrite still doesn't work. I have to restart AGH!
Author
Owner

@zilexa commented on GitHub (Mar 10, 2021):

Can this please be solved in the next version?
Everytime I disable protection, I cannot enable it anymore because it was disabled via the pretty url (dns-rewrite) to adguard on my server.

@zilexa commented on GitHub (Mar 10, 2021): Can this please be solved in the next version? Everytime I disable protection, I cannot enable it anymore because it was disabled via the pretty url (dns-rewrite) to adguard on my server.
Author
Owner

@Dameon87 commented on GitHub (Mar 15, 2021):

Would definitely like to see this implemented too. DNS rewrites should not be disabled when protection is disabled.

@Dameon87 commented on GitHub (Mar 15, 2021): Would definitely like to see this implemented too. DNS rewrites should not be disabled when protection is disabled.
Author
Owner

@ainar-g commented on GitHub (Jun 3, 2021):

This will probably be done together with #2499.

@ainar-g commented on GitHub (Jun 3, 2021): This will probably be done together with #2499.
Author
Owner

@lbalogh commented on GitHub (Jun 3, 2021):

Good news, thanks for the follow up !

@lbalogh commented on GitHub (Jun 3, 2021): Good news, thanks for the follow up !
Author
Owner

@EugeneOne1 commented on GitHub (Oct 20, 2021):

@coffinbearer @lbalogh @Raytestrak @SilentGob @zilexa @Dameon87
Here it is. The latest build in the edge channel improves the filtering logic. $dnsrewrite rules and other DNS rewrites are applied to each request even with the protection being disabled. Those now are controlled only by the Block domains using filters and hosts files checkbox in General settings.

Could you please install the build and check, if our solution serves your purposes properly? Thanks.

@EugeneOne1 commented on GitHub (Oct 20, 2021): @coffinbearer @lbalogh @Raytestrak @SilentGob @zilexa @Dameon87 Here it is. The latest build in the edge channel improves the filtering logic. `$dnsrewrite` rules and other DNS rewrites are applied to each request even with the protection being disabled. Those now are controlled only by the **Block domains using filters and hosts files** checkbox in **General settings**. Could you please install the build and check, if our solution serves your purposes properly? Thanks.
Author
Owner

@lbalogh commented on GitHub (Oct 27, 2021):

I confirm that it works : after disabling protection, AGH now returns correctly my rewrites. Thanks !

@lbalogh commented on GitHub (Oct 27, 2021): I confirm that it works : after disabling protection, AGH now returns correctly my rewrites. Thanks !
Author
Owner

@EugeneOne1 commented on GitHub (Oct 27, 2021):

@lbalogh, thanks for testing. We'll close the issue for now. Please feel free to open new issues if those will be found.

@EugeneOne1 commented on GitHub (Oct 27, 2021): @lbalogh, thanks for testing. We'll close the issue for now. Please feel free to open new issues if those will be found.
Author
Owner

@chaelli commented on GitHub (Sep 1, 2022):

sorry - it does not filter at all anymore :/ so probably not an issue with this feature

Hi @EugeneOne1

should this be in every version starting from 0.107? I just tested on v0.107.11 (from docker) and the behavior seems to be the same as with the old v0.106.x version - rewrites are disabled if I click the "disable protection" button.

@chaelli commented on GitHub (Sep 1, 2022): sorry - it does not filter at all anymore :/ so probably not an issue with this feature Hi @EugeneOne1 should this be in every version starting from 0.107? I just tested on v0.107.11 (from docker) and the behavior seems to be the same as with the old v0.106.x version - rewrites are disabled if I click the "disable protection" button.
Author
Owner

@felkal commented on GitHub (Dec 14, 2023):

Hi there,

This is still a problem for me running Adguard Home v0.107.43. When I disable protection for a particular device, it can no longer reach services that are accessible due to DNS rewrites.

@felkal commented on GitHub (Dec 14, 2023): Hi there, This is still a problem for me running Adguard Home v0.107.43. When I disable protection for a particular device, it can no longer reach services that are accessible due to DNS rewrites.
Author
Owner

@rubin110 commented on GitHub (May 1, 2025):

I just created #7803, which is related to this behavior but when protection is disabled per client.

@rubin110 commented on GitHub (May 1, 2025): I just created #7803, which is related to this behavior but when protection is disabled per client.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/AdGuardHome#1455
No description provided.