Troubleshoot TFTP

From FOG Project
Jump to: navigation, search

Testing TFTP

Try to get the file with Linux:

[root@MB-FOG ~]# tftp -v x.x.x.x -c get undionly.kpxe
Connected to x.x.x.x (x.x.x.x), port 69
getting from 10.2.1.11:undionly.kpxe to undionly.kpxe [netascii]
Received 89509 bytes in 0.0 seconds [84047115 bit/s]
quit

Try to get the file with Windows:

tftp x.x.x.x get undionly.kpxe


TFTP Service

Fedora 20/21

Newer systems:

status/enable/restart

systemctl status xinetd.service
systemctl enable xinetd.service
systemctl restart xinetd.service

Ubuntu

newer systems:

status/enable/restart

sudo service xinetd status
sudo service xinetd restart
sudo service xinetd enable

older systems:

status/enable/restart

sudo /etc/init.d/xinetd status
sudo /etc/init.d/xinetd restart
sudo /etc/init.d/xinetd enable


Troubleshooting TFTP

To test from windows, TFTP Client must be installed and the Firewall must allow TFTP Traffic.

Control Panel -> Programs and Features -> Turn Windows Features on or off -> TFTP Client

TFTP Client in Windows.png




Checking/verifying Firewall

Disable & Stop Firewall in Fedora 20/21

systemctl disable firewalld.service
systemctl stop firewalld.service

Can be undone with "start" and "enable".

Check Firewall in Fedora 20/21

systemctl status firewalld.service

Fedora 16

Add /bin/bash to /etc/shells as the vsftpd yum install does not do it correctly causing tftp timeout message


Check Firewall in Debian/Ubuntu

sudo iptables -L

If disabled, the output should look like this:

Chain INPUT (policy ACCEPT)
target prot opt source destination 

Chain FORWARD (policy ACCEPT)
target prot opt source destination 

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Disable Ubuntu Firewall

sudo ufw disable

Disable Debian Firewall

iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT

Temporarily disable Windows firewall

TFTP Windows Firewall.png


Permissions

Check permissions on /tftpboot directory by using:

ls -ld /tftpboot

Check permissions on files in /tftpboot directory by using:

ls -ld /tftpboot/*.*

Set permissions to allow everyone full access to /tftpboot and all contents:

chmod -R 777 /tftpboot

See example permissions below:

TFTP Permissions.png