LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   setup tftpd server on Wheezy (http://www.linuxquestions.org/questions/debian-26/setup-tftpd-server-on-wheezy-4175477492/)

ccc 09-17-2013 02:33 PM

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.

bombuzal 09-17-2013 02:51 PM

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.

ccc 09-18-2013 03:05 AM

Quote:

Originally Posted by bombuzal (Post 5029408)
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?

bombuzal 09-18-2013 02:22 PM

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...

ccc 09-18-2013 05:27 PM

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?

kinneyd 09-18-2013 06:38 PM

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

bombuzal 09-19-2013 04:20 AM

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.

ccc 09-19-2013 01:08 PM

Quote:

Originally Posted by kinneyd (Post 5030321)
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.


kinneyd 09-19-2013 01:35 PM

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

ccc 09-19-2013 02:04 PM

Code:

# copy startup-config tftp Windows_IP_address config.cfg
#

but this command works well to any other tftp server installed on windows machines.

ccc 09-19-2013 02:47 PM

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"



All times are GMT -5. The time now is 07:33 PM.