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

Using docker-dnsmasq on Ubuntu #21

Open
freeyland opened this issue Oct 25, 2019 · 7 comments
Open

Using docker-dnsmasq on Ubuntu #21

freeyland opened this issue Oct 25, 2019 · 7 comments

Comments

@freeyland
Copy link

Can someone please help how to use this image on Ubuntu. The problem is that Ubuntu has already a default dns server running on port 53.
I don't think it is a good idea to stop the local dns, as when the container is not running, there is not network.
It would be nice if both could run in parallel.

@jpillora
Copy link
Owner

jpillora commented Oct 25, 2019 via email

@freeyland
Copy link
Author

freeyland commented Oct 26, 2019

To tell you the truth, it is what our sys admin told me. (I am more a Mac guy :) ).
What I can see is that port 53 is already in use by a DNS server. What I see from Ubuntu documentation is that sins version 18, NETPLAN is used to configure your dns.
There is a project mage2click which is using your docker dnsmasq. It working very well on Mac, but when started on Ubunti I get an error message saying that port 53 is already allocted. I have no clue how to configure Ubuntu so that it is using your DNSmasq.

@jpillora
Copy link
Owner

jpillora commented Oct 26, 2019 via email

@beeth0ven
Copy link

Hi, there!

I've faced the same problem before. But I fix it by following this tutorial: How to Install and Configure Dnsmasq on Ubuntu 18.04 LTS .

It says:

Ubuntu 18.04 comes with systemd-resolve which you need to disable since it binds to port 53 which will conflict with Dnsmasq port.

Run the following commands to disable the resolved service:
sudo systemctl disable systemd-resolved
sudo systemctl stop systemd-resolved

Also, remove the symlinked resolv.conf file

$ ls -lh /etc/resolv.conf
lrwxrwxrwx 1 root root 39 Aug 8 15:52 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf

$ sudo rm /etc/resolv.conf

Then create new resolv.conf file.

echo "nameserver 8.8.8.8" > /etc/resolv.conf
...

Hope it make sense.

@jpillora
Copy link
Owner

jpillora commented Oct 27, 2019 via email

@beeth0ven
Copy link

You are welcome!

@ciarancourtney
Copy link

If you don't need the DNS feature of dnsmasq (i.e. just using DHCP) you can set port=0 in dnsmasq.conf to disable it.

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

No branches or pull requests

4 participants