LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   I need help getting Privoxy running on openSUSE Leap 15.2 (https://www.linuxquestions.org/questions/suse-opensuse-60/i-need-help-getting-privoxy-running-on-opensuse-leap-15-2-a-4175685189/)

RadicalDreamer 11-13-2020 08:55 PM

I need help getting Privoxy running on openSUSE Leap 15.2
 
I'm helping someone set it up and I'm not familiar with how openSUSE Leap 15.2 does things. I want to setup Privoxy so it will run on boot and I don't know how to set it up beyond installing the Privoxy package via YaST.

Here are the files that were installed through YaST: https://build.opensuse.org/package/s...3A15.2/privoxy

Sauerland 11-14-2020 02:27 AM

Because privoxy is in the standard Repo as you can see:
Code:

LANG=C zypper se -s privox
Loading repository data...
Reading installed packages...

S  | Name        | Type    | Version          | Arch  | Repository
---+-------------+---------+------------------+--------+-----------
i+ | privoxy    | package | 3.0.28-lp152.2.6 | x86_64 | OSS
  | privoxy-doc | package | 3.0.28-lp152.2.6 | noarch | OSS

You can install privoxy, as root by:
Code:

zypper in privoxy
To start it:
Code:

systemctl start privoxy.service
To start it on every reboot:
Code:

systemctl enable privoxy.service
Configuration:
/etc/privoxy
which is a link to /var/lib/privoxy/etc

RadicalDreamer 11-14-2020 04:00 PM

Thanks that worked. Before it couldn't find the privoxy.service. I had to use
Code:

sudo rcprivoxy restart
to get it to work with chromium and firefox:
https://sourceforge.net/p/ijbswa/support-requests/1691/

RadicalDreamer 11-14-2020 11:28 PM

I had to create service files for rcprivoxy. I'm sure there is a better way to do this but here are my service files to help whoever has issues with getting chromium/firefox to use privoxy. I used a timer to run "rcprivoxy restart." These are my first service files and I'm sure someone can come up with something better but this worked for me. I put these in
Code:

/etc/systemd/system/
One is called rcprivoxy.timer and the other is called rcprivoxy.service

rcprivoxy.timer
Code:

[Unit]
Description=Timer to start rcprivoxy with
Requires=rcprivoxy.service

[Timer]
Unit=rcprivoxy.service
OnBootSec=1min

[Install]
WantedBy=timers.target

rcprivoxy.service
Code:

[Unit]
Description=Restart Privoxy
After=network.target privoxy.service
Requires=privoxy.service
PartOf=privoxy.service
Wants=rcprivoxy.timer


[Service]
Type=oneshot
ExecStart=/usr/sbin/rcprivoxy restart

[Install]
WantedBy=network-online.target


Sauerland 11-15-2020 05:45 AM

Quote:

I had to create service files for rcprivoxy.
Why?

Code:

rpm -ql privoxy | grep -i service
/etc/sysconfig/SuSEfirewall2.d/services/privoxy
/usr/lib/systemd/system/privoxy.service
/var/lib/privoxy/etc/templates/mod-support-and-service

Its using systemd as every distribution nowadays.

RadicalDreamer 11-15-2020 03:33 PM

Quote:

Originally Posted by Sauerland (Post 6185430)
Why?

Code:

rpm -ql privoxy | grep -i service
/etc/sysconfig/SuSEfirewall2.d/services/privoxy
/usr/lib/systemd/system/privoxy.service
/var/lib/privoxy/etc/templates/mod-support-and-service

Its using systemd as every distribution nowadays.

The system is using Firewalld. Privoxy would load up, I could see it with "ss -tan" but firefox or chromium wouldn't use it unless I used the command "rcprivoxy restart" and I needed to use that command each boot. The only thing I could figure out to do from the internet is those scripts. I'm not familiar with openSUSE. Not every distribution uses systemd. This has made me appreciate those that don't even more.

Edit: I want to make clear that I installed OpenSUSE for them after they tried several other distributions like Manjaro, Fedora, Linux Mint, Debian, & Ubuntu. It was the most stable, newbie friendly, and it just worked. I was left impressed with OpenSUSE because the others failed in some way. I believe it will serve them well. They wanted one that they could manage themselves and OpenSUSE Leap 15.2 has worked beautifully.


All times are GMT -5. The time now is 09:48 PM.