Skip to Content

Turn your Mac into a TFTP Server

If you are working on some gear and need to tftp a config off a box or upload a new version of code, you might find yourself scratching your head when it comes to setting up the TFTP server built-in to Mac OS X. I know I did. This little tutorial is meant to show you how to quickly and easily get TFTP going on a Mac (in my case, a Macbook pro running Snow Leopard).

First, download TFTP Server. The developer's site has a copy. Once the dmg is open, drag the application to the applications folder to install.

Once you launch the application, you may have to configure the working path and parent folder permissions. This was relatively easy by clicking the "Fix" buttons next to the red error conditions at the bottom. I set my working path to a folder I had on my desktop, simply because it was convenient and that's where some of my configuration files were already located. You can choose any path on your system though.

To start the TFTP Server, click the Start TFTP button.

You should now have a running TFTP Server on your Mac. To test, try copying something from it 

Router#copy tftp flash
Address or name of remote host []? 10.0.40.100
Source filename []? 3560-config.txt
Destination filename [3560-config.txt]?
Accessing tftp://10.0.40.100/3560-config.txt...
Loading 3560-config.txt from 10.0.40.100 (via FastEthernet0/0): !
[OK - 60371 bytes]
Verifying checksum... OK (0x1D19)
60371 bytes copied in 1.512 secs (39928 bytes/sec)

If the connection isn't working, make sure your firewall is permitting the TFTP Server application. Go to System Preferences > Security > Advanced and check the list for TFTP Server

Try pinging the router from the Mac to make sure there is connectivity.

Also, if you find the TFTP Server application to be useful, please consider donating to the author, Fabrizio La Rosa. This is a tremendously helpful app and it's great to let the author know you appreciate his hard work.

Your rating: None Average: 5 (3 votes)

Comments

Mac TFTP

Wow!! I'm shocked!!! I have been looking for some up-to-date network blog to say SOMETHING on this. As it is, I messed with trying to set up the mentioned tftp server on my macbook pro --Lion-- and had no success yesterday after several hours.

I resorted to the Windows 7 partition to run from there. However, I must have been doing something wrong, then, because I kept getting the "Access violation" that the developer was warning about regarding Cisco in particular.
(they sited http://ww2.unime.it/flr/tftpserver/tftp.html#access_violation)

so, thanks for this, I'll go to it again tonight and post my success/failure.

On the side, I've been singing the praises of the Macbook over my W7, because I use GNS3 alot and when I was able to boot 30 3640 routers simultaneously in 9 seconds....well everyone wanted to get one! For me, this very issue is the last hurdle.

tftp mac

Nope! Must not work with Lion! Link below is a screen capture:

https://www.box.com/s/9d0b50c2830839d49563

That is all I get. I went into the command line and typed
sudo chmod 666 ~/Desktop/tftp

that gives permissions--nope!

Any help would be great.

Adam's picture

everyone read&write permission

Make sure the everyone group has read & write privileges. To set this, select the folder in question, do the Command+i combo to bring up the information box, then at the bottom, select Read & Write for the everyone group.

This is what fixed the issue on my Mac.

RW permissions

Thanks for this, but I only got 50% of the way there! As you will be able to see, I can copy tftp flash, but not copy flash tftp after your recommendation.

https://www.box.com/s/db874ed0122b944ecdef

So, that still isn't quite there if I want to copy the image to the tftp. Any other ideas?

Adam's picture

Make sure the file exists on

Make sure the file exists on the tftp server before copying a new file to it.

So, using the example in your screenshot, create a file named c2600-is-mz.122-11.T2.bin, then run the copy flash tftp command again.

There is a "create file" button on the toolbar in the tftp server app for convenience.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Those are the exclamations of success!!!!!!!!!!!!!!!!!!! I thought I had tried that, and in my eagerness, I guess I hadn't. Seems so simple and yet it bugged me for quite a while. That's the difference between knowledge and experience.

Thanks very much!

Adam's picture

Awesome! Glad to hear you got

Awesome! Glad to hear you got it working :)

usasig's picture

wont work on mountain lion

after using tftp server over 2 years on leopard, snow leopard, lion... finally it came to exhaustion... i cant figure out why its not working but i have the latest 3.4.1 version installed and even though i gave chmod 777 to the folder, no luck!
both on my mbp and imac, it is hopeless.
anyone having the same problem?

Workaround for Mountain Lion

For some reason Mountain Lion didn't have the service started for me. Try running this command on the terminal

sudo launchctl load -F /System/Library/LaunchDaemons/tftp.plist

Then relaunch TFTP Server, hope it works for you

Having the same problem

Used to work previously on earlier OSes/builds, but no luck on Mountain Lion (10.8.1) with 3.4.1. I comes up and shows all good on permissions and server running, but my client keeps timing out trying to connect. Here's the tcpdump (from the server side) on the Mac:

$ sudo tcpdump -i en3 -n -vv
tcpdump: listening on en3, link-type EN10MB (Ethernet), capture size 65535 bytes
22:18:17.259146 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.1 tell 192.168.1.100, length 28
22:18:18.260247 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.1 tell 192.168.1.100, length 28
22:18:19.143819 IP (tos 0x0, ttl 255, id 64056, offset 0, flags [DF], proto UDP (17), length 96)
192.168.1.1.2004 > 192.168.1.100.69: [no cksum] 68 RRQ "file.bin" octet timeout 5
22:18:19.260904 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.1 tell 192.168.1.100, length 28
22:18:24.143845 IP (tos 0x0, ttl 255, id 64057, offset 0, flags [DF], proto UDP (17), length 96)
192.168.1.1.2004 > 192.168.1.100.69: [no cksum] 68 RRQ "openwrt-ar71xx-generic-cus227-rootfs-squashfs.bin" octet timeout 5
22:18:29.143899 IP (tos 0x0, ttl 255, id 64058, offset 0, flags [DF], proto UDP (17), length 96)
192.168.1.1.2004 > 192.168.1.100.69: [no cksum] 68 RRQ "file.bin" octet timeout 5

TFTP not working in Lion

I am getting the following message when trying to use the tftp:

00000K Peer unreachable.

- Firewall checked
- Permisions checked.

I would appreciate some help.



Dr. Radut | blog