Atlantic.Net Blog

How to Install and Configure Privoxy Server On Oracle Linux 8

Hitesh Jethva
by Atlantic.Net (511 posts) under Tutorials, VPS Hosting
0 Comments

Privoxy is a web proxy service that acts as a non-caching web proxy. It works as a mediator between a user and the Internet. When the user accesses the Internet, the web browser sends a request to Privoxy to get the objects or pages, then Privoxy filters the user request per the proxy configuration and gives the result to the end user. Generally, a Privoxy server is used for privacy and security and to improve efficiency through its advanced caching features.

In this post, we will show you how to install a Privoxy proxy server on Oracle Linux 8.

Prerequisites

  • A server running Oracle Linux 8 on the Atlantic.Net Cloud Platform
  • A root password is configured on your server

Step 1 – Create Atlantic.Net Cloud Server

First, log in to your Atlantic.Net Cloud Server. Create a new server, choosing Oracle Linux 8 as the operating system with at least 2GB RAM. Connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page.

Once you are logged in to your server, run the following command to update your base system with the latest available packages.

dnf update -y

Step 2 – Install Privoxy Server

By default, the Privoxy package is not included in the Oracle Linux default repo, so you will need to add the EPEL repo to your server.

First, install the EPEL using the following command:

dnf install epel-release -y

Once the EPEL repo is installed, you can install Privoxy with the following command:

dnf install privoxy -y

Privoxy proxy stores all their configuration files at /etc/privoxy directory. You can see all of them with the following command:

ls -l /etc/privoxy/

You will get the following list:

-rw-r--r-- 1 root root  86277 Dec 16  2021 config
-rw-r--r-- 1 root root 111882 Dec 16  2021 default.action
-rw-r--r-- 1 root root  43970 Dec  8  2021 default.filter
-rw-r--r-- 1 root root    600 Dec  8  2021 match-all.action
-rw-r--r-- 1 root root  42637 Dec  8  2021 regression-tests.action
drwxr-xr-x 2 root root   4096 Jul 19 05:09 templates
-rw-r--r-- 1 root root   3565 Dec  8  2021 trust
-rw-r--r-- 1 root root   9012 Dec  8  2021 user.action
-rw-r--r-- 1 root root      0 Dec 16  2021 user.filter

Step 3 – Configure Privoxy Proxy

By default, the Privoxy server listens on port 8118 on the localhost, so you will need to configure it to listen to your server’s IP address.

To do so, edit the Privoxy configuration file:

nano /etc/privoxy/config

Find the following line:

listen-address  127.0.0.1:8118

Change it with the following line:

listen-address  your-server-ip:8118

Next, define the log directory path:

logdir /var/log/privoxy

Next, uncomment the following lines:

logfile logfile
debug     1 # Log the destination for each request. See also debug 1024.
debug     2 # show each connection status
debug     4 # show tagging-related messages
debug     8 # show header parsing
debug    16 # log all data written to the network
debug    32 # debug force feature
debug    64 # debug regular expression filters#
debug   128 # debug redirects
debug   256 # debug GIF de-animation
debug   512 # Common Log Format
debug  1024 # Log the destination for requests Privoxy didn't let through, and the reason why.
debug  2048 # CGI user interface#
debug  4096 # Startup banner and warnings.
debug  8192 # Non-fatal errors
debug 32768 # log all data read from the network
debug 65536 # Log the applying actions

Save and close the file, then start the Privoxy service with the following command:

systemctl start privoxy

You can check the status of Privoxy with the following command:

systemctl status privoxy

You should get the following output:

● privoxy.service - Privoxy Web Proxy With Advanced Filtering Capabilities
   Loaded: loaded (/usr/lib/systemd/system/privoxy.service; disabled; vendor preset: disabled)
   Active: active (running) since Tue 2022-07-19 05:11:52 EDT; 4s ago
  Process: 30045 ExecStart=/usr/sbin/privoxy --pidfile /run/privoxy.pid --user privoxy /etc/privoxy/config (code=exited, status=0/SUCCESS)
 Main PID: 30046 (privoxy)
    Tasks: 1 (limit: 11409)
   Memory: 1.4M
   CGroup: /system.slice/privoxy.service
           └─30046 /usr/sbin/privoxy --pidfile /run/privoxy.pid --user privoxy /etc/privoxy/config

Jul 19 05:11:51 oraclelinux8 systemd[1]: Starting Privoxy Web Proxy With Advanced Filtering Capabilities...
Jul 19 05:11:52 oraclelinux8 systemd[1]: Started Privoxy Web Proxy With Advanced Filtering Capabilities.

You can also verify the Privoxy listening port using the following command:

ss -antpl | grep 8118

You will get the following output:

LISTEN 0      128    208.117.86.131:8118      0.0.0.0:*    users:(("privoxy",pid=30046,fd=7))

Step 4 – Configure Web Browser to Use Privoxy Proxy

After installing the Privoxy server, you will need to test it. To test it, you must configure your web browser to use the Privoxy server.

First, go to the client system, open your Firefox web browser => and click on Edit => Preferences. You should see the following page:
Firefox preferences page
Now, click on Network Settings => Settings. You should see the following page:
Firefox proxy page
Now, provide your Privoxy server IP and port and click on the Ok button to save the changes.

Now, open your web browser and access the URL https://www.whatismyip.com to check your public IP address. If everything is fine, you should see your Privoxy server IP on the following page:
verify proxy page

Conclusion

Congratulations! You have successfully installed and configured the Privoxy server on your Oracle Linux 8 virtual private server. You can now use some advanced filters on the Privoxy server and block your desired content. Get started with Privoxy on VPS hosting from Atlantic.Net!


Get A Free To Use Cloud VPS

Free Tier Includes:
G3.2GB Cloud VPS Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


Looking for a Hosting Solution?

We Provide Cloud, Dedicated, & Colocation.

  • Seven Global Data Center Locations.
  • Flexible Private, Public, & Hybrid Hosting.
  • 24x7x365 Security, Support, & Monitoring.
Contact Us Now! Med Tech Award FTC
SOC Audit HIPAA Audit HITECH Audit

Recent Posts

How to Set Up Kubernetes Cluster Using Minikube on Arch Linux
How to Install Jenkins on Arch Linux
Which Compliance Standards Require an IPS?
Install Netdata Monitoring Tool on Arch Linux
How to Install Vue.js on Arch Linux

Get started with 12 months of free cloud VPS hosting

Free Tier includes:
G3.2GB Cloud VPS Server Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2008 Lookout Dr,

Garland, Texas 75044

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4

Canada

London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom

Resources