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

Use full qualified client name as group name #329

Closed
adamsewell opened this issue Nov 4, 2021 · 5 comments · Fixed by #440
Closed

Use full qualified client name as group name #329

adamsewell opened this issue Nov 4, 2021 · 5 comments · Fixed by #440
Assignees
Labels
🔨 enhancement New feature or request
Milestone

Comments

@adamsewell
Copy link

I realize that blocky was made for a LAN environment but I'm testing with a few VPS's and using it with a handful of different locations that all have dynamic public IPs. These locations all have dynamic DNS names via noip.com. It looks like Blocky will do a rdns lookup, but that wouldn't help in my situation. I would it to actually do a regular 'ol lookup on a hostname like "xxxx.noip.com" and see if it matches the corresponding IP. Would this be something that could be added? Or maybe it already is and I'm just totally missing it.

Thanks! I'm really digging this project.

@0xERR0R
Copy link
Owner

0xERR0R commented Nov 4, 2021

Hey,
blocky "needs" a name of the client for blocking (to determine which lists should be used) and for logging purposes. rDNS will be performed if you define the clientLookup.upstream DNS server.
So your use case is: different client IPs (dynamic), but you want "nice" client names?

@adamsewell
Copy link
Author

The usecase is basically this. Say a client has a dynamic dns name with noip. That name would be joebob.ddns.net which resolves to 192.111.111.xxx - So under clientGroupsBlock, I'd like to be able to use the joebob.ddns.net in place of the IP subnet or client hostname. That way, blocky could potentailly use the joebob.ddns.net to "authenticate" the requesting IP of 192.111.111.xxx to joebob.ddns.net and it's ruleset. If that makes sense.

@0xERR0R
Copy link
Owner

0xERR0R commented Nov 4, 2021

ok, got it. With simple DNS query (port 53), there is only the IP address available, therefore you can either map ip to client name manually (in your case not possible, because dynamic IPs) or use rDNS to transform the IP to the host name. I'm not sure if your ddns provider has such rDNS resolver for own names. If yes, it work out of the box.

Another option would be to use DoT or DoH in blocky. In this case each client can pass own name with the request.

There is currently no way to resolve the name in clientGroupBlocks and match the result with request IP.

@adamsewell
Copy link
Author

Right, that's kind of what I figured. Would this functionality be something you'd consider adding?

@0xERR0R
Copy link
Owner

0xERR0R commented Nov 5, 2021

Yes, I think, it would be a nice additional lookup strategy. The lookup should be performed periodically and the result (IP addresses) should be cached.

@0xERR0R 0xERR0R added the 🔨 enhancement New feature or request label Nov 5, 2021
@0xERR0R 0xERR0R added this to the 0.18 milestone Nov 16, 2021
@0xERR0R 0xERR0R self-assigned this Feb 1, 2022
@0xERR0R 0xERR0R changed the title clientGroupsBlock fqdn support Use full qualified client name as group name Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants