Can Raspberry Pi Download Torrent To Nas

plug in the SD card, Ethernet, and the external HDD then plug in the power.
because we are doing this without a monitor we require to find out the IP address of the Pi from your wireless router, or if you have an android phone you can use an ap called Fing, this app can search your wifi when connected for active computers and other devices connected to your wifi network, It will be called Pi or Raspbian pi or somewhere along these lines..
Once you have found your IP address you need to use SSH, you can do this from windows with a program called Putty or in linux in a terminal using the ssh command.
my IP address is 192.168.0.14 as i have forced the router to give the mac address of the Pi a predetermined IP address so i can connect over the internet also using Webmin.
so in putty or linux connect to the ip address the default user name is pi and the password is raspberry
in terminal run ssh pi@192.168.0.14
in putty enter the IP address and connect then enter the username and password
username : pi
password ; raspberry
first thing you need to do after login is change the password but not only change the password create a non-admin/root user
first change the password of the user you have logged in as by typing:
passwd
then enter the new password then enter it again that will change the admin password
now create a new user:
adduser
follow the instructions to create a new user if you dont need to change any of the options just press enter through the options and defaults will be used

  1. Raspberry Pi Torrent Download
  2. Can Raspberry Pi Download Torrent To Nashville Tn

Network Attached Storage(NAS) is a great way to make files accessible anywhere on your home network. There’s an SSH client for Windows called PuTTY that you can download to connect. Plug the information for your Pi into PuTTY and connect like your on a Unix system. May 21, 2018 Create A Headless Torrent Server With Deluge On A.

  1. Torrent and DLNA station with Raspberry Pi A router, a Raspberry Pi and an external hard disk. This is a quick guide that explains how to make a torrent and DLNA station with a Raspberry Pi. I'm writing this guide as a note for self, but it may also be useful for others. This is the software that will download your torrent files.
  2. Using web client, I can start and stop and download torrents within the local network and, if you expose raspberry in the DMZ and use a static IP or a dyndns, from everywhere you are. Let’s install!

Do your part for the global “Linux distribution network” by building a dedicated, secure, torrent-downloading megalith that barely uses 10W of power. It is possible, and it will, of course, be based on a Raspberry Pi.

Downloading and seeding (you do seed, right? Good people seed to at least a 2.0 ratio) is an arduous task for any regular computer, and means you’re sucking down far more electricity than you ought to be by having to leave it on overnight. What if you could offload that task to a low-powered Raspberry Pi, small enough to stuff under a floorboard and barely breaking 10W of power to do it all. That’s exactly what I’ll show you how to do today.

Here’s the plan:

  • Set up a Raspberry Pi with some USB storage, and move the system drive over to USB to extend the life of our SD card.
  • Share that over the network.
  • Configure a VPN so that all traffic is routed over the VPN, securely – and everything stops if that connection fails. We don’t want out ISP knowing which Linux distro we favour.
  • Install a remotely-manageable torrent client, Transmission.

Sounds complicated, doesn’t it? No more than a few hundred Terminal commands, I assure you. A lot of this overlaps with our Raspberry Pi NASTurn Your Raspberry Pi Into An NAS BoxTurn Your Raspberry Pi Into An NAS BoxDo you have a couple of external hard drives lying around and a Raspberry Pi? Make a cheap, low powered networked attached storage device out of them. While the end result certainly won't be as...Read More tutorial, so if you’re not so interested in the torrenting and VPN side of things, you might want to check that out instead.

USB Storage

Begin with a fresh Raspian install and connect the Ethernet interface, and plug in your USB storage (through a powered USB hub, or it’s likely you’ll face errors later as I did) – it needn’t be formatted yet. Log in remotely with the default pi /raspberry username and password combination, then run:

Change the amount of memory given over graphics to 16 megabytes – we’ll be running this completely headless, so you don’t need graphic memory. Exit, and let’s setup some partitions on the USB. We’re going to setup at least two – one to use for the system so as to preserve the life of our SD card, and the other one for downloads to be stored. Figure out first which drive is your USB.

In my case, it was easy to identify as “sda”. With that in mind, adjust the following command to enter the fdisk utility on the appropriate device.

Press p to list current partitions. To delete any existing ones, press d. Create a new primary partition, with n, then p. When it asks you for size, enter +8G. Now go ahead and create another partition for your torrent data (again, primary), or more partitions too if you wish. W will write the new partition map to the drive when you’re done.

Once the new table has been written, use the following commands to format the drives as linux ext4. Use additional commands if you partitioned your drive with more than two partitions.

The last command will confirm that you’ve got the partitions mounted correctly. Next, we want to copy the SD card data to the drive – this will extend its life by avoiding constant read/write operations to caches etc. Install rsync to do this:

This will initiate a long series of file copying, so twiddle your fingers for a bit.

Adjust this to read:

Next, modify fstab to mount them on start up.

Add the following lines:

Comment out the following line which refers to the SD card:

Reboot the Pi with

Sorted! Your Pi will now mount a both a root data partition and your torrents partition

Share The Drive: Samba

Make sure we’re updated first, remove Wolfram Mathematica packages which have always caused me trouble when doing absolutely anything on the Pi (something to do with math-kernel), then install the required packages

Raspberry Pi Torrent Download

Hit CTRL-W and type “security” to find the following line, and uncomment it.

Add the following to define our torrents shared folder:

Restart the Samba service:

Next we need to add a user to the system. Replace “jamie” with your desired username which you’ll be logging in with to access the shared folder. The following commands then ask you to create your passwords, the first at a system level and the next for Samba. Modify the last commands if you called your data drive something else (and here’s a primer on file ownership in linux).

Test – you should be able to connect from another machine on your network, and read/write files to the new share. Check they appear on the Pi too with ls from within the /mnt/torrents folder.

VPN Setup

Install the required packages

Download the OpenVPN config files from your provider. You can check out a list of the best VPNs here, but be sure to find one that’s torrent-friendly. I use privacy.io myself, but Private Internet Access is another popular option within torrent communities. Either way, you should be able to grab a ZIP file of configurations and a certificate. Put these into your torrents folder, within a directory called openvpn. Modify the following command so it points to your config file, which will almost certainly differ from privacyIO.ovpn

If you get an output like this, you’re good. Hit CTRL-C to terminate it. It’s annoying having to type the password in though, and we need a few modifications to add start and stop scripts. Edit the config file (again, replace privacyIO.ovpn with the .ovpn file your provider gave you)

Modify the following line first. Basically we’re saying we’ll store the username and password in a file called pass.txt

Save, and type:

Enter your username on the first line, and password on the next. Save, and try connecting again:

You shouldn’t be bugged to log in this time. Yay! Next, open up the config file again, and add the following lines:

This specifies some scripts we’re going to create later to perform tasks when the connection either comes up successfully, or goes down. Make sure you’re in the mnt/torrents/openvpn directory, then run the following:

Add the following which ensures traffic is sent out over the VPN:

Next, create the down.sh script

Add:

Finally, we want a script to open the connection, instead of starting it from the command line as we just did.

Paste in the VPN launch command from before. In case you’ve forgotten:

Now, make all those scripts executable, and launch the VPN script at startup.

Add the following line before the exit 0 line. We’re just telling it to start this script at startup.

Finally, reboot your system again.

Log in again, and run ifconfig. You’ll know it’s working if you see an entry for tap0 (or tun0), and are able to successful curl a webpage:

The Torrent Client

RaspberryCan raspberry pi download torrent to nas free

Nearly there now. Finally, we’re going to install Transmission, which is lightweight and has a nice web GUI. The following commands install, then stops the daemon – since we need to configure it first – then opens up the settings file for editing.

Change “rpc-authentication-required” to false; change “rpc-whitelist” to include your local subnet – for example:

Add or adjust the following if already present:

Next, edit the daemon startup file itself to deal with some permission problems.

Change the USER=transmission-daemon to USER=root. Reload the daemon.

Finally, we’ll install avahi-daemon to setup bonjour/zeroconf networking, which means we won’t need to use the IP address of the Pi to access it from a browser – instead we’ll be able to use the raspberrypi.local address.

Assuming your hostname is the default (raspberrypi, but can be changed using raspi-config), navigate to:

First, check your torrent IP is being correctly disguised through the VPN. Download the test torrent file from TorGuard – the download graphic looks like an advertisement, but it isn’t – and drop it in the torrents shared folder.

We’ve already configured Transmission to watch this folder for new torrents, so it should be added immediately. Go ahead and drop some legal Linux distro torrents in there as well.

The IP checking torrent should return an error, along with the IP address it detected. Make sure that isn’t your home IP – if it is, the VPN hasn’t been set up right. By default, any torrents you drop in the folder will be renamed to .added, and a .part file should be created until the transfer is finished. Verify this is the case in your shared folder.

That’s it! You now have a super low-powered, secure, torrent-downloading Pi – leaving your workstation available for better things. You might now want to look at adding a UPnP server to for streaming media around the network, or using BitTorrent Sync to create your own cloud storageBuild Your Own Cloud Storage with Raspberry Pi and BitTorrent SyncBuild Your Own Cloud Storage with Raspberry Pi and BitTorrent SyncDon't believe the hype: the Cloud is far from secure. But have no fear - now you can roll out your own private, unlimited, and secure cloud storage platform.Read More. What features will you be adding in?

Explore more about: BitTorrent, Raspberry Pi.

Can Raspberry Pi Download Torrent To Nashville Tn

  1. CAN SOMEONE POST A LINK OR CAN THIS BE UPDATED PLEASE I NEED HELP SETTING UP AUTOBOOT VPN CONNECTION

  2. I only followed the VPN section on this article. The VPN starts up fine but the terminal hangs at ' Initialization Sequence Completed' and I never get my prompt back. I tried adding '&' to the end of rc.local like another another person commented example: '/mnt/torrents/openvpn/vpn.sh &'. But this did not work for me. Running Raspbian Jessie Lite

    Has anyone found a fix for this?

  3. Quick tip for people that got hung up like me. This is for Private Internet Access.
    I got to the point where you are supposed to reboot and see the tunnel interface in ifconfig but it never would work. I tried everything from creating a service with vpn.sh to adding the script to cron @reboot.

    What finally worked was adding the full path of the .pem file to the .conf file. I also stuck the .pem file and the .crt file in /etc/openvpn. In my .conf:
    .....
    crl-verify /etc/openvpn/crl.rsa.2048.pem
    ....
    Hope this helps someone!

    • Thanks, this was of great help! One more thing though...
      My vpn.sh file looks like this now:
      sudo openvpn --client --config /root/config/openvpn/Switzerland.ovpn --ca /root/config/openvpn/ca.rsa.2048.crt --crl-verify /root/config/openvpn/crl.rsa.2048.pem --script-security 2
      route-up /root/config/openvpn/route-up.sh
      down-pre
      down /root/config/openvpn/down.sh
      Are you supposed to put the route-up, down-pre and down parameters in this config file or another? Also i was not able to test a fallback, when i killed openvpn via pid transmission just switched over to the regular internet.

  4. I had tons of issues with Transmission and switched to Deluge and it worked well.
    Only question I have is how do I test the route-up,down pre,down functions of OpenVPN to make sure they work (simulate a failure to connect, and disconnect)?
    I had a few odd times it failed to connect on boot and it went on downloading with Non-VPN IP how can we ensure that doesn't happen?

    Thanks!

  5. This guide has worked perfectly till the moment you have to add a VPN server. Since privacy.io is no longer online, and PIA is a bit too expensive for me atm, how could I possibly circumvent this problem?? Any tips?

  6. When I plug in my external hard drive raspberry pi automatically recognizes and mounts it. Quick and easy. The problem comes when trying to get a windows machine to access it. The folder permissions for where it has been mounted are root so no matter what I do to grant access in samba to pi user no number of correct password entries work. I can force user = root and bam I have access but this is not what I'm looking for - ultimately I want guest read to some folders and pi user write access to all folders of the external hard drive. Any idea how to mount a drive to the pi user's folder where I'll probably have better luck or perhaps make a setting change in samba or the file permissions to allow this? I've read a ton of samba walk throughs and nobody seems to touch on this as something to look out for. I know this is slightly off topic but this article is so well written I'm hoping perhaps someone might be willing to throw a few suggestions my way if they have a few moments. Many thanks if you do.

    • I found the drive was mounted in the wrong place as well, and also found very little talk about it. My problem was solved by unmounting the drive (umount sda1) and mounting it in the correct slot, most of the instruction pages should tell you where the correct slot is, sorry it's not much information but i'll help where i can with what little i have :)

  7. this guide has an incredible amount of problems, from the samba share to the transmission permissions. you should revise it.

  8. Is it all right to skip this step?:

    Hit CTRL-W and type “security” to find the following line, and uncomment it.
    security = user

    I couldn't find it in the file. I'm on RPi3, maybe that's why? I've no idea. I'm new to Raspberry and I'm hardly familiar with Linux coding and whatnot.

    • you have to add that line after [global]

  9. Thanks for this :)

    I've followed these instructions both on my pi, and my home media server (for different locations) and its worked both on raspian (jessy) and unbuntu server :)

  10. Hi James, great post! Worked really well for me. However I am having trouble getting transmission to seed behind the PIA VPN. Seems to have something to do with the listening port, which is listed as closed. I can download just fine but seeding won't work. Any ideas on what to do? Googling doesn't give a conclusive answer, and it's complicated by all the people trying to get remote access do their Transmission through the VPN, which is not what I want to do. I just want to be able to seed.

  11. When ever I have the 'iptables -t nat -I POSTROUTING -o tun0 -j MASQUERADE' in route-up.sh I can not browse the internet or download torrents. If I remove the iptables entry it works fine.

    Does anyone know what this issue is?

  12. i'm trying this on OSMC, but even after changing the file permissions i'm getting this error: Options error: --route-up script fails with '/media/ext/torrents/openvpn/route-up.sh': Permission denied
    can anyone explain this to me?

  13. can we use a pi zero as a torrentbox

  14. So I've tried reinstalling using this guide a few times now and I keep ending up with the same problem. Transmission daemon won't start. Doesn't matter if where or when I start it but when I run 'sudo service /etc/init.d/transmission-daemon start' I get the output:

    [FAILED] Failed to start Transmission BitTottent Daemon.
    See 'systemctl status transmission-daemon.service' for details.

    Running 'systemctl status transmission-daemon.service' gives me the output:

    transmission-daemon.service - Transmission BitTorrent Daemon
    Loaded: loaded (/lib/systemd/system/transmission-daemon.service; enabled)
    Active: failed (result: exit-code) since Mon 2016-01-18 21:12:02 UT; 7in ago
    Process: 592 ExecStart=/usr/bin/transmission-daemon -f --lo-error (code=exited, status=255)
    Main PID: 592 (code=exited, status=255)

    This is no copy-paste, so there might be a few typing errors..

    Reards.

    • Me and someone in the comment section on this guide also encountered this error: http://pimylifeup.com/raspberry-pi-torrentbox/

      The author of that article updated the instructions, which fixed it for me.

  15. Hey James is there a way to get port forwarding to the pi working with a vpn setup? Seems to tell me the port is closed whatever I try.

  16. Hi! I have followed all the instructions very carefully, and I am having a couple of issues. First is that, like many commenters, I am not able to use the pi manually since starting the VPN at launch seems to prevent further input, including ^c. I can, however, ssh into the pi which is what I will be doing anyway so that is minor.

    More important is that when I add files to the torrents folder, they successfully show up in transmission's web UI but the moment they start downloading they fail with an 'error: Permission denied (/mnt/torrents/name-of-file.filetype)' I double checked '/etc/init.d/transmission-daemon' and the USER=root line is correct, as I thought that might cause the issue. Does anyone know what else might cause this to happen, and how I might correct it? I am new to linux so still learning about permissions and stuff. I assume I need to give transmission-daemon permission to modify the folder? If anyone can help, let me know!

    • And now in trying to fix this issue I seem to have somehow broken transmission watching for new torrents in the /mnt/torrents folder. Damn.

    • Add an '&' to the end of the line you added in the rc.local to call the script in background.

      /mnt/torrents/openvpn/vpn.sh&

  17. I receive the following error when trying to execute sudo fdisk /dev/sda

    fdisk: unable to open /dev/sda: No medium found

    What's the problem here? I couldn't find any solution for this particular scenario anywhere.

    • Are you sure it's /dev/sda? If you had multiple disks plugged in it could be /dev/sdb sdc etc.

      • I'm positive. I only have the SD card and the one and only external HDD. The problem persists and I have no clue what to do.

  18. Hello . Is there any chance to get to know how to make the same things on OSMC?
    I have tried to use instucions above but not all commnads are working.

  19. First of all, thanks for your tutorial. I set up my Raspberry Pi like you described. But the iptables configuration could be improved, I think. When I kill the openvpn process while downloading torrents, transmission continues but using my real ip address. Unfortunately I have never used iptables before. Do you have an idea how to configure iptables in a way that network traffic just stopps if there is no vpn interface?

    • I know both the guide and the comment I'm replying to are pretty old already but for completeness sake I thought it best to mention this: what James Bruce described in this guide is the creation of shell scripts that are executed whenever OpenVPN experiences a connection/disconnection event. This isn't a very secure method to implement a killswitch/'firewall' because the control lies solely with the application that manages the VPN tunnel.

      If you simply kill the process or if it crashes then all network traffic will continue to flow after the VPN tunnel goes down. The down.sh never has a chance to be executed in this case. Using this method means that you put all your trust into the OpenVPN client never crashing and working perfectly in general. Maybe it will, maybe it won't, but you certainly gamble with the ultimate privacy you are trying to achieve.

      The solution is to create a method that works independently of OpenVPN or any other method of connecting to an encrypted tunnel such as Libreswan (an IPsec implementation that can be used to connect via the generally more performant IKEv2 if the VPN provider supports it). The safest way of doing this is by creating a set of iptables rules that limit connections to only the IP address(es) of the VPN server. For maximum safety these rules should only be removed/changed if you desire to connect to a different VPN server. If an application supports the binding to an interface, then that should be used. Another way is to use netns to associate the VPN tunnel interface to a namespace and then launch an application by binding it to the namespace.

      One last piece of advice: If you've been searching for other methods of binding to a certain IP or interface, you shouldn't ever use LD_PRELOAD, Bindhack, liboverride et al in this situation as all these methods which dynamically link code only rebind TCP connections and not UDP which is frequently used in torrent clients. This applies to any such method that I'm familiar with, but I don't claim to know them all.

  20. hi, James Great thanks for the nice instructions. I have learned a lot from it. I just would like to know what these two following commands do. 'iptables -t nat -I POSTROUTING -o tun0 -j MASQUERADE and iptables -t nat -D POSTROUTING -o tun0 -j MASQUERADE' does it block all the internet access after vpn server is done?

  21. I have tried to follow the tutorial with a newly installed Raspbian Jessie and get as far as installing Samba. When I search smb.conf it cannot find security = user.

    If I enter all of [torrents] testparm advises that security mask, force security mode, directory security mask and force directory security mode are unknown parameters and ignored.

    When I try to restart samba I get the error message 'Failed to restart samba.service: Unit samba.service is masked.

    This is with Samba version 4.1.17-Debian.

    Do you have any idea what my problem is?

    • I noticed the same problem; I left out the 'security=user' and just rebooted the pi and samba works fine!

      • I downloaded Raspbian Wheezy and it looks like that what the instructions were written with as it worked fine.

        Andy

  22. I used a much shorter tut I found and decided to just manually activate the vpn each time

    One issue Im having though is connecting to the webUI from outside my LAN
    Even this guide seems to only get you lan and not wan access.

    Is WAN possible?
    thanks nice guide either way

  23. This is one of the better guides I've seen for this, thanks.

    A wrinkle that I'm using is binding deluge to the tunnel IP, so there's no leaks and no awkward worries about traffic going outside if the tunnel is down. But in this case, I'm deleting the default route to the tunnel, because I don't want my web browsing traffic being VPN'd. I'm doing that with a script command in the config which is kind of inelegant. I couldn't figure out the official openvpn way to do it. I wonder if you might know?

    I'm also trying to get a script running to automatically fill in the tunnel IP in the deluge config, but the examples I've found are not for raspbian and need some work.

    Love to hear your thoughts on this.

  24. Hey, I have a problem with avahi, he stop working after a short time. Can you help-me? I have a Raspberry Pi 2.

  25. Hey, im going through this and everything is working good up untill the rc.local part.

    I actually got it to automatically start the command at startup and it connects, but i am unable to do anything after. It just hangs at Initialization Sequence Completed, and I am unable to cancel it.

    I checked through and I don't think i missed anything about that, but can you help me figure out what I am doing wrong?

  26. Hi – The tutorial is fantastic from what I can see – Thanks.
    I have one issue though.
    My VPN seams to be working perfectly and I can curl/ping pages all day.
    I cannot however access the transmission webui. Any ideas anyone?
    I have tried using the local name and the ip address.
    Many thanks

    ^ Was this ever solved? I'm having the same issue. Everything works dandy, everything copied properly. I still cannot access this however...

    • I've got the exact same problem :/

      Any ideas how to resolve it?

    • Hi, Yep. I had a problem too. I added the entries into the Transmission config file after all other entries. It looks like the final entry must NOT have a trailing comma (note the final entry in the default file reads: 'utp-enabled': true
      (No comma!)

      hope that helps.

    • Sounds like you may have white listed the wrong subnet, the default is only local host (127.0.0.1) and the author added a common subnet issued by Apple Routers (10.0.1.*). If you have a different router manufacturer you may have a different subnet (usually 192.168.1.*). Alternatively the host name isn't broadcasting correctly, have you tried connecting via the direct ip?

  27. Interesting project. How about the average transfer rate for the Raspberry NAS? And would this work on the Raspberry Pi B+?

  28. Terrific explanation and instructions for a moderately complicated process. I struggled with a few odd issues (such as Samba apparently not liking my use of an underscore in the new username), but got through in the end. Shoutout to commenter 'Steve' on September 1st, 2014 who noted the very necessary --crl-verify option when using PIA proxy. Otherwise, rc.local won't setup the tun0 and gives no indication as to why.

    One question I have for the author is: Why put all the OpenVPN configs and various scripts in the /mnt/torrents folder? Since this is shared and writeable, aren't they unnecessarily exposed to tampering (intentional or not)?

    I may move that stuff to the /mnt/systemdrive, if there isn't a reason against it.

    Thanks for the article!

  29. Yeah, slow as shit though.

  30. Hi - The tutorial is fantastic from what I can see - Thanks.
    I have one issue though.

    My VPN seams to be working perfectly and I can curl/ping pages all day.

    I cannot however access the transmission webui. Any ideas anyone?

    I have tried using the local name and the ip address.

    Many thanks

    • Hi, Yep. I had a problem too. I added the entries into the Transmission config file after all other entries. It looks like the final entry must NOT have a trailing comma (note the final entry in the default file reads: 'utp-enabled': true
      (No comma!)

      hope that helps.

  31. Hi, thanks so much for the tutorial. I followed all of your instructions to the letter, but for some reason my vpn is not booting at startup. I made the edit/addition to the rc.local, but still nothing. Am I missing something?

  32. I have a question regarding access to the Pi once it is connected to the VPN. Currently everything is working on my Pi and I can SSH to it and use the Transmission WebUI while I am on my local network of 10.10.1.*, Now the issue I have been struggling to figure out is how to remotely access the Pi properly so I can use the WebUI. I have a Asus RT-AC68U as my main router and have a OpenVPN server running on it. This allows me to VPN into my house and access all my local devices. It is using tun as I need the Android support. This issue with tun is that it assigns a different IP to my clients - 10.8.0.* so when I try to SSH to the Pi or use the WebUI the VPN client on the Pi is redirecting this traffic over the Pi VPN and I never get back a response. I switched my VPN server to use TAP and DHCP of my local LAN and the issue was solved as in that configuration my client has a local LAN IP. I imagine I should be able to change the IPtables on the Pi so my 10.8.0.* traffic is not routed over the Pi VPN client but I cannot for the life of me figure it out. If anyone has any suggestions please point me in the right direction I have been reading for hours and hours with no luck.

    • I add the following lines in route-up.sh before the iptables command:

      ip rule add from x.x.x.x table 10
      ip route add default via y.y.y.y table 10

      (where x.x.x.x is the ip of my network interface wlan0 in my case)
      (where y.y.y.y is the ip of my lan gateway)

      This allows the ssh connection to be made and packets to route properly back out on the wlan0 interface through the gateway, not the tunnel.

      comment on bobhood.wordpress.com/2013/07/28/raspberry-pi-creating-a-secure-torrent-client/

  33. On second thought... I'm ssh-ed into my Pi from my mac via user@192.lo.cal.ip, could it be that, since the VPN kicks in the ssh-connection is lost because the VPN changes the ip, and on my mc it seems like the Pi is dead?

    • No, I did it all over the local network, should be fine like that. The only thing that seems odd from you've said is powering both the Pi itself and the USB hard drive from the same powered USB port - which is then also plugged BACK into the Pi as the host controller. I'm wondering if there's some weird power loop messing around with things, as that might also manifest itself like a hardware error.

      But, you could also rule out the SSH thing by hooking a keyboard and monitor up, best to try both.

    • Thanks again :-) So I did go out and got myself a Keyboard and got it all working (after a complete new install, just to make sure).

      One (similar to before) thing is still strange: when I boot everything boots well right up to 'Initialization Sequence complete'. Then I get a blinking cursor on my attached TV/monitor and nothing more. No prompt. On my attached USB keyboard I can type, sure, but to no avail. alt, command, control-C are all nicely printed on the screen, but that's it. I CAN, though, at the same time ssh in from my mac, get a prompt, everything works. I can also rdp in and get the GUI. Everything runs fine. Only on my TV/monitor the cursor keeps blinking away with so far nothing I can do about it...

      And if anyone should ask: if you use PrivateInternetAccess, download the default openvpn.zip and add --crl-verify /mnt/torrents/openvpn/crl.pem to the vpn launch command :-)

  34. Hi :-)

    Great tutorial so far, thank you very much!

    I'm stuck. I'm using PrivateInternetAccess, did everything you said. When I initiate the VPN, the Pi runs through to the point where it says 'Initializationtion Sequence Complete' - which isn't too bad - then I get a blinking cursor and that is that. A blinking Cursor. Then the Pi shuts down. The end. I repeated that circle 5 times, now I give up. For now. Maybe you have an idea?

    • Hi James, thank you for your response. I wrote a second post shortly after my first, that seemingly didn't come through.

      I'm always SSH-ed into my Pi from my Mac. No USB keyboard yet. So maybe the VPN connection screws up the SSH-connection? (I'm no expert, in case this sounds like a dumb thought...) Thought I try the same procedure with a real keyboard attached, which I'll get Friday night.

      Maybe it's PrivateInternetAccess and their configs that screws up things? Their online-chat briefly told me Pi is not supported... Tried to get a one-day-pass from privacy.io, but they're having payment problems currently. So I'll wait for that to resolve.

      And, sure, my SSD might be corrupted, though it's only a week old. Your setup is my first project with my new Pi since it's one thing that actually makes sense :-)

    • oh, and yes, Pi and external HD both are powered by the same 4-port-USB hub...

  35. when i run the vpn.sh script it shows that the route-up.sh script is not working, is anyone else experiencing this issue

    • The only thing in that script is the iptables command. Perhaps checks you're using the correct tun or tap connection?

    • Below is the log from running the vpn script. notice the error with route-up. not really sure what the problem is.. i have the exact script copied in. after running i am also unable to curl a webpage and am confused why the hardware address is all 0s
      any help is greatly appreciated

      001b]0;pi@raspberrypi: /mnt/torrents/openvpn0007001b[01;32mpi@raspberrypi001b[00m 001b[01;34m/mnt/torrents/openvpn $001b[00m Tue Aug 26 21:55:17 2014 OpenVPN 2.2.1 arm-linux-gnueabihf [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Oct 12 2013
      Tue Aug 26 21:55:17 2014 WARNING: file '/mnt/torrents/pass.txt' is group or others accessible
      Tue Aug 26 21:55:17 2014 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
      Tue Aug 26 21:55:17 2014 LZO compression initialized
      Tue Aug 26 21:55:17 2014 RESOLVE: NOTE: swiss.privateinternetaccess.com resolves to 4 addresses
      Tue Aug 26 21:55:17 2014 UDPv4 link local: [undef]
      Tue Aug 26 21:55:17 2014 UDPv4 link remote: [AF_INET]xxx.xxx.xxx.xxx
      Tue Aug 26 21:55:18 2014 WARNING: this configuration may cache passwoirds in memory -- use the auth-nocache option to prevent this
      Tue Aug 26 21:55:19 2014 [Private_Internet_Access] Peer Connection Initiated with [AF_INET]xxx.xxx.xxx.xxx
      Tue Aug 26 21:55:22 2014 TUN/TAP device tun0 opened
      Tue Aug 26 21:55:22 2014 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
      Tue Aug 26 21:55:22 2014 /sbin/ifconfig tun0 xxx.xxx.xxx.xxx pointopoint xxx.xx.xxx.xxx mtu 1500
      Tue Aug 26 21:55:22 2014 WARNING: Failed running command (--route-up): could not execute external program
      Tue Aug 26 21:55:22 2014 Initialization Sequence Completed

      001b]0;pi@raspberrypi: /mnt/torrents/openvpn0007001b[01;32mpi@raspberrypi001b[00m 001b[01;34m/mnt/torrents/openvpn $001b[00m ifconfig
      eth0 Link encap:Ethernet HWaddr b8:27:eb:33:80:42
      inet addr:192.168.0.3 Bcast:192.168.0.255 Mask:255.255.255.0
      UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
      RX packets:438 errors:0 dropped:0 overruns:0 frame:0
      TX packets:439 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:43815 (42.7 KiB) TX bytes:59737 (58.3 KiB)

      lo Link encap:Local Loopback
      inet addr:127.0.0.1 Mask:255.0.0.0
      UP LOOPBACK RUNNING MTU:65536 Metric:1
      RX packets:2 errors:0 dropped:0 overruns:0 frame:0
      TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0
      RX bytes:100 (100.0 B) TX bytes:100 (100.0 B)

      tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
      inet addr:xxx.xxx.xxx.xxx P-t-P:xxx.xxx.xxx.xxx Mask:255.255.255.255
      UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
      RX packets:4 errors:0 dropped:0 overruns:0 frame:0
      TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:100
      RX bytes:304 (304.0 B) TX bytes:780 (780.0 B)

    • I am pretty sure I did, i will try again today

    • Well evidently i didn't because i am no longer getting that error but now i am still unable to connect to anything or curl a webpage below is the output of the VPN script, i dont really see any errors so i am not sure what could be wrong

      pi@raspberrypi /mnt/torrents/openvpn $ ./vpn.sh
      Sat Aug 30 13:54:10 2014 OpenVPN 2.2.1 arm-linux-gnueabihf [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Oct 12 2013
      Sat Aug 30 13:54:10 2014 WARNING: file '/mnt/torrents/openvpn/pass.txt' is group or others accessible
      Sat Aug 30 13:54:10 2014 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
      Sat Aug 30 13:54:10 2014 LZO compression initialized
      Sat Aug 30 13:54:10 2014 RESOLVE: NOTE: sweden.privateinternetaccess.com resolves to 4 addresses
      Sat Aug 30 13:54:10 2014 UDPv4 link local: [undef]
      Sat Aug 30 13:54:10 2014 UDPv4 link remote: [AF_INET]5.153.234.58:1194
      Sat Aug 30 13:54:10 2014 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
      Sat Aug 30 13:54:12 2014 [Private_Internet_Access] Peer Connection Initiated with [AF_INET]5.153.234.58:1194
      Sat Aug 30 13:54:14 2014 TUN/TAP device tun0 opened
      Sat Aug 30 13:54:14 2014 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
      Sat Aug 30 13:54:14 2014 /sbin/ifconfig tun0 10.132.1.6 pointopoint 10.132.1.5 mtu 1500
      Sat Aug 30 13:54:15 2014 Initialization Sequence Completed

    • Everything looks like it should have worked. What do you get when you do an 'ifconfig' - is there a tun or tap0 listed?

      • I have a very similiar ifconfig output. It lists tun0 but still doesn't work.
        It looks like this.

        tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
        inet addr:10.8.8.90 P-t-P:10.8.8.89 Mask:255.255.255.255
        UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
        RX packets:0 errors:0 dropped:0 overruns:0 frame:0
        TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:100
        RX bytes:0 (0.0 B) TX bytes:304 (304.0 B)

        My vpn.sh script output seem OK. I did everything as said in the tutorial, except I moved my openvpn directory from /mnt/torrents/ to /etc/. However I did update all scripts and configs with the right location. My VPN (NordVpn) works fine on my Windows PC though.
        I realise this article is pretty old but I hope to find some help here. Thanks.

  36. Hi James,

    thanks for the guide, it helped me a lot. Unfortunately I have a little problem. ifconfig shows that there is neither a tap0 nor a tun0. Curling a webpage results in: Couldn't resolve host xyz. Do you have any idea how to fix this?

    • Thanks for your reply. The vpn wasn't working due to a DNS problem, which I fixed. Now the Pi is working as intended. Thanks for the guide.

  37. I know this is an old article, but do you know of a way to also port forward the Raspberry Pi using Private Internet Access?

  38. James, I have yet to locate an error for the /etc/rc.local issue. It just seems like it isn't be called at all. I'll keep digging.

  39. Thanks for the guide! I am experiencing an issue. It doesn't seem like any of my changes are surviving a reboot. The VPN doesn't auto connect and the mounts don't seem to be correct. The VPN connects fine if I launch the script. My rc.local edits survive a reboot as well as changes to fstab. Also, a mount -a seems to mount fstab entries that exist but aren't mounting at system start.

    Any ideas what I might be experiencing? Thanks.

    • Hi Mat. The mounts might be incorrect because after the initial SD card boot, everythign is handed over to USB, and the fstab is different at that point - if you see what I mean?

      As for the VPN - can you verify you have a VPN.sh, which is exectuable by all, and does work to connect the VPN? And it's been added to /etc/rc.local? Have you checked the sysem log for errors?

    • fstab should always end up with blank line.