Here is multiple methods to have a secure internet connection :
All these methods can be set up on a Raspberry Pi. Let's assume it can be accessed on domain.net on any ports.
You need a SSH access on the Pi and an opened port (here, 8080) :
ssh firstname.lastname@example.org -D 8080
This command opens SOCKS server. You can use it to tunnel your traffic.
Then in the URL bar, go to : about:config
And change “network.proxy.socks_remote_dns” to true. (There is a graphical button for this in Firefox nightly 30.xx next to SOCKS radio buttons)
I followed this wiki : https://wiki.archlinux.org/index.php/Openvpn
I didn't used everything. I will explain my procedure later.
Once the server is running, generate keys for your clients.
Copy for “client-name” :
And create client-name.ovpn file :
client dev tun proto udp remote domain.net 1194 resolv-retry infinite nobind user nobody group nobody persist-key persist-tun ca ca.crt cert client-name.crt key client-name.key ns-cert-type server tls-auth ta.key 1 comp-lzo verb 3
Put these 5 files in the same folder and load client-name.ovpn in any OpenVPN client :
Install Privoxy :
pacman -S privoxy
Configure it to fit your needs by editing “/etc/privoxy/config”. I only changed “listen-address” parameter. By default it will listen to localhost on port 8118.
Run Privoxy :
systemctl enable privoxy.service systemctl start privoxy.service
In the app, set :
It can be configured to auto connect when using 3G or WIFI connection.
A lot more stuffs about it here : https://wiki.archlinux.org/index.php/Privoxy