Friday, July 26, 2013

Enable TFTP server

RHEL (Red Hat Enterprise Linux) 5.3 based MDCs (Meda Data Controllers)

(from RHEL 5 documentation)

The TFTP config file should already be configured as follows (disables = no, server_args = <path>):

#CODE
[root@sbf ~]# vim /etc/xinetd.d/tftp

#
# File /etc/xinetd.d/tftp
#
service tftp
{
...
...
       server_args             = -s /tftpboot
       disable                 = no
}

You must then restart xinetd for the new configuration to take effect:

[root@sbf ~]# chkconfig tftp on
[root@sbf ~]# service xinetd restart

To check if it is functioning (listening on the default port) use netstat:

#CODE
[root@sbf ~]# netstat -nulp | grep 69
udp        0      0 0.0.0.0:69                  0.0.0.0:*                               22418/xinetd        
udp        0      0 0.0.0.0:69                  0.0.0.0:*                               22379/in.tftpd

To turn it back off:

#CODE
[root@sbf ~]# chkconfig tftp off
[root@sbf ~]# service xinetd restart

To get files from the server using command line (Mac/Linux):

#CODE
[user@client ~]$ tftp 10.0.0.2
tftp> get testFile.txt

No comments:

Post a Comment