logging

Sunday, August 21, 2022

Installing and configuring tinyproxy on Ubuntu 22.04

Install and configure tinyproxy (if you want this system to function as a proxy)

In order to use the system as a proxy install and configure tinyproxy:
sudo apt update
sudo apt upgrade
sudo ufw allow 8888
sudo apt install tinyproxy
sudo touch /var/log/tinyproxy/tinyproxy.log
sudo chown tinyproxy:tinyproxy  /var/log/tinyproxy/tinyproxy.log
Add the IP addresses of systems you want to make use of the proxy to /etc/tinyproxy/tinyproxy.conf:
sudo vi /etc/tinyproxy/tinyproxy.conf
Add lines like:
Allow 198.35.34.96
And restart tinyproxy:
sudo systemctl restart tinyproxy.service
sudo systemctl status tinyproxy.service
Status should look like:
 <user>@<hostname>:~$ sudo systemctl status tinyproxy.service   
 ● tinyproxy.service - Tinyproxy lightweight HTTP Proxy
     Loaded: loaded (/lib/systemd/system/tinyproxy.service; enabled; vendor pre>
     Active: active (running) since Thu 2022-07-14 12:44:52 UTC; 6s ago
       Docs: man:tinyproxy(8)
             man:tinyproxy.conf(5)
    Process: 2523 ExecStart=/usr/bin/tinyproxy $FLAGS (code=exited, status=0/SU>
   Main PID: 2525 (tinyproxy)
      Tasks: 1 (limit: 956)
     Memory: 1.1M
        CPU: 6ms
     CGroup: /system.slice/tinyproxy.service
             └─2525 /usr/bin/tinyproxy

Jul 14 12:44:52 t2202 systemd[1]: Starting Tinyproxy lightweight HTTP Proxy...
Jul 14 12:44:52 t2202 systemd[1]: tinyproxy.service: Can't open PID file /run/tinyproxy/tinyproxy.pid (yet?) after start: Operation not permitted
Jul 14 12:44:52 t2202 systemd[1]: Started Tinyproxy lightweight HTTP Proxy.
(I do not care about the message 'tinyproxy.service: Can't open PID file /run/tinyproxy/tinyproxy.pid' as long as the proxy works...)

No comments:

Post a Comment

Introduction to OpenLayers

Introduction What is 'OpenLayers'? Openlayers is an open-source JavaScript library for displaying maps and map data in web brow...