• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Ubuntu 14.04 LTS with dnsmasq no external DNS

    Scheduled Pinned Locked Moved Solved
    Linux Problems
    2
    9
    4.9k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      MaMu
      last edited by

      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_server

      My 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

      1 Reply Last reply Reply Quote 0
      • Q
        Quazz Moderator
        last edited by

        Did you modify the networkmanager.conf as well?

        1 Reply Last reply Reply Quote 0
        • M
          MaMu
          last edited by

          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

          1 Reply Last reply Reply Quote 0
          • Q
            Quazz Moderator @Guest
            last edited by

            @MaMu https://wiki.fogproject.org/wiki/index.php/Using_FOG_with_an_unmodifiable_DHCP_server/_Using_FOG_with_no_DHCP_server#Additional_Steps_for_12.04.4.2C_12.04.5.2C_14.04.2C_14.10

            1 Reply Last reply Reply Quote 0
            • M
              MaMu
              last edited by

              i have no file like /etc/NetworkManager/NetworkManager.conf
              also the service network-manager is not installed

              Q 1 Reply Last reply Reply Quote 0
              • Q
                Quazz Moderator @MaMu
                last edited by Quazz

                @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.

                1 Reply Last reply Reply Quote 0
                • M
                  MaMu
                  last edited by

                  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?

                  Q 1 Reply Last reply Reply Quote 0
                  • Q
                    Quazz Moderator @MaMu
                    last edited by

                    @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
                    }
                    
                    1 Reply Last reply Reply Quote 2
                    • M
                      MaMu
                      last edited by

                      thank you. this post solved my problem

                      1 Reply Last reply Reply Quote 1
                      • 1 / 1
                      • First post
                        Last post

                      199

                      Online

                      12.0k

                      Users

                      17.3k

                      Topics

                      155.2k

                      Posts
                      Copyright © 2012-2024 FOG Project