2

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.

1
  • 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, 2009 at 19:11

3 Answers 3

7

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.

3

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.

1
  • 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, 2009 at 19:09
0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .