6

I'm a bit new to version 14.04 of Ubuntu:
No LSB modules are available.

I am trying to set up a tftp server, mostly for backup up cisco ios configs. I have followed every tutorial I can, and I'm getting nowhere. The problem seems to be a timeout, waiting for the write request from the client side:

Before I try to transfer:

ps -aux | grep tftp
root      7804  0.0  0.0  15128   160 ?        Ss   10:48   0:00 /usr/sbin/in.tftpd --listen --user tftp --address 0.0.0.0:69 --secure -c -vv -i /var/lib/tftpboot

After I use my windows 7 tftp client to send a put request:

jarrod@Dangerfield:~$ ps -aux | grep tftp
root      7804  0.0  0.0  15128   160 ?        Ss   10:48   0:00 /usr/sbin/in.tftpd --listen --user tftp --address 0.0.0.0:69 --secure -c -vv -i /var/lib/tftpboot
tftp      8819  0.0  0.0  15132   632 ?        S    11:04   0:00 /usr/sbin/in.tftpd --listen --user tftp --address 0.0.0.0:69 --secure -c -vv -i /var/lib/tftpboot

You can see it open the second connection and then it just times out.

It then creates an empty file:

-rw-rw-rw- 1 tftp tftp 0 Apr 28 11:04 AcousticList.txt

in directory:

drwxrwxrwx 2 tftp tftp 4096 Apr 28 11:04 tftpboot

These are my defaults:

:/etc/default$ more tftpd-hpa
# /etc/default/tftpd-hpa

#RUN_DAEMON="yes"
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure -c -vv -i"

I have the -c for create files, secure for the one directory, -vv for verbose logging. I found the i option on one of the help files. Adding that did not help nor hurt. It always does the same thing.
UFW is disabled.

/etc/default$ sudo service ufw status
ufw stop/waiting

I can't see anything else that would be stopping this.

I kill -9 the root and tftp user processes. The root process starts again listening immediately. The tftp user process only starts when you initiate the tftp transfer. This is just using upstart. I have tried running it in stand alone with the same result.

in.tftpd[8897]: WRQ from 192.168.0.6 filename AcousticList.txt

I have tried running wireshark and sudo tcpdump -vvv -i eth0 | grep tftp

I'm not really getting any further than the write request is coming in, then there is a timeout on the client end.

If anyone could help me, I would really appreciate it as I am at a dead end.

Parto
  • 15,647
Jar_rod
  • 61
  • 1
  • 1
  • 2

3 Answers3

3

On this way work for me

Install following packages.

sudo apt-get install xinetd tftpd tftp

Create /etc/xinetd.d/tftp and put this entry

service tftp
{
protocol        = udp
port            = 69
socket_type     = dgram
wait            = yes
user            = nobody
server          = /usr/sbin/in.tftpd
server_args     = /tftpboot
disable         = no
}

Create a folder /tftpboot this should match whatever you gave in server_args. mostly it will be tftpboot

sudo mkdir /tftpboot
sudo chmod -R 777 /tftpboot
sudo chown -R nobody /tftpboot

Restart the xinetd service.

sudo /etc/init.d/xinetd restart
2707974
  • 10,758
3

i had the same problem. it is caused by windows firewall. after adding the tftp client, you also need to make sure it it is allowed on the firewall

go to Windows Firewall > allowed programs > allowed another program > find the tftp.exe at c:\windows\systems32\tftp.exe

storm
  • 5,013
Eric
  • 31
0

Check firewall status and disable it

$ sudo ufw disable
Firewall stopped and disabled on system startup

then restart xinetd service.

$ sudo /etc/init.d/xinetd restart

 * Stopping internet superserver  xinetd  [ OK ] 
 * Starting internet superserver xinetd   [ OK ] 
αғsнιη
  • 36,350