Change DHCP server from fog server to home router.
- FOG Version:
- OS: 14.04
- Service Version:
I have setup this fog server 1.3.4 on Ubuntu 14.04 at home and its working very great. But to my disappointing I found out that I had setup the fog server to be DHCP and all the, iphones, ipad´s and laptops that we have at home didnt go to internet.
The solution for now is that I have stopped the DHCP service on FOG, but then I cant deploy an image to a laptop because it cant get a ip adresse anymore and stops.
Hope it make sense and someone can give me a workaround on how I can solve this.
Im not that great at Linux, so I need firmly guide on how to.
Best regards Soeren
@Skosvin Just for clarity you installed dnsmasq on your FOG server, used the configuration file as I posted, then commented out the
port=0as Wayne posted?
I’m just trying to close the loop here in case someone else has the same issue as you in the future.
Thanks everyone for helping me. Everything is working as it should.
But then I dont have any internet on the server
port=0line is known to cause that.
@Skosvin Is your FOG server at a static address?
I’ll tell you that it is easier to chat quick using direct messaging. Look for the little talk bubble on the FOG Forum tool bar. We can fix this quickly.
@george1421 Thanks for the help. It worked. But then I dont have any internet on the server, but is just fine and I can live with that.
Great support from all of you.
@Skosvin You can make a backup if you want, you are just installing dnsmasq from your distribution’s package server.
Then installing the config file. Its not that hard. But if you are concerned, then please yes make a backup. It is good IT practices anyway. So great job.
@george1421 My goal is to learn more about this, because my former coworker made this setup on the workplace to deploy images on computers. So not to screw things up at work I am starting here.
My router ISP router hands also DHCP out.
I will give this a try but make a backup first maybe.
@Skosvin I would have to ask you what is your goal here since this is a home network.
I can say for my home network, I left the ISP router as the device that hands out the IP addresses. My home FOG server runs on a Raspberry Pi and also runs the dnsmasq function since my home router is an old Linksys WRT54. I know I could run ddwrt on it and gain a bunch of functionality, but it works so I don’t have the motivation to change it.
With that said if you want to run dnsmasq in dhcpProxy mode (only adds the pxe boot stuff) it is pretty easy to setup.
- For your distribution install dnsmasq (its part of almost every linux distribution) on your FOG server.
- Create the file /etc/dnsmasq.d/ltsp.conf and paste the following into that file. Don’t forget to change the IP address
192.168.112.24to match the static IP address of your fog server.
# 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 # 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 # The boot filename, Server name, Server Ip Address dhcp-boot=undionly.kpxe,,192.168.112.24 # 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 dhcp-range=192.168.112.24,proxy
- Remove any additional configuration files in /etc/dnsmasq.d
- Restart dnsmasq process with either
service dnsmasq restartor
systemctl restart dnsmasqdepending on your OS.
- PXE boot your target system. Dnsmasq will supply the boot server (fog IP) and the boot file (undionly.kpxe) to the target computer.
Understand this only works for legacy (bios) systems. If you have a uefi system you will need to change the boot file name to ipxe.efi. If you want to pxe boot both bios (legacy) and uefi systems then you will need to compile the latest version of dnsmasq. There is a tutorial for that too.
@Skosvin You need to pick a path first. If fog is in your home permanently, I’d suggest having the fog server do DHCP. If it’s just temporary, I’d suggest dnsmasq.
Or, you could build-out a box just for dhcp in your house. A raspberry pi can do this, they are about 40 bucks. An old tower would do it too, an old Pentium 3 would serve DHCP like a boss.
At my house, I have a server that runs some VMs. One of the VMs just does DHCP, nothing else.
Do you have a link or a guide on how to. It sounds a bit complicated, but maybe its not.
You have a few options here.
You need to update your dhcp settings on your fog server, probably to include your default router. Most likely the fog dhcp default configuration doesn’t include your ISP router in its settings. (Just a guess since I don’t use the fog dhcp server).
You can enable dnsmasq on your fog server to turn on dhcpProxy support. In this mode you continue to use your ISP router dhcp server, and then setup dnsmasq to supply the missing settings to allow pxe booting. (this is how I have fog setup at my home).