Tuesday, 2 December 2008

Running tftpd as a service on a windows machine

I'm using jounin's tftpd32 (download from here: http://tftpd32.jounin.net/ ) for netbooting stations in places that I don't have UNIX servers, and found this tool very usefull.

Here is my instructions for making it a Windows Service using MS instsrv.exe and srvany.exe from Windows 2000 Resource Kit.

* Download tftpd
* Install tftpd on your system, I installed it on C:\Program Files\tftpd , and my explanation will be using this dir.
* Get the files instsrv.exe and srvany.exe from the Resource Kit and copy them to a directory on your system (I copied them to C:\Tools)
* Open a cmd (Start -> Run -> cmd) and do the followings:
o c:
o cd \Tools
o instsrv tftpd c:\Tools\srvany.exe
* Open the registry (Start -> Run -> regedt32)
* Under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\tftpd : create a 'Parameters' key
* Under the above key, create a new 'String Value' with the name 'Application' of type REG_SZ and specify there C:\Program Files\tftpd\tftpd32.exe
* Close your running tftpd32 (if you have one) and check with netstat -a that nothing is listenning on UDP tftpd port (69)
* Goto services (left click on "My Computer" -> Manage -> Services and Applications -> Services) and start the tftpd service.
* Check now with netstat -a that there is a sevice that listen on UDP tftpd port, the output should look like this (the important line is the last):
Windows CMD

C:\Program Files\tftpd>netstat -a

Active Connections

Proto Local Address Foreign Address State
TCP localhost:epmap localhost:0 LISTENING
TCP localhost:microsoft-ds localhost:0 LISTENING
UDP localhost:bootps *:*
UDP localhost:tftp *:*

* That's it !

No comments:

Post a Comment