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

DNS Lookup via systemd-resolved on Ubuntu Minimal 18.04 #5875

Closed
vasilij-icabbi opened this issue May 21, 2019 · 6 comments
Closed

DNS Lookup via systemd-resolved on Ubuntu Minimal 18.04 #5875

vasilij-icabbi opened this issue May 21, 2019 · 6 comments

Comments

@vasilij-icabbi
Copy link

Consul Version: 1.5.0
OS: Ubuntu Minimal 18.04
Platform: AWS

I want to use just systemd-resolved and want it to forward all *.consul to Consul and rest handle with whatever is configured in /etc/resolv.conf.

I was following steps in this manual: https://learn.hashicorp.com/consul/security-networking/forwarding#systemd-resolved-setup

And it did not work for me, as when I try to do dig @127.0.0.53 -p 53 consul.service.consul (DNS on AWS Ubuntu is bind to 127.0.0.53) I get "Could not resolve".

I read this documentation: https://jlk.fjfi.cvut.cz/arch/manpages/man/resolved.conf.5
If I understand it right, it talks about that Domains property is for single label hostname, does it mean not for domains with dot?

I would appreciate if anyone could help me to configure systemd-resolved to forward .consul requests to Consul?

Thank you

@pearkes
Copy link
Contributor

pearkes commented May 23, 2019

DNS on AWS Ubuntu is bind to 127.0.0.53

This seems like it could be the source of the problem. If you're following that guide in detail it should binding to localhost/127.0.0.1.

Hope that helps! In the future, issues on GitHub for Consul are intended to be related to bugs or feature requests, so we recommend using our other community resources instead of asking here.

If you feel this is a bug, please open a new issue with the appropriate information.

@pearkes pearkes closed this as completed May 23, 2019
@vasilij-icabbi
Copy link
Author

Hello @pearkes , why issue is closed? I clearly point out that problem is not that I follow blindly documentation, but seems configuration described in Guides contradicts systemd-resolved documentation. Also it seems outdated and requires more proper explanation, I can submit PR to it when resolution achieved, but for that I need a hand of help.

I had no success on either community mailing list or gitter, so I came here as last hope.

@mkeeler
Copy link
Member

mkeeler commented May 23, 2019

@vasilij-icabbi As a general rule we close issues that are "questions" and try to redirect them to the other community resources. In addition to having more users who may be able to answer the question those other forums present a better more searchable records of the question and if/how it was answered or resolved.

As for the documentation, myself and another community member worked on updating the DNS forwarding guide about a year ago now: #4155. At the time of writing doing exactly as the guide described worked although I wouldn't be surprised if systemd-resolved changed in such a way that our guide needs updating now.

Looking back at the mailing list it looks like someone responded with a question of whether replacing 127.0.0.53 in your resolv.conf with 127.0.0.1 changed anything. Also from the information above and the mailing list post it looks like your setup may have changed.

I would say that we take this conversation over to the mailing list or to the new Discuss platform that was just introduced for all HashiCorp related community discussions. When posting to either of those forums it would be good to describe your setup in as much detail as you can. Do you have systemd-resolved still running. Are you also using dnsmasq. What addresses and ports are all the things listening on? Basically the more details you can provide the more likely it is that I (or another community member) can spot the problem. In some cases these interactions turn up legitimate bugs in Consul or deficiencies in the documentation which is when we typically transition things over to GitHub.

I will make sure to look out for your post and will help as I can.

@vasilij-icabbi
Copy link
Author

Thank you @mkeeler I was going through a ticket you mentioned and still did not manage to make it work, I suspect is that the way I bind requires different iptable configuration, I will create ticket in Discussion platform latter this week.

@kquinsland
Copy link

Sorry to revive a closed issue, but this should be enough for people to figure it out

https://gist.github.com/kquinsland/5cdc63614a581d9b392f435740b58729

@ghost
Copy link

ghost commented Jan 25, 2020

Hey there,

This issue has been automatically locked because it is closed and there hasn't been any activity for at least 30 days.

If you are still experiencing problems, or still have questions, feel free to open a new one 👍.

@ghost ghost locked and limited conversation to collaborators Jan 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants