How to configure DHCP Proxy?



  • Hi everyone.
    I got lost in the configurations…
    I have ubuntu server 14.04 with fog installed on it.
    I can’t configure my DHCP server so the solution is to install DHCP Proxy.
    I tried to install dnsmasq and to everything that the wiki said but I’m doing something wrong.
    I want my dhcp server act as normal and only dhcp proxy request to answer by the dnsmasq (ubuntu server).
    I installed fog as a normal server, didn’t [FONT=sans-serif][COLOR=#000000]setup a DHCP router address or a DNS server address, [/COLOR][/FONT][FONT=sans-serif][COLOR=#000000]also didn’t use FOG as a DHCP server.[/COLOR][/FONT]
    [FONT=sans-serif][COLOR=#000000]what should I do next?[/COLOR][/FONT]
    [FONT=sans-serif][COLOR=#000000]thanks in advanced…[/COLOR][/FONT]



  • wow. I should be proud.


  • Moderator


  • Moderator

    This post is deleted!


  • Yeeeeeessssss!!!
    It’s finally working!!!

    I just did what TOM offered and it’s working!

    thanks a lot guys!


  • Moderator

    [quote=“Tom Elliott, post: 45628, member: 7271”]Change
    [code]port=0
    log-dhcp
    tftp-root=/tftpboot
    dhcp-boot=undionly.kpxe,10.0.0.210,10.0.0.210
    dhcp-option=17,/images
    dhcp-option=vendor:PXEClient,6,2b
    dhcp-no-override
    pxe-prompt=“Press F8 for boot menu”, 0
    pxe-service=X86PC, “Boot from network”, pxelinux
    pxe-service=X86PC, “Boot from local hard disk”, 0
    dhcp-range=10.0.0.210,proxy[/code]

    To:

    [code]port=0
    log-dhcp
    tftp-root=/tftpboot
    dhcp-boot=undionly.kpxe,10.0.0.210,10.0.0.210
    dhcp-option=17,/images
    dhcp-option=vendor:PXEClient,6,2b
    dhcp-no-override
    pxe-prompt=“Press F8 for boot menu”, 0
    pxe-service=X86PC, “Boot from network”, undionly.kpxe
    pxe-service=X86PC, “Boot from local hard disk”, 0
    dhcp-range=10.0.0.210,proxy[/code]

    Then make a copy of the undionly.kpxe to undionly.kpxe.0

    [code]sudo cp /tftpboot/undionly.kpxe /tftpboot/undionly.kpxe.0[/code][/quote]

    But, there are zero packets sent from the FOG machine that are even assigning the next-boot server or boot file…

    FOG sent two packets, both simply saying “File not found.” If dnsmasq were sending out additional IP configuration, we’d see a few more packets for DHCP, coming from FOG, Probably about 2 more packets.

    So, DHCP must be telling the client to use 10.0.0.210 and pxelinux.0


  • Moderator

    This post is deleted!

  • Developer

    [quote=“Amit Madmoni, post: 45626, member: 29386”]here is my ltsp.conf file:

    [CODE]port=0
    log-dhcp
    tftp-root=/tftpboot
    dhcp-boot=undionly.kpxe,10.0.0.210,10.0.0.210
    dhcp-option=17,/images
    dhcp-option=vendor:PXEClient,6,2b
    dhcp-no-override
    pxe-prompt=“Press F8 for boot menu”, 0
    pxe-service=X86PC, “Boot from network”, pxelinux
    pxe-service=X86PC, “Boot from local hard disk”, 0
    dhcp-range=10.0.0.210,proxy
    [/CODE]

    I dont have a network hub.
    again, I’m running the client under virtual box. does it matter?[/quote]

    Did you restart the service after inserting the LTSP.conf file?

    you need to successfully restart the service for your updated LTSP.conf file to be of any use to dnsmasq.


  • Senior Developer

    Change
    [code]port=0
    log-dhcp
    tftp-root=/tftpboot
    dhcp-boot=undionly.kpxe,10.0.0.210,10.0.0.210
    dhcp-option=17,/images
    dhcp-option=vendor:PXEClient,6,2b
    dhcp-no-override
    pxe-prompt=“Press F8 for boot menu”, 0
    pxe-service=X86PC, “Boot from network”, pxelinux
    pxe-service=X86PC, “Boot from local hard disk”, 0
    dhcp-range=10.0.0.210,proxy[/code]

    To:

    [code]port=0
    log-dhcp
    tftp-root=/tftpboot
    dhcp-boot=undionly.kpxe,10.0.0.210,10.0.0.210
    dhcp-option=17,/images
    dhcp-option=vendor:PXEClient,6,2b
    dhcp-no-override
    pxe-prompt=“Press F8 for boot menu”, 0
    pxe-service=X86PC, “Boot from network”, undionly.kpxe
    pxe-service=X86PC, “Boot from local hard disk”, 0
    dhcp-range=10.0.0.210,proxy[/code]

    Then make a copy of the undionly.kpxe to undionly.kpxe.0

    [code]sudo cp /tftpboot/undionly.kpxe /tftpboot/undionly.kpxe.0[/code]



  • here is my ltsp.conf file:

    [CODE]port=0
    log-dhcp
    tftp-root=/tftpboot
    dhcp-boot=undionly.kpxe,10.0.0.210,10.0.0.210
    dhcp-option=17,/images
    dhcp-option=vendor:PXEClient,6,2b
    dhcp-no-override
    pxe-prompt=“Press F8 for boot menu”, 0
    pxe-service=X86PC, “Boot from network”, pxelinux
    pxe-service=X86PC, “Boot from local hard disk”, 0
    dhcp-range=10.0.0.210,proxy
    [/CODE]

    I dont have a network hub.
    again, I’m running the client under virtual box. does it matter?


  • Moderator

    Also,

    I’m not seeing a packet sent from 10.0.0.210 telling the client to use undionly.0, or 10.0.0.210 as the next-server…

    If you look at the capture you posted, there are a total of TWO packets sent from the FOG server to the client.

    This might mean that the DHCP server is already handing out the boot-server and file name, options 066 and 067.

    Do you have a network hub? (not a switch)


  • Moderator

    The problem is that the client is asking for the wrong file.

    It’s asking for pxelinux.0 which is not only wrong, but according to your screenshot that file does not exist - for real.

    Re-examine ltsp.conf, make sure it’s giving either undionly.kpxe or undionly.0 and also restart the dnsmasq service and try again.



  • here is the pcap file:
    [url]https://copy.com/iH3hRuI7Xcb6dfnY[/url]

    I forgot to mention that the remote host is a vm, and the network interface configured as a bridge


  • Moderator

    What happens when you try to get undionly.kpxe through command line?

    You can use Windows, or a Linux live disk for this. There are examples for testing in the “Troubleshoot TFTP” page.
    Please post the output of it.

    If you are successful, please do a TCP dump next, and post the resulting file. Here are some general instructions:

    [CODE]sudo tcpdump -w issue.pcap -i eth0[/CODE]

    You might need to change the interface name in the above command, seems like I have never had an interface named eth0 in Linux… This command will list all available interfaces. Pick the right one.
    [CODE]ip link show[/CODE]

    Run the above capture command on the FOG machine, then start the remote target host. Wait till it fails, then stop tcpdump (ctrl+c), transfer the PCAP file to your PC and examine it using wireshark. After the capture is completed, please use the MAC address of the target host as the filter for sender & receiver. This address will filter out ALL traffic that isn’t coming from or going to the target client.

    Example Filter (change the MAC addresses):
    [CODE]eth.dst == 00:0C:CC:76:4E:07 || eth.src==00:0C:CC:76:4E:07[/CODE]

    Please also post this PCAP file so we can look at it and see what’s going on. And if you don’t filter the file for us, we will need the target host’s MAC as well so we can filter it.



  • output is attached.

    I edited the /etc/dnsmasq.d/ltsp.conf file. same error.

    [url="/_imported_xf_attachments/1/1875_ls -a output.PNG?:"]ls -a output.PNG[/url]


  • Moderator

    What’s the output of this:

    [CODE]ls -a /tftpboot[/CODE]

    and, try changing /etc/dnsmasq.d/ltsp.conf:

    this line:
    [FONT=Consolas]dhcp-boot=undionly.kpxe,10.0.0.210 [/FONT]
    [FONT=Consolas]to:[/FONT]
    [FONT=Consolas]dhcp-boot=undionly.kpxe,[/FONT][FONT=Consolas]10.0.0.210[/FONT][FONT=Consolas],10.0.0.210[/FONT]



  • everything is good according to the “Troubleshoot TFTP” guide.
    I also changed permissions.
    yet, can’t boot from ws.
    what should I do next?


  • Moderator

    Try restarting the service,

    and check your firewall.
    [CODE]sudo iptables -L[/CODE]



  • failed at first stage.
    I tried to telnet to port 69 on the server, but the port is closed.
    In the server I checked that the tftpd-hpa service is running.


  • Moderator

    Oh and also,

    You need to make a copy (or symbolic link) of undionly.kpxe as undionly.0

    This is a known issue with dnsmasq.


Log in to reply
 

361
Online

39.3k
Users

11.0k
Topics

104.4k
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.