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

Access settings for client identifier #2624

Closed
agitoxin opened this issue Feb 1, 2021 · 10 comments
Closed

Access settings for client identifier #2624

agitoxin opened this issue Feb 1, 2021 · 10 comments

Comments

@agitoxin
Copy link

agitoxin commented Feb 1, 2021

Hello

I'm trying the client ID in DoH with my phone and it works like a charm.
However, I couldn't utilize this feature to block unknown devices from network because the DNS settings>Access settings>Allowed clients only takes CIDR or IP addresses.

Since we could identify devices from DoH now, is it possible to allow or block a client by its identifier?

@Izya12
Copy link

Izya12 commented Mar 2, 2021

Good afternoon.
I would like to add, we need the ability to pass only the allowed doh clients, blocking the rest.

Добрый день.
Хотел бы дополнить, нужна возможность пропускать только разрешенных doh клиентов, остальных блокируя.

@ameshkov
Copy link
Member

ameshkov commented Mar 2, 2021

@Izya12 please upvote the original issue if you want it to be implemented.

@coxde
Copy link

coxde commented Mar 11, 2021

This is a great feature to keep my ADH server private.

@windware-ono
Copy link

Even if I attempt to set the global setting to have an invalid upstream only allowing the defined clients by identifier to access to a proper upstream, this breaks for all the defined clients as well.

Same if I define clients by identifier and let it use a proper upstream but define a 0.0.0.0/0 as clients with an invalid upstream.

This needs to be implemented to avoid strangers from utilizing the resolver.

@ainar-g
Copy link
Contributor

ainar-g commented Jun 21, 2021

@windware-ono, if you want to create an allowlist of clients then you can already do that with the DNS Settings → Access settings → Allowed clients setting. Although it currently only works for IP addresses and subnets, not ClientIDs.

@windware-ono
Copy link

windware-ono commented Jun 21, 2021

Yes, I'm aware of it but currently I'm running AH on a public network and my devices not belonging to specific IPs all the time and anyone who finds it's running a resolver can utilize it but if I can limit who can use it via client identifier as a sort of password, that would be very useful.

@ainar-g ainar-g self-assigned this Jun 22, 2021
@ainar-g ainar-g added this to the v0.107.0 milestone Jun 22, 2021
adguard pushed a commit to AdguardTeam/dnsproxy that referenced this issue Jun 24, 2021
Updates AdguardTeam/AdGuardHome#2624.
Updates AdguardTeam/AdGuardHome#3162.

Squashed commit of the following:

commit 62e9cf4
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed Jun 23 15:15:36 2021 +0300

    all: fix go1.15 compat

commit 096b0d8
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed Jun 23 15:10:53 2021 +0300

    all: add requestid, refactor
@carrot-eggs
Copy link

Customizing the upstream through the client ID cannot take effect, and it will still be resolved through the upstream DNS set globally, as shown in the figure:

1
2
3
4

My adguardhome is installed on a VPS, and I cannot set up a dedicated upstream DNS for a certain device through the client ID.

adguardhome version: v0.106.3

@ainar-g
Copy link
Contributor

ainar-g commented Jun 28, 2021

@carrot-eggs, hi, this issue is about access settings. Please post your report as a separate issue. Thanks.

adguard pushed a commit that referenced this issue Jun 29, 2021
Updates #2624.
Updates #3162.

Squashed commit of the following:

commit 68860da
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Jun 29 15:41:33 2021 +0300

    all: imp types, names

commit ebd4ec2
Merge: 239eb72 16e5e09
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Jun 29 15:14:33 2021 +0300

    Merge branch 'master' into 2624-clientid-access

commit 239eb72
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Jun 29 15:13:10 2021 +0300

    all: fix client blocking check

commit e6bece3
Merge: 9935f2a 9d1656b
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Jun 29 13:12:28 2021 +0300

    Merge branch 'master' into 2624-clientid-access

commit 9935f2a
Author: Ildar Kamalov <ik@adguard.com>
Date:   Tue Jun 29 11:26:51 2021 +0300

    client: show block button for client id

commit ed786a6
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Jun 25 15:56:23 2021 +0300

    client: imp i18n

commit 4fed21c
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Jun 25 15:34:09 2021 +0300

    all: imp i18n, docs

commit 55e65c0
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Jun 25 13:34:01 2021 +0300

    all: fix cache, imp code, docs, tests

commit c1e5a83
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Jun 24 19:27:12 2021 +0300

    all: allow clientid in access settings
@ainar-g
Copy link
Contributor

ainar-g commented Jun 29, 2021

@agitoxin, this feature is now implemented on the edge channel as of snapshot e08a64e. Can you please check if it works for you?

@agitoxin
Copy link
Author

@ainar-g , I have refreshed the service to the latest snapshot 232cd38 and tested the "Allowed clients" and "Disallowed clients" with multiple client IDs, it works excellent! Also, I have tried to allow a device's IP but disallow its client ID. This result in allowing the device, which is surprisingly match to the description. Thanks a lot. I'll close the issue.

heyxkhoa pushed a commit to heyxkhoa/AdGuardHome that referenced this issue Mar 20, 2023
Updates AdguardTeam#2624.
Updates AdguardTeam#3162.

Squashed commit of the following:

commit 68860da
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Jun 29 15:41:33 2021 +0300

    all: imp types, names

commit ebd4ec2
Merge: 239eb72 16e5e09
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Jun 29 15:14:33 2021 +0300

    Merge branch 'master' into 2624-clientid-access

commit 239eb72
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Jun 29 15:13:10 2021 +0300

    all: fix client blocking check

commit e6bece3
Merge: 9935f2a 9d1656b
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Jun 29 13:12:28 2021 +0300

    Merge branch 'master' into 2624-clientid-access

commit 9935f2a
Author: Ildar Kamalov <ik@adguard.com>
Date:   Tue Jun 29 11:26:51 2021 +0300

    client: show block button for client id

commit ed786a6
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Jun 25 15:56:23 2021 +0300

    client: imp i18n

commit 4fed21c
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Jun 25 15:34:09 2021 +0300

    all: imp i18n, docs

commit 55e65c0
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Jun 25 13:34:01 2021 +0300

    all: fix cache, imp code, docs, tests

commit c1e5a83
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Jun 24 19:27:12 2021 +0300

    all: allow clientid in access settings
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

7 participants