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

Install DNSMasq on Centos 7

Scheduled Pinned Locked Moved
Tutorials
2
7
24.0k
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.
  • G
    george1421 Moderator
    last edited by george1421 Oct 3, 2016, 8:14 PM Dec 21, 2015, 11:32 PM

    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
    • W
      Wayne Workman
      last edited by Wayne Workman Oct 12, 2016, 10:24 AM Jul 29, 2016, 10:52 PM

      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/

      G 1 Reply Last reply Jul 29, 2016, 11:24 PM Reply Quote 1
      • G
        george1421 Moderator @Wayne Workman
        last edited by Wayne Workman Oct 12, 2016, 10:24 AM Jul 29, 2016, 11:24 PM

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

        W 1 Reply Last reply Jul 29, 2016, 11:38 PM Reply Quote 0
        • W
          Wayne Workman @george1421
          last edited by Jul 29, 2016, 11:38 PM

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

          G 1 Reply Last reply Jul 30, 2016, 1:47 AM Reply Quote 1
          • G
            george1421 Moderator @Wayne Workman
            last edited by george1421 Jul 29, 2016, 7:48 PM Jul 30, 2016, 1:47 AM

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

            W 1 Reply Last reply Jul 30, 2016, 12:40 PM Reply Quote 0
            • W
              Wayne Workman @george1421
              last edited by Jul 30, 2016, 12:40 PM

              @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
              • W
                Wayne Workman
                last edited by Wayne Workman Oct 12, 2016, 10:25 AM Oct 12, 2016, 4:24 PM

                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

                198

                Online

                12.1k

                Users

                17.3k

                Topics

                155.4k

                Posts
                Copyright © 2012-2024 FOG Project