How to Install and Use Privoxy on Ubuntu 16.04
This guide on how to Install and configure privoxy on Ubuntu 16.04 / Debian 9 is intended to help you install, configure and use Privoxy on your Desktop or as a server in your LAN where all other users can use it. Before we dive to installation and configurations part, let's define Privoxy and see its features.Read also : CTparental - Featured Parental Control Tool for Linux
What's Privoxy?
Privoxy is a piece of software which acts as a non-caching web proxy. A web proxy is a service that web browsers can use instead of connecting to web servers directly. The web browser then asks the proxy to request objects like web pages and images on their behalf and forwards the data back. Privoxy has advanced filtering capabilities which aim at:- Enhancing user's web privacy
- Modifying web page data and HTTP headers before forwarding to browsers.
- Filtering outbound personal information that your browser may leak
- Removing ads on web pages and other Inbound junk
Installing Privoxy
Privoxy package is available on upstream repositories for Ubuntu and it can be installed using apt-get package manager.$ sudo apt-get install privoxyAll its configuration files will be located under /etc/privoxy directory.
# ls -l /etc/privoxy/ | awk '{ print $9 }' config default.action default.filter match-all.action templates trust user.action user.filterEven though web browsers nowadays have built-in features similar to privoxy, the proxy is a good choice if you use multiple browsers, or have a LAN with multiple computers since Privoxy can run as a server application. This way all the configuration is in one place, and you don't have to maintain a similar configuration for possibly many browsers or users.
Configure Browser to use Privoxy
Before you start using privoxy service, you need to configure your browser(s) to use Privoxy as an HTTP and HTTPS (SSL) proxy. The default is 127.0.0.1 (or localhost) for the proxy address, and port 8118. Any browser that can be configured to use a proxy, which should be virtually all browsers, including Firefox, Internet Explorer, Opera, and Safari among others. This setting is usually located under preferences settings section.If you're setting Privoxy on a server in your LAN, make sure to replace 127.0.0.1 with the IP address of the server machine. On Privoxy main configuration file /etc/privoxy/config, add a line like below with your host IP address.
listen-address 192.168.1.1:8118This will bind privoxy service to 192.168.1.1 ip address. Save the file, and restart Privoxy. Configure all browsers on the network to use this address and port number. Alternately, you can have Privoxy listen on all available interfaces:
listen-address :8118To start proxy manually, run the command:
$ sudo systemctl start privoxyIf for any reason it is not enabled to start on boot up, enable it using:
$ sudo systemctl enable privoxyYou can then confirm the service is running using:
$ sudo systemctl status privoxy ● privoxy.service - Privacy enhancing HTTP Proxy Loaded: loaded (/lib/systemd/system/privoxy.service; enabled; vendor preset: enabled) Active: active (running) since Rob 2018-02-07 10:38:02 EAT; 2min 17s ago Process: 3273 ExecStart=/usr/sbin/privoxy --pidfile $PIDFILE --user $OWNER $CONFIGFILE (code=exited, status=0/SUCCESS) Main PID: 3274 (privoxy) CGroup: /system.slice/privoxy.service └─3274 /usr/sbin/privoxy --pidfile /var/run/privoxy.pid --user privoxy /etc/privoxy/config Gur 07 10:38:01 mypc systemd[1]: Starting Privacy enhancing HTTP Proxy... Gur 07 10:38:02 mypc systemd[1]: Started Privacy enhancing HTTP Proxy.You should as well be able to see the service listening on a tcp port 8118 by using ss or netstat commands.
# ss -tunelp | grep 8118 tcp LISTEN 0 128 127.0.0.1:8118 *:* users:(("privoxy",pid=3274,fd=4)) uid:125 ino:30414 sk:e <->
Testing Privoxy
To test whether Privoxy is working fine after changing proxy settings on your browser, try visiting the web URL http://p.p/. This should direct you to Privoxy main page where you can view its status and local server configurations.For more advanced configurations, visit Provoxy configuration guide page.
Uninstall Privoxy on Ubuntu 16.04 / Debian 9
To uninstall Privoxy, use the apt-get remove commands followed by the package name. It's recommended to remove it with its dependencies as below:$ sudo apt-get remove --auto-remove privoxy
No comments:
Post a Comment