[Solved] Tinyproxy status page not working 2

With OpenWrt 22.03.5 on Netgear R7800, the status page shows this:

Tinyproxy Status
Failed to retrieve statistics from url: http://127.0.0.1:8888

The issue is identical to the one reported in OpenWrt forum thread in 2018.

However, the 2018 solution (updating the whitelist filter file with 127.0.0.1 address) does not work.

TinyProxy config:

config tinyproxy
	option User 'nobody'
	option Group 'nogroup'
	option Port '8888'
	option Timeout '600'
	option DefaultErrorFile '/usr/share/tinyproxy/default.html'
	option StatFile '/usr/share/tinyproxy/stats.html'
	option LogFile '/var/log/tinyproxy.log'
	option LogLevel 'Info'
	option MaxClients '100'
	option MinSpareServers '5'
	option MaxSpareServers '20'
	option StartServers '10'
	option MaxRequestsPerChild '0'
	list ConnectPort '443'
	list ConnectPort '563'
	option enabled '1'
	option Listen '192.168.1.1'
	list Allow '127.0.0.1'
	list Allow 'localhost'
	list Allow '192.168.1.0/24'
	option FilterDefaultDeny '1'
	option Filter '/etc/tinyproxy/filter'

Whitelist filter:

^127\.0\.0\.1$
^localhost$
wikipedia\.org$

Any ideas for a possible fix?

Currently, the service only listens on 192.168.1.1 .
Comment out the option or change its value to 0.0.0.0 .

2 Likes

Thanks! This indeed brings back the stats page.
Just for my understanding - why does it work? :slight_smile: My assumption was that the router's 192.168.1.1 is at the same time the localhost 127.0.0.1...

127.0.0.1 is a separate virtual loopback interface that is always up and running regardless of the state of the other interfaces in the system. It is used by the device to communicate with itself - mainly for diagnostics and troubleshooting or to access services running on the local machine.

If you want to access a service using the loopback interface, the service must listen on that interface.

In your case, you have restricted tinyproxy to only listen on the (physical) lan interface, so it was unreachable via the loopback interface.

AFAIK listing multiple listening interfaces is not supported by tinyproxy, so the only option is to allow the service to listen on all available interfaces

1 Like

Thanks a lot for explaining!

Indeed, only one listening interface is supported.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.