Is it possible to manage a DHCP server that runs on a windows 2003 machine from linux? I have searched but can't find anything.

I am hoping to script something up in linux (whatever language), that would allow me to add/remove dhcp leases via command line in linux (ie: ./add-dhcp-lease.pl )

Anyone know if this is even possible?

| improve this question | | | | |

allow me to add/remove dhcp leases via command line in linux (ie: ./add-dhcp-lease.pl )

That pre-supposes that the MS dhcp server has some API or CLI interface itself. AFAIK, although it uses a JET DB to maintain the config, this is not intended to be accessible by other programs, and there is no published API. However the netsh command is a CLI tool available on MSWindows boxes for configuring the DHCP server. How you get the instructions from the Linux box to the MSWindows box is a different can of worms. Telnet is very insecure - but you could tunnel it over SSL (e.g. using stunnel at both ends).

It would be massively simpler to run a dhcpd on the linux box.

| improve this answer | | | | |
  • netsh and win32 APIs are the only ways I know of to remotely control Windows DHCP. – Michael Steele Apr 21 '11 at 20:00

Thank you all, I think my using a combination of winexe and netsh from a linux script I may be able to get this to work.

I know that RDP'ing and doing it by hand would be the preferred way, but I wanted some automation to make our lives easier.

I appreciate all of your time!


Oh, and I would love to be running dhcpd on a linux box, believe me, but I'm the only one who wants to, haha. ;/

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.