This site provides download links to ipsw firmware files for all Apple devices including iPhone 6 Plus, 6, 5S, 5C, 5, 4S, 4, 3GS, 3G, 2G; iPad Air 2, Air, 4, 3, 2, 1; iPad Mini 3, 2 with Retina, 1G; iPod Touch 5th, 4th, 3rd, 2nd, 1st Generations; Apple TV 3rd, 2nd Generations. Firmware files can be very large in some cases, so it may take some time for your download to complete. All firmware files are hosted on an Apple Inc. server.
Use the following steps below to check which version of firmware is installed on your device. Tap Settings > Tap General > Tap About > Your current running iOS firmware will be listed next to Version.
Restoring your device will delete all data and content, including videos, songs, photos, contacts, and other information, and will restore all settings to their factory condition. Updating your device doesn't affect your content, settings or other information. In either case, backing-up your content in iTunes or iCloud is recommended.
After downloading the desired firmware, connect the device to your computer and select it in iTunes. Mac users hold down the Option key, while Windows users should hold down the Shift key. Then click on the Update or Restore button, select the IPSW file you recently downloaded and click Choose. Your device should now begin to update. Take note that certain browsers may change the ipsw-file into a zip-file. If this should occur, just rename it to end in .ipsw and iTunes will recognize it.