One of the most awesome thing about setting up a NAS server in your own home is due to the customization aspect. Since the NAS box is considered “yours”, you pretty much own it and therefore, you can do whatever the heck you want to it, of course provided that its possible. In recent articles, I’ve talked immensely about what a NAS server is and whether or not you will benefit from having one in your own home environment. In another article, I went over the details on how you can actually set one up on a Windows network by using the freely available NAS4Free operating system. A comment made by user Ella requested I write an article on how to get BitTorrent configured along with the ability to stream media files to her PS3 and Xbox 360 device within the NAS4Free operating system. Therefore, in this article, I will go over how to do just that. Because configuring BitTorrent to work within NAS4Free is so much easier than installing and configuring it to be a media streamer, I will first write about the former in this article here while the latter will be in the next article.
Having BitTorrent support in your NAS4Free box can be a godsend. Rather than having to leave your personal computer turned on to download the torrents, you can now have your NAS box to do the downloading for you! Because a NAS server is technically suppose to be running 24/7 anyways in your home environment, you can simply offload the download task to it. Granted, most BitTorrent clients do have the ability for you to configure it so that once all of your torrents have finished downloading, to automatically power down the computer so that you don’t waste electricity. However, if you are planning on transferring that data to your NAS server anyway, why not just let your server do the work instead?
For most users, a router of some kind usually sits between their home computer and devices from the big ol’ Internet. The good news is that this router in most cases will also act as a simple hardware firewall as well. This protects your home computers from the average snoops trying to probe your network. If you didn’t initiate an outbound communication in the first place, then why should your computer answer back to anonymous inbound traffic? The answer is it shouldn’t! With a firewall in place, it can help automatically drop those packets. The bad news is that there will be times when there is a legitimate purpose for having other users on the Internet be able to communicate with you. In these cases, especially when you need to use a service like BitTorrent, you need to configure something called port forwarding. Port forwarding simply tells your router to allow certain types of traffic through the firewall if it is intended for a specific recipient (computer or other type of device) on your home network. Think of port forwarding as an “exception” list.
The very first thing we need to do is configure our NAS box so that it has the proper IP configuration. In other words, we need to make sure that the server is able to connect out to the Internet. For this to work, we need to assign our server a static IP address (preferably) and the correct gateway and DNS IP address of our home network. With your NAS4Free server booted up, select the number 2 option from the console setup window to configure the network IP address.
In the DHCP box, we select NO. Next, we specify our IP address to use. Here, I will be using the 192.168.1.240 address. For the subnet mask, I accept the default of 24. For the gateway address, in most cases, it will be the IP address of your router interface. For most routers, this will either be 192.168.1.1 or 192.168.0.1. Next up is the DNS address. Again, in most cases, you can get away by using your router IP address. If you have a specific DNS server that you want to use (such as Google’s 184.108.40.206), specify it here. Finally, we specify NO when asked to configure an IPv6 address. NAS4Free now has all the information it needs and will begin the configuration. In a couple of seconds, you should see the success message.
Now with our NAS box configured with the proper address information, we can now create the port forwarding exception within our router! To log inside your router, you simply type in the IP address of your router interface in a browser window (Internet Explorer, Google Chrome, etc). Again, for most home routers, this IP address is most likely either 192.168.1.1 or 192.168.0.1. Once correctly done so, you will be prompted with a user name and password prompt. If this is your first time logging inside your router, you can type in the factory default user name and password. This varies from router models and manufacturers and so a good place to find this information is from this website. Simply specify your make and model of your router and away you go.It’s very important that you change the default password to something more secure. Make sure to do so once you gain access inside your router!
Now that you are inside the router, find the port forwarding section. We need to create a new entry for our NAS server. The required information is the application name, start and end port to open, protocol to use, and the IP address to forward to. By default NAS4Free uses the port 51413 for its BitTorrent client. If you want to change this port, you can simply specify a different port number here. When we enable the BitTorrent service in the next step within NAS4Free, be sure to change the port number to the one you’ve picked here. Below is a screenshot of how the end result looks like in my Linksys router:
NAs4Free ConfigurationAt this point, I’m assuming you already have an up and running NAS4Free server box. This includes correctly importing your disks and configuring your mount points to knowing how to create directories and Window file shares. If you are still new to NAS4Free, I highly suggest you go over my previous article where I go over the details on how to get up and running with NAS4Free in a Windows environment.
Alright, now our last step is to configure our NAS4Free box. Before we actually enable the BitTorrent service, I’m going to go ahead and create a directory to store my torrent data. The awesome part about NAS4Free is that you can have it automatically monitor a specific folder for new torrent files and once it finds one, NAS4Free will automatically start downloading the torrent all without your intervention! For my simple demo, I will create a directory called Torrent. I will use this folder to both hold my torrent data as well as the folder to have NAS4Free monitor for new torrent files. I create the new directory within the File Manager web interface:
Within the WinSCP utility, I also modify the permission of this folder so that it looks like this:
At this point, I can also choose to create a Windows SMB folder share that points to this Torrent folder along with the appropriate permissions but for simplicity sakes, I’m not going to do that. Instead, I will just use the WinSCP tool to dump in new torrent files in this directory. So next, we turn on the BitTorrent service within NAS4Free by heading over to Services –> BitTorrent. Click on the “Enable” check box (top right corner). There are only a couple of configuration settings required to get it working.
If you’ve changed the port number earlier, here is the place to enter in that port number. In the “Download Directory”, we specify which folder the torrent data should be dumped to. I will specify the Torrent directory I’ve created above. In the “Watch Directory” setting, I will also specify the Torrent folder. This is the folder NAS4Free monitors for new torrent files. You can simply leave the rest of the options to their default at this point. Remember to hit the Save and Restart button!
We now have pretty much everything configured. Open a new tab in your browser and head over to your BitTorrent management interface in NAS4Free. By default, my address is 192.168.1.240:9091. At the moment, the interface should be completely blank as seen below:
If you click on the wrench icon near the bottom and click on the Network tab, NAS4Free will let you know if you’ve configured the port forwarding section correctly or not. If everything looks good, it will tell you that the torrent port is open. This is what you want because from now on, when traffic arrives at this port number, your router is smart enough to route it to your NAS box rather than dropping them.
OK, so now is the moment of truth. I’m going to use WinSCP to drop a simple torrent file into the Torrent directory with a simple drag and drop.
Voila! As you can see below, the torrent has automatically loaded in the NAS4Free BitTorrent client interface all without me having to manuall start it! If you don’t see the torrent at first, simply press F5 on your keyboard to refresh the screen. You can also see that my download speed is very good (this is as good as it gets for me, trust me, sad but that’s how it is!). This lets me know that everything is working as expected. At this point, you can simply shut off your personal computer because the torrent download all takes place on the NAS box rather than on your local computer.
So as you can see, NAS4Free makes it extremely simple for automatic torrent downloads. Simply download your torrent file and drop it in the specific “Watch directory”. Of course in the real world, you wouldn’t have to use the WinSCP utility like I did here (except in the beginning where you need to configure the folder permissions) because you most likely have gotten that folder mounted as a network drive within your Windows environment. Also, please note also that you can manually open torrent files as well as specify a torrent URL location by clicking on the blue folder icon near the top. Enjoy!