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

    Install DNSMasq on Centos 7

    Scheduled Pinned Locked Moved
    Tutorials
    2
    7
    23.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.
    • george1421G
      george1421 Moderator
      last edited by george1421

      Setting up DNSMasq on Centos 7 is pretty straight forward and can be done in about 10 minutes.

      Use case(s):

      1. You don’t have administrative access to the dhcp server for your subnet/network (such as an ISP run router)
      2. Your dhcp server is a basic one like what you might find if you use a home class internet router.

      Here are the steps needed to setup dnsmasq on your FOG server running under Centos 7

      1. Ensure that Centos is up to date
        yum upgrade -y
      2. Install the service
        yum install dnsmasq -y
      3. Create a config file for your FOG server
        vi /etc/dnsmasq.d/ltsp.conf
        (hint: I’m old school and use vi exclusively, you may use what ever editor you choose)
      4. Paste in the following settings
      # Don't function as a DNS server:
      port=0
      
      # Log lots of extra information about DHCP transactions.
      log-dhcp
      
      # Set the root directory for files available via FTP.
      tftp-root=/tftpboot
      
      # The boot filename, Server name, Server Ip Address
      dhcp-boot=undionly.kpxe,,<fog_server_IP>
      
      # Disable re-use of the DHCP servername and filename fields as extra
      # option space. That's to avoid confusing some old or broken DHCP clients.
      dhcp-no-override
      
      # PXE menu.  The first part is the text displayed to the user.  The second is the timeout, in seconds.
      pxe-prompt="Booting FOG Client", 1
      
      # The known types are x86PC, PC98, IA64_EFI, Alpha, Arc_x86,
      # Intel_Lean_Client, IA32_EFI, BC_EFI, Xscale_EFI and X86-64_EFI
      # This option is first and will be the default if there is no input from the user.
      pxe-service=X86PC, "Boot to FOG", undionly
      pxe-service=X86-64_EFI, "Boot to FOG UEFI", ipxe
      pxe-service=BC_EFI, "Boot to FOG UEFI PXE-BC", ipxe
      
      dhcp-range=<fog_server_ip>,proxy
      

      The above values are for BIOS booting via PXE. As of the date of this post, dnsmasq does not support the uefi menu or uefi booting. So for now dnsmasq and uefi are not compatible (as of May16 the devs of dnsmasq have released their first attempt an supporting uefi firmware. I can see great things coming from this).
      You must update the <fog_server_ip> values with the exact IP address of your FOG server.
      5) Create the needed .0 files. By creating a link each time the undionly file is updated the .0 file will remain current.
      ln -s /tftpboot/undionly.kpxe /tftpboot/undionly.0
      ln -s /tftpboot/ipxe.efi /tftpboot/ipxe.0
      6) Restart the dnsmasq service
      systemctl restart dnsmasq.service
      7) Then ensure dnsmasq service starts on each boot.
      systemctl enable dnsmasq.service

      For the copy and paste people like me here is the concise version.

      yum upgrade -y
      yum install dnsmasq -y
      vi /etc/dnsmasq.d/ltsp.conf
      <insert text>
      <update settings in text>
      ln -s /tftpboot/undionly.kpxe /tftpboot/undionly.0
      ln -s /tftpboot/ipxe.efi /tftpboot/ipxe.0
      
      systemctl restart  dnsmasq.service
      systemctl enable dnsmasq.service
      

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

      1 Reply Last reply Reply Quote 2
      • Wayne WorkmanW
        Wayne Workman
        last edited by Wayne Workman

        wiki worthy

        I’m working on a new dnsmasq article, it’s nice not to have to look up everything. This is nice and short too.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
        Daily Clean Installation Results:
        https://fogtesting.fogproject.us/
        FOG Reporting:
        https://fog-external-reporting-results.fogproject.us/

        george1421G 1 Reply Last reply Reply Quote 1
        • george1421G
          george1421 Moderator @Wayne Workman
          last edited by Wayne Workman

          @Wayne-Workman said in Install DNSMasq on Centos 7:

          wiki worthy

          … This is nice and short too.

          Are you implying I can be a bit wordy in my posts?

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

          Wayne WorkmanW 1 Reply Last reply Reply Quote 0
          • Wayne WorkmanW
            Wayne Workman @george1421
            last edited by

            @george1421 Yes, you are a wordy son of a gun.

            But, if you look at the existing wiki article about dnsmasq, it’s sort of a disaster - and epically long.

            https://wiki.fogproject.org/wiki/index.php?title=Using_FOG_with_an_unmodifiable_DHCP_server/_Using_FOG_with_no_DHCP_server

            The length alone is a turn-off.

            I think this is why my Troubleshoot TFTP article isn’t so popular. Too long.

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
            Daily Clean Installation Results:
            https://fogtesting.fogproject.us/
            FOG Reporting:
            https://fog-external-reporting-results.fogproject.us/

            george1421G 1 Reply Last reply Reply Quote 1
            • george1421G
              george1421 Moderator @Wayne Workman
              last edited by george1421

              @Wayne-Workman

              So do you think you need two wiki pages? One would be the theory and details behind dnsmasq (such as the current wiki page [that is titled a bit complex]) and then a short one (akin to this tutorial. click this, edit that, paste this, start it up. For the ones who don’t care why it works, they just want something [anything] to work so they can get on with their life).

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

              Wayne WorkmanW 1 Reply Last reply Reply Quote 0
              • Wayne WorkmanW
                Wayne Workman @george1421
                last edited by

                @george1421 Yeah, I can go with that.

                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                Daily Clean Installation Results:
                https://fogtesting.fogproject.us/
                FOG Reporting:
                https://fog-external-reporting-results.fogproject.us/

                1 Reply Last reply Reply Quote 0
                • Wayne WorkmanW
                  Wayne Workman
                  last edited by Wayne Workman

                  This has been added to the wiki here:

                  Link

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                  Daily Clean Installation Results:
                  https://fogtesting.fogproject.us/
                  FOG Reporting:
                  https://fog-external-reporting-results.fogproject.us/

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

                  177

                  Online

                  12.0k

                  Users

                  17.3k

                  Topics

                  155.2k

                  Posts
                  Copyright © 2012-2024 FOG Project