Howto Setup advanced TFTP server in Ubuntu
Install atftp Server in Ubuntu
sudo aptitude install atftpd
This will complete the installation
By default atftpd server starts using inetd so we need to tell atftpd to run as a server directly, not through inetd.Edit /etc/default/atftpd file using the following command
sudo gedit /etc/default/atftpd
Change the following line
save and exit the file
Now you need to run the following command
sudo invoke-rc.d atftpd start
First you need to create a directory where you can place the files
sudo mkdir /tftpboot
sudo chmod -R 777 /tftpboot
sudo chown -R nobody /tftpboot
sudo /etc/init.d/atftpd restart
Security configuration for atftp
Some level of security can be gained using atftp libwrap support. Adding proper entry to /etc/hosts.allow and /etc/hosts.deny will restrict access to trusted hosts. Daemon name to use in these files is in.tftpd.
in.tftpd : FQD or IP
atftp client installation
Advance Trivial file transfer protocol client,atftp is the user interface to the Internet ATFTP (Advanced Trivial File Transfer Protocol), which allows users to transfer files to and from a remote machine. The remote host may be specified on the command line, in which case atftp uses host as the default host for future transfers.
sudo aptitude install atftp
That’s it you are ready to transfer your files using tftp clients
Testing tftp server
Tranfering file hda.txt from 192.168.1.100 (Client using tftp) to 192.168.1.2 (Server 192.168.1.100). Get an example file to transfer (eg. hda.txt)
chmod 777 /tftpboot/hda.txt
ls -l /tftpboot/
-rwxrwxrwx 1 ruchi ruchi 223 hda.txt
atftp> put hda.txt
Sent 722 bytes in 0.0 seconds
ls -l /tftpboot/
-rwxrwxrwx 1 ruchi ruchi 707 2008-07-07 23:07 hda.txt
i’m unable to upload any IOS of file to my routers/switches.
any help will be appreciated.
this is my config file.
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = -s /home/moh/D/ios-image
disable = no
Under Ubuntu 11.10…
‘sudo apt-get install atftpd’
(It is installed and started automatically)
—-Test It ———————–
sudo apt-get install atftp
sudo chmod ugoa+w /srv/tftp
echo hello > /srv/tftp/hello.txt
atftp –verbose -g -l local_hello.txt -r hello.txt 127.0.0.1
When I do atftp 192.168.1.2 I get tftp> at the prompt instead of atftp>. Suggestions?
Hi, I am running Ubuntu Studio 12.04. I configured atftd and can start it by running invoke-rc.d command and file transfer works perfectly well. However, it does not start at boot time. The log has an error message saying that it cannot bind to my ip interface. Still I can start it by running invoke-rc.d command manually.
No other process is using port 69. I have also changed the /etc/rcX.d to start up atftpd after rlinetd is started just to make sure that the port is available for binding but still no success.
It is not a major issue but interesting find out why this is happening. Would appreciate any suggestions to resolve this.
atftp> put hda.txt
I received this message:
my ip is 192.168.112.128
thats a dash dash in front of verbose
“atftp –verbose -g -l local_hello.txt -r hello.txt 127.0.0.1”
and it does not auto start atftpd in Ubuntu12.10
One other thing in 12.10
edit /etc/default/atftpd to contain INET_ANY (0.0.0.0) as the IP to make ports on…….
OPTIONS=”–tftpd-timeout 300 –bind-address 0.0.0.0 –retry-timeout 5 –mcast-port 1758 –mcast-addr 22.214.171.124-255 –mcast-ttl 1 –maxthread 100 –verbose=5 /srv/tftp”
Don’t chown the directory to nobody. That may allow an unauthenticated attacker to upload/overwrite your boot operating system files!
Very good post, I just to install atftpd on ubuntu 14.04 (64 bit) after some effort. Here is what I have done:
– Following the instructions at the top of this page
Edit atftpd configuration: sudo vim /etc/default/atftpd
And then make the following settings:
OPTIONS=”–tftpd-timeout 300 –retry-timeout 5 –mcast-port 1758 –mcast-addr 255.255.255.0-255 –mcast-ttl 1 –maxthread 100 –verbose=7 –daemon /tftpboot”
(my files are in /tftpboot)
Then start the tftp service: sudo invoke-rc.d atftpd start
I was trying to transffer IOS file fron my Cisco Routers but I can not transffer more than 32 MB
Even when I have more than 150 GB of free space, I get the following error:
Error writing tftp:/// (No space left on device)…..
The IOS files are up to 148 MB and I have more than enough space in both the flash of my device and my computer.