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

    Solved Changing IP's on a portable FOG Server

    FOG Problems
    4
    12
    309
    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.
    • C
      Critchleyb last edited by

      Hello,

      I’m trying to Create a Portable FOG server on a laptop that I plan to send around to different areas of the business to deploy a new image to each of them.

      Each Site uses a different scope of internal IP. I saw that when I was setting up the server, it asked me which IP it would be using. So if I were to allow the servers IP to be determined by DHCP, are there settings on the server itself that would need to be changed in order for the server to work.

      I’m aware that the DHCP Options would need to be pointed at whatever the servers assigned IP is, but i doubt its going to be as simple as just changing those settings.

      Thanks!

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator last edited by Sebastian Roth

        @Critchleyb Yeah it’s not as simple as pushing a new IP to your FOG server via DHCP. But thanks to Wayne we have a script available that does the Job for you. See if that is enough for your scenario: https://github.com/FOGProject/fog-community-scripts/tree/master/updateIP

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 2
        • C
          Critchleyb @Sebastian Roth last edited by

          @Sebastian-Roth Yes, its working perfectly now, Thanks!

          1 Reply Last reply Reply Quote 0
          • S
            Sebastian Roth Moderator last edited by

            @Critchleyb So is it working properly now?

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            C 1 Reply Last reply Reply Quote 1
            • C
              Critchleyb @Critchleyb last edited by

              @george1421 Scratch that, i forgot to take out the < > symbols, derp…

              1 Reply Last reply Reply Quote 1
              • C
                Critchleyb @george1421 last edited by

                @george1421 Hey, Thanks for that.

                I’m unfortunately getting an error when I try and start the dnsmasq service with an error on line 38:

                dnsmasq: bad dhcp-range at Line 38 of /etc/dnsmasq.d/ltsp.conf
                
                C 1 Reply Last reply Reply Quote 0
                • george1421
                  george1421 Moderator @Critchleyb last edited by george1421

                  @Critchleyb said in Changing IP's on a portable FOG Server:

                  Is DNSmasq capable of pointing network booting at the server without editing any dhcp options on the router where it will be running?

                  Yes ^^

                  The quick steps are:
                  Install dnsmasq from your linux distro’s repo.

                  Use this config file. Save in it in /etc/dnsmasq.d as ltsp.conf

                  # 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
                  
                  # inspect the vendor class string and match the text to set the tag
                  dhcp-vendorclass=BIOS,PXEClient:Arch:00000
                  dhcp-vendorclass=UEFI32,PXEClient:Arch:00006
                  dhcp-vendorclass=UEFI,PXEClient:Arch:00007
                  dhcp-vendorclass=UEFI64,PXEClient:Arch:00009
                  
                  # Set the boot file name based on the matching tag from the vendor class (above)
                  dhcp-boot=net:UEFI32,i386-efi/ipxe.efi,,<fog_server_IP>
                  dhcp-boot=net:UEFI,ipxe.efi,,<fog_server_IP>
                  dhcp-boot=net:UEFI64,ipxe.efi,,<fog_server_IP>
                  
                  # 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.kpxe
                  pxe-service=X86-64_EFI, "Boot to FOG UEFI", ipxe.efi
                  pxe-service=BC_EFI, "Boot to FOG UEFI PXE-BC", ipxe.efi
                  
                  dhcp-range=<fog_server_ip>,proxy
                  

                  Use the config file exactly. Replace <fog_server_ip> completely with the current IP address of your fog server.

                  Run these commands from your fog server linux console

                  sudo systemctl enable dnsmasq
                  sudo systemctl start dnsmasq
                  

                  Depending on your linux distro dnsmasq may be called dnsmasqd.

                  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!

                  C 1 Reply Last reply Reply Quote 1
                  • C
                    Critchleyb @george1421 last edited by

                    @george1421 Hey, Is there anywhere I can find some documentation on how to implement DNSmasq? I’ve not heard of it before and the aim is to not have to change any of the sites current services, like dhcp etc. Is DNSmasq capable of pointing network booting at the server without editing any dhcp options on the router where it will be running?

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

                      @george1421 The makeFogMobile script does update dnsmasq, but the updateIP script does not.

                      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
                      • george1421
                        george1421 Moderator last edited by

                        You will probably want to install dnsmasq on your mobile fog server. That way when you bring up your fog server, the network booting will also be instructed to use your fog server for the boot files. When you power off your fog server then nothing will be left behind to point to your fog server for network booting.

                        Wayne’s excellent script also manages the IP address changes in the dnsmasq configuration files 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!

                        Wayne Workman C 2 Replies Last reply Reply Quote 0
                        • S
                          Sebastian Roth Moderator last edited by

                          @Critchleyb said in Changing IP's on a portable FOG Server:

                          I see it mentions DHCP, however I’m not using fog to run DHCP, will there be any issues there?

                          Nope, won’t be an issue as long as you have your “external” DHCP setup correctly.

                          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                          1 Reply Last reply Reply Quote 2
                          • C
                            Critchleyb last edited by

                            @Sebastian-Roth Thanks! I’ll give it a try. I see it mentions DHCP, however I’m not using fog to run DHCP, will there be any issues there?

                            I’ve also found the documentation on changing fogs IP here: https://wiki.fogproject.org/wiki/index.php/Change_FOG_Server_IP_Address

                            Hopefully between them I should be good to go!

                            1 Reply Last reply Reply Quote 0
                            • S
                              Sebastian Roth Moderator last edited by Sebastian Roth

                              @Critchleyb Yeah it’s not as simple as pushing a new IP to your FOG server via DHCP. But thanks to Wayne we have a script available that does the Job for you. See if that is enough for your scenario: https://github.com/FOGProject/fog-community-scripts/tree/master/updateIP

                              Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                              Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

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

                              187
                              Online

                              10.4k
                              Users

                              16.4k
                              Topics

                              150.6k
                              Posts

                              Copyright © 2012-2023 FOG Project