View previous topic :: View next topic |
Author |
Message |
Ravilj Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/192897069043c2f8e002db2.jpg)
Joined: 29 Jul 2004 Posts: 164 Location: ziig / #
|
Posted: Fri Sep 09, 2005 5:27 pm Post subject: Squid - http_access deny all not working |
|
|
I have a curious problem with squid. At my old high school they have to machines.
Machine A - Mail, file, et al server. It has squid running but deny's all access except to those fortunate people (IP's). Running red hat (dont ask not my baby). 192.168.1.3:3128
Machine B - Proxy server. It has squid (192.168.1.4:port 3128) and dansguardian running (192.168.1.4:8080). Does the authentication through Machine A. Running Gentoo o///
Up until the other day you could not gain access to squid from port 3128 except for local host. All the comps are setup to use 8080. Now I did some testing with squid. If I formally declare:
ACL pc src 192.168.1.132
http_access deny pc
That pc is denied access through 3128 yet the others are still allowed through even though:
ACL localhost 127.0.0.1/255.255.255.255
http_access deny !localhost
ACL all src 0.0.0.0/0.0.0.0
http_access deny all
Now this was working up until the other day The same problem is being experienced on Machine A where people (IP's) that would and should fall under the deny all rule are not being blocked.
Can anyone speculate as to what may be causing this? I dont know if the [roblems are related but I suspect so. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ravilj Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/192897069043c2f8e002db2.jpg)
Joined: 29 Jul 2004 Posts: 164 Location: ziig / #
|
Posted: Sat Sep 10, 2005 5:22 pm Post subject: |
|
|
Anyone? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mrness Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/gallery/Loony Toons/Looney_Toons_-_Daffy.gif)
Joined: 17 Feb 2004 Posts: 375 Location: bucharest.ro
|
Posted: Sat Sep 10, 2005 9:18 pm Post subject: |
|
|
the output of "grep http_access /etc/squid/squid.conf", please |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ravilj Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/192897069043c2f8e002db2.jpg)
Joined: 29 Jul 2004 Posts: 164 Location: ziig / #
|
Posted: Sun Sep 11, 2005 11:23 am Post subject: |
|
|
grep acl /etc/squid/squid.conf result:
Quote: | acl internet proxy_auth REQUIRED
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT |
grep http_access /etc/squid/squid.conf result:
Quote: | http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow internet
http_access deny !localhost
http_access deny all |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mrness Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/gallery/Loony Toons/Looney_Toons_-_Daffy.gif)
Joined: 17 Feb 2004 Posts: 375 Location: bucharest.ro
|
Posted: Sun Sep 11, 2005 11:49 am Post subject: |
|
|
comment the "http_access allow internet" line and see if you still have access to the proxy. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ravilj Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/192897069043c2f8e002db2.jpg)
Joined: 29 Jul 2004 Posts: 164 Location: ziig / #
|
Posted: Sun Sep 11, 2005 6:51 pm Post subject: |
|
|
Ok cool, will do so tomorrow when I have access to the machine. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ravilj Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/192897069043c2f8e002db2.jpg)
Joined: 29 Jul 2004 Posts: 164 Location: ziig / #
|
Posted: Mon Sep 12, 2005 7:34 am Post subject: |
|
|
Hey mrness. There is no access at all through squid on port 3128 and dansguardian on 8080. So it would be safe to assume that the problem lies on the red hate machine where squid authenticates from? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mrness Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/gallery/Loony Toons/Looney_Toons_-_Daffy.gif)
Joined: 17 Feb 2004 Posts: 375 Location: bucharest.ro
|
Posted: Mon Sep 12, 2005 8:07 am Post subject: |
|
|
access will be granted to authenticated users by "http_access allow internet" line, no matter what you put *after*.
if you want it to reject access based on IP address, you must add those lines *before* allow internet. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ravilj Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/192897069043c2f8e002db2.jpg)
Joined: 29 Jul 2004 Posts: 164 Location: ziig / #
|
Posted: Mon Sep 12, 2005 3:05 pm Post subject: |
|
|
The http_access allow internet is is used to do the proxy authentication of users. Squid should be blocked off to all requests coming in on port 3128 not from the localhost (dansguardian). All request should go through dans on port 8080 which is open to the network. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mrness Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/gallery/Loony Toons/Looney_Toons_-_Daffy.gif)
Joined: 17 Feb 2004 Posts: 375 Location: bucharest.ro
|
Posted: Mon Sep 12, 2005 3:14 pm Post subject: |
|
|
...
http_access deny !localhost
http_access allow internet
http_access deny all |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ravilj Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/192897069043c2f8e002db2.jpg)
Joined: 29 Jul 2004 Posts: 164 Location: ziig / #
|
Posted: Mon Sep 12, 2005 4:20 pm Post subject: |
|
|
Okay so I had the wrong order, I was allowing internet first than denying !localhost.
I changed got it working actually using:
Quote: | http_access allow internet localhost
http_access deny internet
http_access deny all |
Thanks for the help mrness. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|