LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 09-17-2013, 03:33 PM   #1
ccc
Member
 
Registered: Oct 2002
Posts: 76

Rep: Reputation: 0
setup tftpd server on Wheezy


hi

How to setup tftpd server on Wheezy?

I've installed tftpd-hpa, added in /etc/inetd.conf the following line:
Code:
tftp  dgram  udp  wait  nobody /usr/sbin/tcpd /usr/sbin/in.tftpd  /tftpboot
and I have these entries in /etc/default/tftpd-hpa:
Code:
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/tftpboot"
TFTP_ADDRESS="192.168.1.245:69"
TFTP_OPTIONS="--secure"
Code:
# chmod -R 777 /tftpboot
# chown -R nobody /tftpboot
but still doesn't work.

Last edited by ccc; 09-19-2013 at 09:34 AM.
 
Old 09-17-2013, 03:51 PM   #2
bombuzal
LQ Newbie
 
Registered: May 2010
Distribution: Debian,Centos,Ubuntu
Posts: 9

Rep: Reputation: 0
I spent at least a hour to set it up, and according to all tutorials, it should work, but it didn't. Then I used generic tftp. As simple as: apt-get install tftpd tftp. Just check /etc/inetd.conf that it isn't commented out.
 
Old 09-18-2013, 04:05 AM   #3
ccc
Member
 
Registered: Oct 2002
Posts: 76

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bombuzal View Post
I spent at least a hour to set it up, and according to all tutorials, it should work, but it didn't. Then I used generic tftp. As simple as: apt-get install tftpd tftp. Just check /etc/inetd.conf that it isn't commented out.
I have tried using just tftpd and still doesn't work.
Knows anyone what's the clue?
 
Old 09-18-2013, 03:22 PM   #4
bombuzal
LQ Newbie
 
Registered: May 2010
Distribution: Debian,Centos,Ubuntu
Posts: 9

Rep: Reputation: 0
Did you do any diagnostics? Is the program running? Do you see anything from
Quote:
sudo netstat -uplan|grep 69
Did you restart inetd?
sudo kill -HUP `pidof inetd`
Clear iptables? Directly from localhost tried to tftp localhost and then "get somefile".
When i receive files, I try to grab traffic with "tcpdump port 69" and then I see network traffic.
Unfortunately, tftpd server doesn't log much into syslog...
 
Old 09-18-2013, 06:27 PM   #5
ccc
Member
 
Registered: Oct 2002
Posts: 76

Original Poster
Rep: Reputation: 0
Code:
# netstat -uplan|grep 69
#
The server is not listening on port 69, this is a problem, but firewall is not active.
Knows anyone howto solve this?
 
Old 09-18-2013, 07:38 PM   #6
kinneyd
LQ Newbie
 
Registered: Oct 2011
Posts: 21

Rep: Reputation: Disabled
I'm using tftpd-hpa on wheezy, but I do not have any lines in inetd.conf. I believe it is a stand alone service. Have you tried commenting out your entry in /etc/inetd.conf . Then running

# /etc/init.d/tftpd-hpa restart

* Edit *
Another thought, you may need to restart inetd if it's tying up 69 also.

# /etc/init.d/openbsd-inetd restart

Last edited by kinneyd; 09-18-2013 at 07:45 PM. Reason: After thought.
 
Old 09-19-2013, 05:20 AM   #7
bombuzal
LQ Newbie
 
Registered: May 2010
Distribution: Debian,Centos,Ubuntu
Posts: 9

Rep: Reputation: 0
tftp-hpa is standalone, but generic tftpd isn't and depends on inetd to be started on demand.
I agree with you, both services should be stopped in order to start one of them.
There must be some entries in log file, this should be your first stop in debugging applications.
 
Old 09-19-2013, 02:08 PM   #8
ccc
Member
 
Registered: Oct 2002
Posts: 76

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by kinneyd View Post
I'm using tftpd-hpa on wheezy, but I do not have any lines in inetd.conf. I believe it is a stand alone service. Have you tried commenting out your entry in /etc/inetd.conf . Then running

# /etc/init.d/tftpd-hpa restart

* Edit *
Another thought, you may need to restart inetd if it's tying up 69 also.

# /etc/init.d/openbsd-inetd restart
Now I have commented in /etc/inetd.conf this line:
Code:
#tftp  dgram  udp4  wait  nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftpboot
and have the following:
Code:
# cat /etc/default/tftpd-hpa
# /etc/default/tftpd-hpa

RUN_DAEMON="yes"
OPTIONS="-l -s /tftpboot"

TFTP_USERNAME="tftp"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure"
TFTP_DIRECTORY="/tftpboot"
Code:
# netstat -uplan|grep 69
udp        0      0 0.0.0.0:69              0.0.0.0:*                           5445/in.tftpd
but if I try to transfer a file via tftp from a switch in LAN, then I get this error message:
Code:
# copy startup-config tftp 192.168.1.245 config.cfg
00000K Transport error.

Last edited by ccc; 09-19-2013 at 03:03 PM.
 
Old 09-19-2013, 02:35 PM   #9
kinneyd
LQ Newbie
 
Registered: Oct 2011
Posts: 21

Rep: Reputation: Disabled
I'm not familiar with what you're doing with the copy command. But from another machine on the lan do you simply have tftp? (I'm assuming you're trying to get config.cfg)

# cd /tmp
#tftp 192.168.1.245
tftp> get config.cfg
tftp> quit
 
Old 09-19-2013, 03:04 PM   #10
ccc
Member
 
Registered: Oct 2002
Posts: 76

Original Poster
Rep: Reputation: 0
Code:
# copy startup-config tftp Windows_IP_address config.cfg
#
but this command works well to any other tftp server installed on windows machines.

Last edited by ccc; 09-19-2013 at 03:05 PM.
 
Old 09-19-2013, 03:47 PM   #11
ccc
Member
 
Registered: Oct 2002
Posts: 76

Original Poster
Rep: Reputation: 0
I have solved this problem using this config:
Code:
# cat /etc/default/tftpd-hpa
# /etc/default/tftpd-hpa

RUN_DAEMON="yes"
TFTP_OPTIONS="--secure --create --listen --verbose /tftpboot"

TFTP_USERNAME="tftp"
TFTP_ADDRESS="0.0.0.0:69"
#TFTP_OPTIONS="--secure --ipv4"
#TFTP_DIRECTORY="/tftpboot"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
tftpd server not transferring files from LAN. IshmaelMD Linux - Networking 4 08-29-2013 03:23 PM
tftpd problems with both tftpd-hpa and atftpd spitting image Linux - Server 1 10-05-2010 05:40 PM
tftpd problems with both tftpd-hpa and atftpd spitting image Debian 0 10-05-2010 12:04 PM
[SOLVED] tftp-server on RHEL5 - How do I change logging for in.tftpd? don_wombat_73 Linux - Server 1 06-22-2010 08:14 AM
Can't find a tftpd server for Slack. gguthary Linux - Newbie 9 06-22-2009 06:50 AM


All times are GMT -5. The time now is 03:46 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration