Saturday, February 18, 2017

Linux Mint 18.1 + PIA + OpenVPN + Network Manager Gnome [works]

I finally got Linux Mint 18.1 to correctly use OpenVPN with Private Internet Access (PIA).

Here's what didn't work:
  • The PIA supplied binary.  It installed fine, but would simply time out on any connection
  • Using command-line openvpn... even the /etc/openvpn solutions wouldn't work.
My biggest problem was this: OpenVPN would connect (sometimes), but there wouldn't be any internet connection.  I saw solutions that played with firewalls and iptables, but my Android worked just fine, and I felt like I shouldn't have to mess with iptables, NAT, etc.

Here's what did work:
  • Use "Preferences --> Network" and NOT "Preferences --> Network Connections" or Network Manager that's accessed via the tray
  • Download the default ovpn files and unzip:  https://www.privateinternetaccess.com/openvpn/openvpn.zip
  • Goto "Preferences --> Network"
  • Click "+"  --> "VPN"  --> "Import from file" --> select your ovpn file (i.e., "US East.ovpn")
  • Under "Gateway" delete the " :1198" (or whatever port is listed)
  • Enter your PIA username  ("Type" should already be "Password")
  • Click "Advanced"
  • Enable "Custom Gateway Port" and enter the port# you deleted from the Gateway name (i.e. 1198)
  • Click "Security" tab
  • Select "AES-128-CBC" (even if it's already listed)
  • Select "SHA-1" (even if it's already listed)
  • Click "OK" to close Advanced screen
  • Click "Save"
  • Now in the "Network" screen (NOT from the tray), select your VPN and turn it on.  It'll probably ask you for your password, and a popup will say you connected successfully.
  • Test your VPN by visiting here: https://www.privateinternetaccess.com/pages/whats-my-ip/
Auto-connect to VPN

I haven't tried this yet, but in the "Preferences --> Network Connections" dialog (i.e., the other one not used above), you select your wifi connection --> "Edit" --> "General" tab.  There's an option there to automatically connect to a specific VPN when you connect to your wifi.


Hope this helps!

Sunday, February 5, 2017

Getting an iPod 3G Nano (and others) to work in Linux

After none of the music apps that I installed correctly detected my 3G iPod, I decided to poke around and try to do it myself.  I tried using ifuse, etc. using this article as a guide:

http://geeknizer.com/sync-iphone-linux/

But it would only mount my iPod in read-only.  so then I tried mounting it manually but I didn't know what device it was, so over on Stack Overflow I found this command:

sudo lsblk -io NAME,TYPE,SIZE,MOUNTPOINT,FSTYPE,MODEL

And figured out my iPod was on /dev/sdd1

I then created a folder in /mnt

sudo mkdir /mnt/ipod

...then mounted it:

sudo mount -rw -o uid=1000 /dev/sdd1 /mnt/ipod

-rw is for read-write access, and I threw in -o uid=1000 to ensure that it's mounted for the currently logged in user.  My uid happened to be 1000, but you can find yours by typing:

id -u <your_username_here>

I then used gtkpod to manage my iPod.  It's not user-friendly so I followed this guide:

https://www.howtoforge.com/linux_gtkpod_ipod

TLDR for link above:  create a new repository (point it to /mnt/ipod, tell it what model ipod you have, name it), then sync it off the main screen.  you should see your files now.