Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Set up IPVanish on Raspberry PI 3
# This script is designed to execute via the shell. Download this script on
# your Pi, edit the user and passwd above, execute the following commands:
# chmod +x ipvanish_on_raspberry_pi.sh
# sudo ./ipvanish_on_raspberry_pi.sh
# Of course, you can use this script just as a reference and type everything out.
# Place your ip vanish username here. For example, IPVANISHUSER=picrazy
IPVANISHUSER=
IPVANISHPASSWD=
apt-get install openvpn -y
mkdir /home/IPV && cd IPV
wget https://www.ipvanish.com/software/configs/ca.ipvanish.com.crt
cp ca.ipvanish.com.crt privacy.crt
wget https://www.ipvanish.com/software/configs/ipvanish-US-atlanta-atl-a01.ovpn privacy.oVPN
cp ipvanish-US-atlanta-atl-a01.ovpn privacy.oVPN
echo "$IPVANISHUSER
$IPVANISHPASSWD" >> pass.txt
echo "nameserver 8.8.8.8" | sudo tee -a /etc/resolv.conf
echo "nameserver 8.8.4.4" | sudo tee -a /etc/resolv.conf
sudo chattr +i /etc/resolv.conf
# comment out current call for exit. We'll replace it later.
sed -i -e 's/exit 0/#exit 0/g' /etc/rc.local
echo "sleep 5
cd /home/IPV
sudo openvpn --config /home/IPV/privacy.ovpn --ca /home/IPV/privacy.crt --auth-user-pass /home/IPV/pass.txt
exit 0" >> /etc/rc.local
reboot
@islesailor

This comment has been minimized.

Copy link

islesailor commented Jul 5, 2017

Trying to get IPVanish installed on my Pi 3 , os is raspberian jesse. Went through all steps down to 19 with no errors. Executing step 20 I get the following
root@raspberrypi:/home/IPV# sudo openvpn --config /home/IPV/privacy.ovpn --ca /home/IPV/privacy.crt --auth-user-pass /home/IPV/pass.txt
Options error: In [CMD-LINE]:1: Error opening configuration file: /home/IPV/privacy.ovpn
Use --help for more information.
What happened?
Also don't understand line 15. vim is not a command.
Kelton Joyner
islesailor@gmail.com

@nakedjohn

This comment has been minimized.

Copy link

nakedjohn commented Jul 22, 2017

@islesailor

Typo line 7, should read:

cp ipvanish-US-atlanta-atl-a01.ovpn privacy.oVPN

In line 15, substitute nano for vim, copy those three lines into /etc/rc.local

NANO /etc/rc.local

@Gitingo

This comment has been minimized.

Copy link

Gitingo commented Aug 23, 2017

Hello Willsams,
How I can check if it's works?
Thanks!

@WillSams

This comment has been minimized.

Copy link
Owner Author

WillSams commented Apr 15, 2019

Sorry, didn't notice any of these comments until now. I've made a modification to just use 'echo' instead of relying on Vi or Nano.

@WillSams

This comment has been minimized.

Copy link
Owner Author

WillSams commented Apr 15, 2019

Also, I originally worked on this in 2016. I'm not sure how I actually checked to see if this was working correctly. I guess you can check a "what is my IP" site using the lynx command line browser.

@mbariola

This comment has been minimized.

Copy link

mbariola commented Sep 16, 2019

I seem to understand it uses openvpn as a client with the ipvanish servers.

How can I configure it so to have the other ipvanish client features, that is all traffic will be routed via vpn, no dns leak and make sure vpn stays up..... if at all possible with openvpn? I am happy to do the required googling but just to know if those are features at all possible. thanks!

@WillSams

This comment has been minimized.

Copy link
Owner Author

WillSams commented Sep 16, 2019

Hi, Massimiliano. I only used it for a month, I unfortunately don't know enough to answer those questions. Sorry :(

@mbariola

This comment has been minimized.

Copy link

mbariola commented Sep 16, 2019

thanks anyway @WillSams !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.