Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a tftp server running in fedora platform.

And from tftp client i tried to connect to the tftp-server on port:69 and tried to get a file from server.

After read request from client the server port is changed to random.

Is there any possibility to run the tftp-server on a defined port (Example: 5800) only?

Note : TFTP Client wrote in C program.

share|improve this question
    
does the client accept instructions that it connect on a different port? How hard would it be to update the client to use a different port? Changing the server's port is trivial -- it typically runs out of inetd/xinetd and can be told to start on any port you want. –  chris Jul 2 '09 at 19:11

3 Answers 3

up vote 6 down vote accepted

No, tftp is fixed to run on port 69. You cannot change this. Well, you can as most server allows you to change the port, but the client especially the ones embedded in hardware will ask tftp on port 69.

If you really want that you must use iptables to redirect traffic from 69 to your arbitrary chosen one.

share|improve this answer

TFTP uses port 69 for control link (send read/write request), and the the server will send data back from a freshly allocated port.

If you want this port to be a static one, you may have to modify the tftp server's source code.

share|improve this answer

Most tftpd servers run via inetd, so the port will be configured there. Depending on whether you use inetd or xinetd, the configuration will be /etc/inetd.conf or /etc/xinetd/ respecively.

share|improve this answer
    
The trick is getting the client to connect to the tftp server on the non-standard port. It's either trivial or really really hard, depending on the level of stupidity of the client. –  chris Jul 2 '09 at 19:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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