[Squid3] proxy server with Ldap

Hi guys,

I want to use squid as a web proxy on my yunohost server.
I’m using the tuto found on https://memo-linux.com/installer-squid3-sur-un-serveur-yunohost/ to install it.

The installation itself seems to work, the service seems to be running without a problem, the authentication against Yunohost ldap works, but when I try to use it as my proxy in Firefox, I get a DNS problem.

Here’s the service squid3 status -l result:

● squid3.service - LSB: Squid HTTP Proxy version 3.x
   Loaded: loaded (/etc/init.d/squid3)
   Active: active (running) since Sat 2016-11-26 17:06:54 CET; 13min ago
  Process: 27561 ExecStop=/etc/init.d/squid3 stop (code=exited, status=0/SUCCESS)
  Process: 27999 ExecReload=/etc/init.d/squid3 reload (code=exited, status=0/SUCCESS)
  Process: 27570 ExecStart=/etc/init.d/squid3 start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/squid3.service
           ├─27607 /usr/sbin/squid3 -YC -f /etc/squid3/squid.conf
           ├─27612 (squid-1) -YC -f /etc/squid3/squid.conf
           ├─28007 (pinger)
           └─28009 (basic_ldap_auth) -b dc=yunohost,dc=org -h 127.0.0.1 -D cn=admin,dc=yunohost,dc=org -w REDACTED uid=%s

Nov 26 17:06:55 myserver.eu squid[27603]: Squid Parent: (squid-1) process 27605 exited with status 0
Nov 26 17:06:58 myserver.eu squid[27607]: Squid Parent: (squid-1) process 27612 started
Nov 26 17:12:39 myserver.eu systemd[1]: Reloading LSB: Squid HTTP Proxy version 3.x.
Nov 26 17:12:39 myserver.eu squid3[27933]: Reloading Squid HTTP Proxy 3.x configuration files.
Nov 26 17:12:39 myserver.eu squid3[27933]: done.
Nov 26 17:12:39 myserver.eu systemd[1]: Reloaded LSB: Squid HTTP Proxy version 3.x.
Nov 26 17:13:30 myserver.eu systemd[1]: Reloading LSB: Squid HTTP Proxy version 3.x.
Nov 26 17:13:30 myserver.eu squid3[27999]: Reloading Squid HTTP Proxy 3.x configuration files.
Nov 26 17:13:30 myserver.eu squid3[27999]: done.
Nov 26 17:13:30 myserver.eu systemd[1]: Reloaded LSB: Squid HTTP Proxy version 3.x.

Here’s the error that I get:

ERROR

The requested URL could not be retrieved

The following error was encountered while trying to retrieve the URL: http://monip.org/

Unable to determine IP address from host name monip.org

The DNS server returned:

Refused: The name server refuses to perform the specified operation.
This means that the cache was not able to resolve the hostname presented in the URL. Check if the address is correct.

Your cache administrator is webmaster.

Generated Sat, 26 Nov 2016 16:23:08 GMT by web-proxy (squid/3.4.8)

As you can see, the DNS server is involved.
I removed the dns_nameservers 127.0.0.1 in the config in order to use the default value from my server, but I’m getting the same behaviour.

Do you know what should be done in order to make the DNS server accept my requests?
Thanks!

Little update from my side.

I still haven’t been able to use my own DNS server in squid.
By changing Squid configuration to use another DNS server, it works.

It’s working, but it means I’m still dependant on another service.

Squid 3 is now available on Yunohost. Please feel free to test and open an issue if have any problem.

Hi YunoHumans
Squid3 caching proxy app has been updated with latest yunohost example package.
If you have usage examples with this proxy. Please take out time to share them.