Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep DNS rewrites active with "disabled protection" #1558

Closed
coffinbearer opened this issue Apr 7, 2020 · 18 comments
Closed

Keep DNS rewrites active with "disabled protection" #1558

coffinbearer opened this issue Apr 7, 2020 · 18 comments

Comments

@coffinbearer
Copy link

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)

@lbalogh
Copy link

lbalogh commented 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)

@ameshkov ameshkov reopened this May 8, 2020
@ameshkov
Copy link
Member

ameshkov commented May 8, 2020

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

@lbalogh
Copy link

lbalogh commented May 8, 2020

Done. Thanks !

@Raytestrak
Copy link

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
Copy link

Raytestrak commented 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.

@lbalogh
Copy link

lbalogh commented 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

@Raytestrak
Copy link

Raytestrak commented 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.

@SilentGob
Copy link

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.

@zilexa
Copy link

zilexa commented 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
Copy link

zilexa commented 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.

@Dameon87
Copy link

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

@ainar-g
Copy link
Contributor

ainar-g commented Jun 3, 2021

This will probably be done together with #2499.

@lbalogh
Copy link

lbalogh commented Jun 3, 2021

Good news, thanks for the follow up !

@EugeneOne1 EugeneOne1 modified the milestones: v0.108.0, v0.107.0 Oct 14, 2021
@EugeneOne1
Copy link
Member

@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.

@ainar-g ainar-g assigned EugeneOne1 and unassigned ainar-g Oct 25, 2021
@lbalogh
Copy link

lbalogh commented Oct 27, 2021

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

@EugeneOne1
Copy link
Member

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

adguard pushed a commit that referenced this issue Aug 16, 2022
Merge in DNS/adguard-home from add-dnssvc to master

Squashed commit of the following:

commit 55f4f11
Merge: 95dc28d 6e63757
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Aug 15 20:53:07 2022 +0300

    Merge branch 'master' into add-dnssvc

commit 95dc28d
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Aug 15 20:52:50 2022 +0300

    all: imp tests, docs

commit 0d9d029
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Aug 11 19:27:59 2022 +0300

    all: imp docs

commit 8990e03
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Aug 11 19:05:29 2022 +0300

    all: imp tests more

commit 92730d9
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Aug 11 18:37:48 2022 +0300

    all: imp tests more

commit 8cd45ba
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Aug 11 18:11:15 2022 +0300

    all: add v1 dnssvc stub; refactor tests
@chaelli
Copy link

chaelli commented 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.

heyxkhoa pushed a commit to heyxkhoa/AdGuardHome that referenced this issue Mar 20, 2023
Merge in DNS/adguard-home from add-dnssvc to master

Squashed commit of the following:

commit 55f4f11
Merge: 95dc28d 6e63757
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Aug 15 20:53:07 2022 +0300

    Merge branch 'master' into add-dnssvc

commit 95dc28d
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Aug 15 20:52:50 2022 +0300

    all: imp tests, docs

commit 0d9d029
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Aug 11 19:27:59 2022 +0300

    all: imp docs

commit 8990e03
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Aug 11 19:05:29 2022 +0300

    all: imp tests more

commit 92730d9
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Aug 11 18:37:48 2022 +0300

    all: imp tests more

commit 8cd45ba
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Aug 11 18:11:15 2022 +0300

    all: add v1 dnssvc stub; refactor tests
@felkal
Copy link

felkal commented 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests