jpillora / docker-dnsmasq

dnsmasq in a docker container, configurable via a simple web UI
MIT License
734 stars 226 forks source link

Using docker-dnsmasq on Ubuntu #21

Open freeyland opened 5 years ago

freeyland commented 5 years ago

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 commented 5 years ago

What’s the local default dns server?

On Sat, 26 Oct 2019 at 3:46 am freeyland notifications@github.com wrote:

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.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jpillora/docker-dnsmasq/issues/21?email_source=notifications&email_token=AAE2X45F356KCF2ECP5TE2TQQMPGPA5CNFSM4JFFTL7KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HUN4QCQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE2X44R2ALABQ6KQBUULVLQQMPGPANCNFSM4JFFTL7A .

freeyland commented 5 years ago

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 commented 5 years ago

Can’t find sins dns, need some more concrete information. Maybe someone installed another dns server. If so, yes it’s tricky to run two. I’d say uninstall the other one and use dnsmasq but it sounds like it’s up to your sys admin

On Sun, 27 Oct 2019 at 3:06 am freeyland notifications@github.com wrote:

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.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/jpillora/docker-dnsmasq/issues/21?email_source=notifications&email_token=AAE2X47XHWQP6YPOLPYE6ELQQRTGTA5CNFSM4JFFTL7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECKLEHQ#issuecomment-546615838, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE2X466OX2Q3V5EH6OJHMLQQRTGTANCNFSM4JFFTL7A .

beeth0ven commented 5 years ago

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 commented 5 years ago

Ahh interesting - thanks for the info

On Sun, 27 Oct 2019 at 15:12, beeth0ven notifications@github.com wrote:

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 https://computingforgeeks.com/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.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jpillora/docker-dnsmasq/issues/21?email_source=notifications&email_token=AAE2X43SD3HXJYWNYWRVE33QQUIMJA5CNFSM4JFFTL7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECKV74A#issuecomment-546660336, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE2X4YZYPKTWHK7HMZWNQLQQUIMJANCNFSM4JFFTL7A .

beeth0ven commented 5 years ago

You are welcome!

ciarancourtney commented 4 years ago

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.