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

Upstreams servers local redirection #787

Closed
lordraiden opened this issue Jun 2, 2019 · 12 comments
Closed

Upstreams servers local redirection #787

lordraiden opened this issue Jun 2, 2019 · 12 comments
Labels

Comments

@lordraiden
Copy link

Steps to reproduce

  1. I have configure upstreams DNS servers with this
    [/abcd.duckdns.org/]192.168.1.220
    when I resolver this abcd.duckdns.org it gives me an error page
    It's a website hosted in my network I want local queries to redirect to the IP.

When I test the servers I get this error
Server "[/abcd.duckdns.org/]192.168.1.220": could not be used, please check that you've written it correctly

192.168.1.220 it's a nginx server. with piholes wortks.

Expected behavior

It should give me the website behind

Actual behavior

when I resolver this abcd.duckdns.org it gives me an error page

Your environment

Running docker latest version

@ameshkov
Copy link
Member

ameshkov commented Jun 3, 2019

@lordraiden

Here's how it should look like:
/abcd.duckdns.org/192.168.1.220

Square brackets just indicate that this part of the server line is optional, you shouldn't include them

@ameshkov ameshkov closed this as completed Jun 3, 2019
@lordraiden
Copy link
Author

lordraiden commented Jun 3, 2019

Now I get this error

Server "/abcd.duckdns.org/192.168.1.220": could not be used, please check that you've written it correctly

Error: control/set_upstreams_config | wrong upstreams specification: address /abcd.duckdns.org/192.168.1.220: missing port in address | 400

And if I put /abcd.duckdns.org/192.168.1.220:443

Error: control/set_upstreams_config | wrong upstreams specification: /abcd.duckdns.org/192.168.1.220 is not a valid IP | 400

@admitrevskiy
Copy link

@lordraiden hi!
The right way to specify upstream per host is [/abcd.duckdns.org/]192.168.1.220

I think that you get an error because it's the only one upstream server which you specified. It means that you should specify any other upstream to resolve all queries except for abcd.duckdns.org

@lordraiden
Copy link
Author

lordraiden commented Jun 5, 2019

Sorry I feel stupid right now

This is my configuration, it doesn't matter if I use [] or not it doesnt work, I get the same errors
What I want is adguard home to resolve 192.168.1.220 when this domain is called abcd.duckdns.org. How can I do this?
@ameshkov @admitrevskiy

1.1.1.1
9.9.9.9
/abcd.duckdns.org/192.168.1.220
tls://1dot1dot1dot1.cloudflare-dns.com
https://dns.cloudflare.com/dns-query

@admitrevskiy
Copy link

admitrevskiy commented Jun 5, 2019

@lordraiden I don't understand what's going on, your configuration with [] looks correct :)

Let's clarify: your goal is to resolve abcd.duckdns.org with 192.168.1.220 upstream or you'd like to be redirected to 192.168.1.220 when try to resolve abcd.duckdns.org?

-If you try to reach the goal №1 - please, send me verbose logs (run AGHome with -v option)
-If you try to reach the goal №2 - upstream-per-domain specification is not the right place to do it

@lordraiden
Copy link
Author

@admitrevskiy
I'm trying nº2, how can I do it?

@admitrevskiy
Copy link

Try the following:

-Go to Filters -> Custom filtering rules
-Add this rule: 192.168.1.220 abcd.duckdns.org

Please, let me know if something goes wrong.

@lordraiden
Copy link
Author

lordraiden commented Jun 5, 2019

@admitrevskiy
It doesn't work, if I do a nslookup it says that the domain doesn't exits, in pihole can be done by editing the settings with this solution
https://discourse.pi-hole.net/t/howto-using-pi-hole-as-lan-dns-server/533

@ameshkov this is must have and it should be available to configure in the interface

@ameshkov
Copy link
Member

ameshkov commented Jun 6, 2019

Could you please take a screenshot of what you have in the filtering log?
Works for me just okay:
https://uploads.adguard.com/up04_d9vz4_adguard-dns__-bash__14238.png

@lordraiden
Copy link
Author

For some reason now it works. Thanks a lot for the patience.
BTW nice update the 0.96, I hope this proyect will continue growing, better analytics would be awesome

@lordraiden
Copy link
Author

lordraiden commented Jun 8, 2019

@ameshkov @admitrevskiy
One more thing, when I add the rule in the filter log appears as something blocked by the filter while actually is just a redirection, maybe you could change in the interface the way this is treated and change the color from red to blue or something

imagen

@ameshkov
Copy link
Member

ameshkov commented Jun 9, 2019

Yeah, this will be handled with #818

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

No branches or pull requests

3 participants