Monday, October 05, 2009

set up tftp

I got some troubles when setting up the tftp server, here is a note:
install packages: (if in ubuntu)

sudo apt-get install xinetd tftpd tftp

create file: /etc/xinetd.d/tftp with following lines inside:

service tftp
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -p /tftpboot
per_source = 11
cps = 100 2
flags = IPv4

Use TAB space before every line. In the line ‘server-args = –p /tftpboot’, it works with Fedora. When using ubuntu, you have to remove ‘-p’ from my experience.

create a directory
named ‘/tftpboot’
start tftp with:

sudo /etc/init.d/xinetd restart

Test from local machine, if you have a abc.txt file in your current directory and an xxx.txt file in your /tftpboot directory:

put abc.txt
get xxx.txt

try the same test from another machine.
If tftp is still not working, try to disable "Firewall" and "SELinux" (use command 'getenforce' to check current status of SELinux).

No comments:

Post a Comment