OpenVPN and Privoxy
From charlesreid1
https://openvpn.net/index.php/open-source/documentation/howto.html#http
- remove udp and replace with tcp
- using http-proxy instead of dhcp-settings HTTP_PROXY
Running OpenVPN and Privoxy together can work two ways: we can run Privoxy on our OpenVPN client, or we can run Privoxy on our OpenVPN server. The latter option is much better, easier not to think about it. So we'll cover that.
Contents
Install Stuff
Install OpenVPN
Make sure OpenVPN is installed on both the OpenVPN client and the OpenVPN server. Duh.
Installation notes over at OpenVPN, but check out the OpenVPN website for source code and instructions.
Install OpenVPN Scripts
Some of the scripts from Github for setting up my OpenVPN - configuration files, firewall settings, etc.
These scripts are all here: OpenVPN/Static Key
Install Privoxy
You'll want to install Privoxy on the machine you're using as the OpenVPN server. Check out the Privoxy page for installation notes.
Install Privoxy Configuration File
Now install the Privoxy configuration file from the Nosecleaner repository (add link here).
Double-Check OpenVPN Client DNS
Fix your DNS settings on your OpenVPN Client to make sure they are going to a public DNS server. Edit the file /etc/resolv.conf
and double check the servers. See https://www.wikileaks.org/wiki/Alternative_DNS for open DNS servers.
Run Privoxy
On the OpenVPN server, fire up Privoxy:
$ service privoxy restart
Privoxy is now working on port 8118.
Modify OpenVPN Client Config File
Now edit the OpenVPN client's config file and add a directive to the proxy:
dhcp-option PROXY_HTTP 45.33.40.53 8118
This tells OpenVPN that the traffic coming out of the OpenVPN tunnel should be using the proxy on port 8118, which is Privoxy. Content coming from the open web through the Privoxy content filter on the server is scrubbed and sent out of port 8118, where it is redirected to the OpenVPN tunnel again.