Flashing a SnapGear box
Product: SnapGear VPN router |
|
Type of Product: Hardware |
|
OS: Mac OS X |
Issue: SnapGear doesn't provide an easy firmware update utility for Macs
Solution: Use the tftp server built into OS X
Details:
Upgrading the firmware in a SnapGear requires a TFTP server for the SnapGear to pull
from. OS X happens to provide such a server, but not an interface to enable it.
Here's the procedure:
- Enable the TFTP server. Under OS X 10.2 this can be done with either inetd
or xinetd; xinetd is better in general, but inet's a bit easier to set up so
we'll use that. Edit the file /etc/inetd.conf and remove the comment marker
("#") from the TFTP line. I.e. change this:
#comsat dgram udp wait root /usr/libexec/tcpd comsat
#tftp dgram udp wait nobody /usr/libexec/tcpd tftpd /private/tftpboot
#bootps dgram udp wait root /usr/libexec/tcpd bootpd
Into this:
#comsat dgram udp wait root /usr/libexec/tcpd comsat
tftp dgram udp wait nobody /usr/libexec/tcpd tftpd /private/tftpboot
#bootps dgram udp wait root /usr/libexec/tcpd bootpd
As for how to do the edit? You'll need root access, so it's easiest to use a
command line editor with the sudo command.
- Create a TFTPable directory. Use the command:
sudo mkdir -m 777 /private/tftpboot
(Note: this creates the tftp directory with wide-open permissions. Ok for
temporary use, but should be changed if you're going to leave the TFTP server
running very long.)
- Activate the new inet settings with the command:
sudo killall -HUP inetd
(this basically sends the inetd daemon a signal to reload its configuration.)
- Put the firmware binary image file in the TFTP directory. Use the Finder's
Go To Folder menu option to go to /private/tftpboot, and copy/move the image
there.
- Back up the SnapGear's configuration. Open a browser and connect to the
SnapGear's web management interface; go to the System:Advanced screen, and look
in the Configuration Files section. You should see an option to Save/Restore
all configuration files remotely (not to be confused with the "Save and
Restore" option which backs the config up on the SnapGear itself).
Follow the Save/Restore link, and copy the resulting config dump to a text
file on your Mac.
- Go back to the System:Advanced screen, and click on the Flash Upgrade link.
- Fill in the IP address of your Macintosh, and for Filename put the complete
path to the image file (it should be something like
"/private/tftpboot/SnapGearPRO_v1.8.4_20030825_imagez.bin"). Leave
the Extra Parameters field blank, and click Update. You may also need to confirm
the update on the next screen.
- DO NOT turn off the SnapGear unit during the upgrade procedure.
Just give it a minute to upgrade itself and reboot, then refresh its web admin.
Go to the System:Diagnostics to confirm the new firmware version.
- Once the upgrade is done, turn off the TFTP server by editing /etc/inetd.conf
back the way it was, then doing the
sudo killall -HUP inetd
command again.
Some Related Information...
SnapGear Firmware Downloads
This Document Prepared By Gordon Davisson on 10/9/03
|