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

How to setup ProxyDHCP with FOG

Scheduled Pinned Locked Moved Solved
FOG Problems
2
4
974
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.
  • W
    wildcat2083
    last edited by wildcat2083 Jul 23, 2023, 1:36 PM Jul 23, 2023, 7:34 PM

    As the title Implies, I want to get proxyDHCP working instead of having FOG host my DHCP as my setup can’t be altered, I tried following the wiki page to setup dnsmasq for proxyDHCP, however with ubuntu 22.04 the dnsmasq fails to load after fog has been installed, is their any other newer information to follow to set this up

    my IP 192.168.5.0/24 Network
    192.168.5.1 <<< Router / DHCP
    192.168.5.214 <<< FOG server
    192.168.5.5 <<< DNS1 Server
    192.168.5.50 <<< DNS2 Server / NAS / SMB

    I know the line will essentially point to whatever device is hosting the fog server >>> dhcp-range=x.x.x.x,proxy

    here is the page I used for reference

    https://wiki.fogproject.org/wiki/index.php/Using_FOG_with_an_unmodifiable_DHCP_server/_Using_FOG_with_no_DHCP_server?ref=thson.de

    G 1 Reply Last reply Jul 23, 2023, 7:42 PM Reply Quote 0
    • W
      wildcat2083 @george1421
      last edited by Jul 23, 2023, 7:49 PM

      @george1421

      Awesome I will take a look at that and get back to you, that very well may be as I was testing and changed the installer options a few times, ill re-run the basic install without DHCP and re-try the steps

      1 Reply Last reply Reply Quote 0
      • G
        george1421 Moderator @wildcat2083
        last edited by Jul 23, 2023, 7:42 PM

        @wildcat2083 You need to ensure that there isn’t a dhcp server already running on your fog server.

        ensure that dnsmasq is not
        systemctl stop dnsmasq

        now check to see if something is bound to the dhcp port
        netstat -an | grep :67

        If you see a response like 0.0.0.0:67 then there is still a dhcp server on the fog server.

        You can also run this command to see if the isc-dhcp server is in memory. ps aux | grep dhcp If it returns isc-dhcp and a process ID then its still running.

        My bet if you look at the log file in /var/log/syslog (or /var/log/messages) it will say that dnsmasq can’t bind to the port :67

        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 2 Replies Last reply Jul 23, 2023, 7:49 PM Reply Quote 0
        • W
          wildcat2083 @george1421
          last edited by Jul 23, 2023, 7:49 PM

          @george1421

          Awesome I will take a look at that and get back to you, that very well may be as I was testing and changed the installer options a few times, ill re-run the basic install without DHCP and re-try the steps

          1 Reply Last reply Reply Quote 0
          • W
            wildcat2083 @george1421
            last edited by wildcat2083 Jul 23, 2023, 3:17 PM Jul 23, 2023, 8:31 PM

            @george1421 said in How to setup ProxyDHCP with FOG:

            @wildcat2083 You need to ensure that there isn’t a dhcp server already running on your fog server.

            ensure that dnsmasq is not
            systemctl stop dnsmasq

            now check to see if something is bound to the dhcp port
            netstat -an | grep :67

            If you see a response like 0.0.0.0:67 then there is still a dhcp server on the fog server.

            You can also run this command to see if the isc-dhcp server is in memory. ps aux | grep dhcp If it returns isc-dhcp and a process ID then its still running.

            My bet if you look at the log file in /var/log/syslog (or /var/log/messages) it will say that dnsmasq can’t bind to the port :67


            Here is the output of ps aux | grep dhcp
            kristal 110299 0.0 0.0 17732 2408 pts/0 S+ 15:27 0:00 grep --color=auto dhcp

            and its telling me

            Starting dnsmasq - A lightweight DHCP and caching DNS server…
            Jul 23 15:22:49 kristal-virtual-fog dnsmasq[109913]: dnsmasq: failed to create listening socket for port 53: Address already in use
            Jul 23 15:22:49 kristal-virtual-fog dnsmasq[109913]: failed to create listening socket for port 53: Address already in use
            Jul 23 15:22:49 kristal-virtual-fog dnsmasq[109913]: FAILED to start up
            Jul 23 15:22:49 kristal-virtual-fog systemd[1]: dnsmasq.service: Control process exited, code=exited, status=2/INVALIDARGUMENT
            Jul 23 15:22:49 kristal-virtual-fog systemd[1]: dnsmasq.service: Failed with result ‘exit-code’.
            Jul 23 15:22:49 kristal-virtual-fog systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.

            kristal@kristal-virtual-fog:/etc/init.d$ netstat -an | grep :67
            udp 0 0 192.168.5.214:68 192.168.5.1:67 ESTABLISHED
            kristal@kristal-virtual-fog:/etc/init.d$

            That ^^^^^^^ is then i install dnsmasq via apt install

            EDIT::: I got dnsmasq installed but when i try to boot with a vmware pxe, the dhcp works but then when it gets to tftp it cant find the file and im never greeted with the boot menu

            9d5799a9-118f-4b12-aca4-1bb4306debf3-image.png

            EDIT2:
            After tinkering I learned I needed to follow this section
            DNSMASQ settings for iPXE
            This information pertains to FOG 0.33 and the new iPXE boot method.

            In order to continue to use dnsmasq to dole out ip addresses and to help find the boot file, some changes need to be made to force the boot file to load the iPXE boot file.

            FIRST Update the schema by navigating to your fog management page and install the update.

            Make the following changes to your ltsp.conf file

            and I had to do this line
            cd /tftpboot
            sudo ln -s undionly.kpxe undionly.0

            Once I performed these and restarted the dnsmasq service, dhcp worked as proxy and it did indeed serve up the proper file allowing fog to proceed

            1 Reply Last reply Reply Quote 0
            • [[undefined-on, W wildcat2083, Jul 23, 2023, 9:18 PM]]
            • 1 / 1
            1 / 1
            • First post
              4/4
              Last post

            215

            Online

            12.1k

            Users

            17.3k

            Topics

            155.3k

            Posts
            Copyright © 2012-2024 FOG Project