[squid-users] ERROR: Cannot connect to 127.0.0.1:3128

Jorgeley Junior jorgeley at gmail.com
Tue Oct 11 10:31:03 UTC 2016


I think it could be the sequence of the rules, do this command and post the
results:
grep         .       /etc/squid-your-version/squid.conf      |
grep     -v       "#"

2016-10-11 3:59 GMT-03:00 Amos Jeffries <squid3 at treenet.co.nz>:

> On 11/10/2016 4:54 p.m., Михаил wrote:
> > I check version of squid 3.5.21 with my configuration and I faced with a
> > problem. Early I used in version 3.5.12 this line for connect localhost,
> but now
> > it doesn't work.
>
> Order is important. Where you place the rules in squid.conf matters a
> lot with regards to whether they are actually useful and do what you
> want, or not.
>
> > # squid.conf
> > ...
> > http_access allow localhost manager
> > http_access deny manager
> > ...
> > # squidclient -p 3128 -h localhost mgr:info
> > HTTP/1.1 403 Forbidden
> > Server: squid
> > Mime-Version: 1.0
> > Date: Tue, 11 Oct 2016 03:42:54 GMT
> > ...
>
> > If I set a full access I could connect to localhost.
>
>
> > # squid.conf
> > ...
> > http_access allow all
> > http_access deny manager
> > ...
>
>
> So what IP address(es) does 'localhost' resolve to?
>
> > # squidclient -p 3128 -h localhost mgr:info
> > stub time| WARNING: BCP 177 violation. IPv6 transport forced OFF by build
> > parameters.
>
> I know you said in a followup to ignore this. But it may be important.
>
> It shows that squidclient was built with --disable-ipv6, and yet your
> system is IPv6-enabled.
>
> The name "localhost" for IPv6-enabled systems is ::1.
>
> A squid binary that is built with --disable-ipv6 will not permit ::1
> since it is non-IP4. But it will be recognized as part of "all" IP space.
>
>
> > HTTP/1.1 200 OK
> > Server: squid
> > Mime-Version: 1.0
> > Date: Tue, 11 Oct 2016 03:47:36 GMT
> > ...
> > What is happend? And what is the right way to connect to
> cache_management from
> > localhost?
>
> squidclient defaults to localhost and port 3128 for management access to
> Squid. Just use:
>
>   squidclient mgr:info
>
> Amos
>
> _______________________________________________
> squid-users mailing list
> squid-users at lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-users
>



--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20161011/b412b42f/attachment.html>


More information about the squid-users mailing list