Ubuntu 14.04 LTS with dnsmasq no external DNS
-
Hello,
i´m new in this forum. I have a Problem with FOG on Ubtunu 14.04 LTS.
I installed Fog with this tutorial:
https://wiki.fogproject.org/wiki/index.php/Ubuntu_14.04
I have a unmodifiable DHCP Server so i installed dnsmasq with this tutorial to:
https://wiki.fogproject.org/wiki/index.php/Using_FOG_with_an_unmodifiable_DHCP_server/_Using_FOG_with_no_DHCP_serverMy clients can connect to the fog Server. Everything looks good but the fog server is not able to to connect to external hosts outside my network. If i ping an external host like google.com then is this a unknown host. The external dns doesn´t work. if i disable the the line port=0 in the /etc/dnsmasq.d/ltsp.conf than my client don´t connect to the fogserver
I need the externel dns to update the Client kernel or download the new clamav database from the server
-
Did you modify the networkmanager.conf as well?
-
no. I only set a static IP address, gateway, dns into /etc/network/interfaces
than i installed all updates for ubuntu and then dnsmasq
after dnsmasq i had no external dns resulution -
-
i have no file like /etc/NetworkManager/NetworkManager.conf
also the service network-manager is not installed -
@MaMu https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/1501189
That appears to be your issue, it’s a bug in dnsmasq/resolvconf where it changes your resolvconf to use 127.0.0.1 as DNS when using port 0 which of course breaks your DNS to external websites. Well, I say bug, but really that’s it’s intended function since they think you don’t want any DNS at all when using port=0.
You can try his suggestion of
Sample implementation code, to be inserted before
if [ -x /sbin/resolvconf ]
: (in the file /etc/init.d/dnsmasq)grep -qr port=0 /etc/dnsmasq.d/ /etc/dnsmasq.conf && return
Which should check if port=0 is defined anywhere and if true will ignore the following part so it doesn’t alter your nameservers in resolvconf.
-
do you mean it like bellow:
override it just by configuration in /etc/dnsmasq.conf, it is necessary
to set IGNORE_RESOLVCONF=yes in /etc/default/dnsmasq.
grep -qr port=0 /etc/dnsmasq.d/ /etc/dnsmasq.conf && return
if [ ! “$RESOLV_CONF” ] &&
[ “$IGNORE_RESOLVCONF” != “yes” ] &&
[ -x /sbin/resolvconf ]if it is ok. must i edit another file too? The /etc/resolv.conf?
Is it now possible to use the externel dns resulution and the client boot?
-
@MaMu No, I don’t believe ignore_resolvconf works for this problem.
You have to edit the startup script of dnsmasq in /etc/init.d/dnsmasq
And change
start_resolvconf() { # If interface "lo" is explicitly disabled in /etc/default/dnsmasq # Then dnsmasq won't be providing local DNS, so don't add it to # the resolvconf server set. for interface in $DNSMASQ_EXCEPT do [ $interface = lo ] && return done if [ -x /sbin/resolvconf ] ; then echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo.$NAME fi return 0 }
To
start_resolvconf() { # If interface "lo" is explicitly disabled in /etc/default/dnsmasq # Then dnsmasq won't be providing local DNS, so don't add it to # the resolvconf server set. for interface in $DNSMASQ_EXCEPT do [ $interface = lo ] && return done grep -qr port=0 /etc/dnsmasq.d/ /etc/dnsmasq.conf && return if [ -x /sbin/resolvconf ] ; then echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo.$NAME fi return 0 }
-
thank you. this post solved my problem