Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot get dhcp leases... #2

Open
pieroproietti opened this issue Sep 7, 2022 · 6 comments
Open

cannot get dhcp leases... #2

pieroproietti opened this issue Sep 7, 2022 · 6 comments
Assignees

Comments

@pieroproietti
Copy link

I tried a bit your pxe-server, but I can't get dhcp release. To have a nice nodejs dhcp server is my old dream, I used years ago node-dhcp from infusion, but I had problems understanding dhcp proxy. I want a little tool who can work in a preexistent LAN.

Actually I have something running with dnsmasq, can be good enoughe, but in this way I need to install that package.

My idea is to made isos in same way autoserving on a LAN - I'm author of a remastering tools called penguins-eggs - and if it is possible to use nodejs for dhcp-proxy - will be possible to boot iso images from one computer and install them in another on the LAN,

Anyway I want to ask you if this repo in again active and if you are using it. Thanx a lot for your efforts

@Ara225
Copy link
Owner

Ara225 commented Sep 7, 2022

Hmm, intresting. Haven't used it in a while but glad to hear someone else is intrested. Love a good problem more than happy to work through this one if you want . Some questions spring to mind

  • is there another DHCP server on the preexisting lan?
  • could the server have a firewall preventing the DHCP serving on that lan ?
  • Could I see the configuration file you're using?
  • what happens when you try to PXE boot the client?
  • brief description of the setup of, connections etc

@Ara225 Ara225 self-assigned this Sep 7, 2022
@pieroproietti
Copy link
Author

pieroproietti commented Sep 8, 2022

  • I'm using your pxe - a bit changed just in the options (just I neet to autoconfigure it) - on VMs inside a Proxmox VE installation.;
  • Yes, I have already a dhcp server - the common ADSL router from where I'm connected. No firewall at all beetwen VMs, the VMs are just the same net;
  • this is my actual configuration:
{
  "apiEnabled": true,
  "configurePxeLinux": true,
  "tftpOptions": {
    "host": "192.168.1.17",
    "port": 69,
    "root": "/home/eggs/pxe/firmware",
    "denyPUT": true
  },
  "dhcpOptions": {
    "range": [
      "192.168.1.2",
      "192.168.1.254"
    ],
    "randomIP": true,
    "netmask": "24",
    "router": [
      "192.168.1.1"
    ],
    "dns": [
      "8.8.8.8",
      "8.8.4.4"
    ],
    "broadcast": "192.168.1.255",
    "server": "192.168.1.17",
    "bootFile": "firmware/lpxelinux.0",
    "tftpServer": "192.168.1.17"
  },
  "apiOptions": {
    "host": "192.168.1.17",
    "port": 3030
  },
  "pxeLinuxOptions": {
    "location": "/home/eggs/pxe/firmware/pxelinux.cfg",
    "configs": {
      "default": {
        "header": {
          "DEFAULT": "menu.c32",
          "PROMPT": 0,
          "MENU TITLE": "Cuckoo Boot Menu",
          "TIMEOUT": 150,
          "TOTALTIMEOUT": 900
        },
        "bootOptions": [
          {
            "label": "Localboot",
            "menu label": "",
            "action": "localboot -1",
            "file": ""
          },
          {
            "label": "WindowsPE",
            "menu label": "Windows PE",
            "action": "kernel pxeboot.0 keeppxe",
            "file": "pxeboot.0"
          }
        ]
      }
    }
  },
  "bindHost": "192.168.1.17"
}

Screenshot

the VM take the address from the ADSL router, but if I will disconnect it, can't get dhcp from PXE server.

The same two VMs, but running dhcp proxy and tftp from dnsmaq, work.

netboot

@Ara225
Copy link
Owner

Ara225 commented Sep 8, 2022

Hmm, setup makes sense, I skew to something stupid in plain sight like selinux, firewall, my code being crappy, or the hosts not being able to route to eachotherwithout the router. Setting the dhcp options on the router to forward to the pxe or maybe an internal only network and a full blown dhcpd server I'll have a run of it later and en sure it works

@pieroproietti
Copy link
Author

Don't worry about your code, in any case it is the only one I found, so it's OK!

I tried disabling SELINUX, sudo nano /etc/selinux/semanage.conf adding selinux=disabled but nothing seems to change.

@Ara225
Copy link
Owner

Ara225 commented Sep 8, 2022

Still the problem annoys me. Try stripping out the pxe Linux options just in case they are breaking it, that bits not as well tested

@pieroproietti
Copy link
Author

I used for eggs dnsmasq, acting as dhcp or proxy-dhcp, tftp and using node as http server. It's working, both bios and uefi autoconfiguring all parameters. Anway I want to retray your code now who I'm a little more expert and fresh on that argument. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants