Raspberry Pi 2: IP Anonymization with OpenWRT

IMG_20150821_050217291

After my IP Anonymization expedition with an OpenWRT/Tomato Router and an APU 1D4 Router with pfSense, now it was time to use the new Raspberry Pi 2. This new device has enough power for OpenVPN and to transfer my Internet maximum speed of 16 Mbit (2 MB/s). It is working perfect and stable and is easy to install. As an attachment at this page you will find a Zip file with 3 files inside:  Raspberry Pi 2 OpenWRT Image (.img), Install Instructions (PDF), and a ready to use PrivateVPN.com “CA” file (ca.txt). If you have a different VPN Provider you have to modify the configuration a little bit.

With the following instructions you can anonymize your IP address, also you have a firewall, and you can install SNORT (Intrusion Detection System).


What you need:

– Raspberry Pi 2
– USB to Ethernet Adapter

 

Install Instructions in 10 short steps:

 

1. Flash “openWRTOpenVPN.img” to a 8 GB (or higher) Micro SDCard

2. Connect the following Devices with your Raspberry Pi 2:

  Raspberry USB Port <- “USB Ethernet Adapter” <- “Internet (cable or DSL) Modem”
Raspberry Ethernet Port <- “External Ethernet Switch/Router” <- “Your Computer”

Power on your Raspberry … wait ~30 Seconds
Power on your Computer (or reboot)
Power on your Internet Modem (or reboot)

3. Open your Internet Browser and enter 192.168.3.1 (login without password)

4. Change Passwort: System->Administration:

  “Router Password”: xxxxxxxx (enter a password and press “Save & Apply”)
(if you want SSH Shell network Access, press at the same site under SSH Access: “Add”, Interface: “Lan” then “Save & Apply”)

5. System->Startup (scroll down to “Local Startup”) enter this line befor “exit 0”:

 

echo -e “<vpn provider username>\n<vpn provider password>\n” > /etc/openvpn/userpass.txt… press”Submit” and then reboot your Rapsberry ===> System->Reboot: “Perform reboot”

(replace the <vpn provider username> and <vpn provider password> with real values)

6. Service->OpenVPN: “Add” a new OpenVPN Instance (enter the VPN Provider connection data):

screenshot_openvpn

  Name: “PrivateVPN_XYZ” (“Client Configuration for an Ethernet VPN Bridge”)
=> Press “Add” To open the Advanced Settings press at the same site: “Switch to advanced configuration”

 

Activate and add the following fields in your configuration:

Advanced Configuration->Service:

verb: select 4

Advanced Configuration->Networking:

persist_tun: activated
persist_key: activated
add aditional field: “port”, enter “21000”
add aditional field: “route_delay”, enter “2”

Advanced Configuration->VPN:

pull: activated
remote: vpn-uk1.privatevpn.com (enter here the VPN Provider Server you want)
add aditional field: “proto”, enter “udp”
add aditional field: “redirect_gateway”, select “def1”
add aditional field: “resolv_retry”, select “infinite”
add aditional field: “auth_user_pass”, select “/etc/openvpn/userpass.txt”

Advanced Configuration->Cryptography:

add aditional field: “auth”, enter “SHA1”
add aditional field: “cipher”, enter “BF-CBC”
add aditional field: “keysize”, enter “128”
add aditional field: “ca”, “choose file”: ca.txt (from the ZIP folder)

7. Services->OpenVPN: PrivateVPN_XYZ: enabled => Press “Start”

8. Network->Interfaces: “Add new Interface”

  Name: “PRIVATEVPN”,
Protocol: “DHCP client”,
Cover the following interface => “Ethernet Adapter: tap0” => Submit, Save & Apply

9. Network->Interfaces->PRIVATEVPN: Edit, Firewall Settings, “Create/Assign firewall-zone”, Select: “wan” => Save & Apply

10. Restart OpenVPN: System->Startup->OpenVPN: “Restart”

That’s it.

 

 

Download: <In order to finance everything that belongs to it, the downloads will be activated after a donation>

Thanks for your support!